Photometry related fonctions#
Code author: Hugo Plombat - LUPM <hugo.plombat@umontpellier.fr> & Wilfried Mercier - IRAP/LAM <wilfried.mercier@lam.fr> & Maxime Tarrasse - IRAP <Maxime.Tarrasse@irap.omp.eu>
Photometry functions.
- pixSED.photometry.FluxToCount(flux: Union[float, ndarray, Quantity], eflux: Union[float, ndarray, Quantity], zeropoint: float) Tuple[Union[float, ndarray], Union[float, ndarray]] [source]#
Code author: Hugo Plombat - LUPM <hugo.plombat@umontpellier.fr> & Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
Convert flux values and their associated error into dta count in \(\rm{e^{-}/s}\).
- Parameters:
flux (
float
, ndarray [float
] or Astropy Quantity) – flux in \(\rm{erg/cm^2/s/Hz}\). If provided as an Astropy Quantity it will be parsed to this unit.eflux (
float
, ndarray [float
] or Astropy Quantity) – std errors in \(\rm{erg/cm^2/s/Hz}\). If provided as an Astropy Quantity it will be parsed to this unit.zeropoint (
float
) – zeropoint associated to the data
- Returns:
data count in \(\rm{e^{-}/s}\) and associated error
- Return type:
- pixSED.photometry.MagTocount(mag: Union[float, ndarray], emag: Union[float, ndarray], zeropoint: float) Tuple[Union[float, ndarray], Union[float, ndarray]] [source]#
Code author: Maxime Tarrasse - IRAP <Maxime.Tarrasse@irap.omp.eu>
Converts magnitudes and their associated error into data counts and their associated errors.
- Parameters:
:returns : data in \(\rm{e^{-}/s}\) and associated errors :rtype: (
float
or ndarray [float
],float
or ndarray [float
])
- pixSED.photometry.countToFlux(data: Union[float, ndarray], err: Union[float, ndarray], zeropoint: float) Tuple[Quantity, Quantity] [source]#
Code author: Hugo Plombat - LUPM <hugo.plombat@umontpellier.fr> & Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
Convert data counts and their associated error into flux in \(\rm{erg/cm^2/s/Hz}\).
- Parameters:
- Returns:
flux in \(\rm{erg/cm^2/s/Hz}\) and associated error
- Return type:
- pixSED.photometry.countToMag(data: Union[float, ndarray], err: Union[float, ndarray], zeropoint: float) Tuple[Union[float, ndarray], Union[float, ndarray]] [source]#
Code author: Hugo Plombat - LUPM <hugo.plombat@umontpellier.fr> & Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
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}}]\]