Magnitude conversions

galaxy.photometry.countToFlux(data: numpy.ndarray, err: numpy.ndarray, zeropoint: Union[float, numpy.ndarray]) Tuple[numpy.ndarray][source]

Code author: Hugo Plombat - LUPM <hugo.plombat@umontpellier.fr>

Convert data counts and their associated error into flux in \(\rm{erg/cm^2/s/Hz}\).

Parameters
  • data (float or ndarray[float]) – data in \(electron/s\)

  • err (float or ndarray[float]) – std errors in \(electron/s\)

  • zeropoint (float) – zeropoint associated to the data

Returns

AB magnitude and associated error

Return type

Astropy Quantity, Astropy Quantity

galaxy.photometry.countToMag(data: numpy.ndarray, err: numpy.ndarray, zeropoint: Union[float, numpy.ndarray]) Tuple[numpy.ndarray][source]

Code author: Hugo Plombat - LUPM <hugo.plombat@umontpellier.fr>

Convert data counts and their associated error into AB magnitudes using the formula

\[d [{\rm{mag}}] = -2.5 \log_{10} d [{\rm{e^{-}/s}}] + {\rm{zpt}}\]

where \(d\) is the data and \(\rm{zpt}\) is the magnitude zeropoint. The error is given by

\[\Delta d [{\rm{mag}}] = 1.08 \Delta d [{\rm{e^{-}/s}}] / d [{\rm{e^{-}/s}}]\]
Parameters
  • data (float or ndarray[float]) – data in electron/s

  • err (float or ndarray[foat]) – std errors in electron/s

  • zeropoint (float) – zeropoint associated to the data

Returns

AB magnitude and associated error

Return type

float or ndarray[float], float or ndarray[float]