photometry

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package photometry is magnitudes and the fluxes they stand for: Pogson's scale, and the bands of a survey, each with the flux density of magnitude zero the survey publishes.

Pogson's scale is what is defined: five magnitudes are a factor of a hundred in flux, so a flux is F0 times 100 to the minus m over 5. A band is known by the name its survey writes, W1 or W4; there is no list of bands in code, only the survey's data.

A catalogue reader takes a Photometer, so its tests stand a mock in for it (celestial/mocks) and expect its calls; the photometry is tested once, here. Fluxes come out in si units, W m^-2 Hz^-1, and in janskys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flux

type Flux struct {
	// contains filtered or unexported fields
}

Flux is a flux density and its error, held in W m^-2 Hz^-1.

func (*Flux) InJanskys

func (flux *Flux) InJanskys() (density, sigma float64)

InJanskys is the flux density and its error in janskys.

func (*Flux) InSI

func (flux *Flux) InSI() (density, sigma float64)

InSI is the flux density and its error in W m^-2 Hz^-1.

type Photometer

type Photometer interface {
	Flux(band string, magnitude, magnitudeError float64) (*Flux, error)
}

Photometer turns a magnitude measured in a named band, and its error, into the flux density it stands for.

type Survey

type Survey struct {
	// contains filtered or unexported fields
}

Survey is a survey's bands, each known by the name the survey writes and holding the flux density of a magnitude of zero in it.

func WISE

func WISE() *Survey

WISE is the wide-field infrared survey explorer's four bands, with the zero points of its vega magnitudes from its all-sky explanatory supplement, as celestial's research data holds them.

func (*Survey) Bands

func (survey *Survey) Bands() []string

Bands is the names of the survey's bands, in order.

func (*Survey) Flux

func (survey *Survey) Flux(band string, magnitude,
	magnitudeError float64) (*Flux, error)

Flux is the flux density a magnitude in one of the survey's bands stands for, and its error: F0 times 100 to the minus m over 5, where F0 is the band's zero point.

The error is carried to first order: dF/dm is minus F times the natural log of 100, over 5. That holds when the error is small, as it is for a detection; an error near a magnitude makes a lopsided flux error this does not describe.

Flux refuses, and then gives no flux:

  • a band the survey does not have
  • an error below nothing
  • a magnitude whose flux a float64 cannot hold: too bright, past the largest, or too faint, below the least normal, where it would lose its digits
  • an error whose flux error a float64 cannot hold

A magnitude that is not a number, or is either infinity, gives a flux outside that range, and an error that is not a number is not at least nothing, so they are refused with them.

func (*Survey) String

func (survey *Survey) String() string

String is the survey's name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL