photometry

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 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 converts magnitudes to spectral flux densities using Pogson’s scale and each survey’s published zero points. Five magnitudes correspond to a factor of one hundred: F = F0 * 100^(-m/5).

Survey data supplies band names such as W1 and W4. Callers use Photometer so catalogue-reader tests can substitute generated mocks while this package tests the conversion itself. Fluxes are available in SI (W m^-2 Hz^-1) and 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 stores spectral flux density and its uncertainty in W m^-2 Hz^-1.

func (*Flux) InJanskys

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

InJanskys returns flux density and uncertainty in janskys.

func (*Flux) InSI

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

InSI returns flux density and uncertainty in W m^-2 Hz^-1.

type Photometer

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

Photometer converts a magnitude and its uncertainty in a named band to spectral flux density.

type Survey

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

Survey stores named bands with their magnitude-zero flux densities.

func WISE

func WISE() *Survey

WISE returns the Wide-field Infrared Survey Explorer’s four bands. Vega-magnitude zero points come from its All-Sky Explanatory Supplement through the research data.

func (*Survey) Bands

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

Bands returns the survey’s band names in order.

func (*Survey) Flux

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

Flux converts a magnitude and uncertainty in a survey band using F = F0 * 100^(-m/5), with the band’s published zero point F0.

Uncertainty is propagated to first order using dF/dm = -F*ln(100)/5. That approximation suits small detection errors; uncertainty near one magnitude produces an asymmetric flux interval this type cannot express.

Unknown bands, negative or NaN uncertainty, nonfinite magnitude, and fluxes outside float64’s normal range return an error. The propagated uncertainty must also be representable.

func (*Survey) String

func (survey *Survey) String() string

String returns the survey name.

Jump to

Keyboard shortcuts

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