# Astronomical Functions¶

## Magnitude and Flux Calculations¶

`aotools.astronomy.``flux_to_magnitude`(flux, waveband='V')[source]

Converts incident flux of photons to the apparent magnitude

Parameters: flux (float) – Number of photons received from an object per second per meter squared waveband (string) – Waveband of the measured flux, can be U, B, V, R, I, J, H, K, g, r, i, z Apparent magnitude float
`aotools.astronomy.``magnitude_to_flux`(magnitude, waveband='V')[source]

Converts apparent magnitude to a flux of photons

Parameters: magnitude (float) – Star apparent magnitude waveband (string) – Waveband of the stellar magnitude, can be U, B, V, R, I, J, H, K, g, r, i, z Number of photons emitted by the object per second per meter squared float
`aotools.astronomy.``photons_per_band`(mag, mask, pxlScale, expTime, waveband='V')[source]

Calculates the photon flux for a given aperture, star magnitude and wavelength band

Parameters: mag (float) – Star apparent magnitude mask (ndarray) – 2-d pupil mask array, 1 is transparent, 0 opaque pxlScale (float) – size in metres of each pixel in mask expTime (float) – Exposure time in seconds waveband (string) – Waveband number of photons float
`aotools.astronomy.``photons_per_mag`(mag, mask, pixel_scale, wvlBand, exposure_time)[source]

Calculates the photon flux for a given aperture, star magnitude and wavelength band

Parameters: mag (float) – Star apparent magnitude mask (ndarray) – 2-d pupil mask array, 1 is transparent, 0 opaque pixel_scale (float) – size in metres of each pixel in mask wvlBand (float) – length of wavelength band in nanometres exposure_time (float) – Exposure time in seconds number of photons float