lightcurvelynx.astro_utils.mag_flux
Flux-magnitude conversion utilities.
Attributes
Classes
A wrapper class for the mag2flux() function. |
|
A wrapper class for the flux2mag() function. |
Functions
|
Convert AB magnitude to bandflux in nJy. |
|
Convert bandflux in nJy to AB magnitude |
Module Contents
- mag2flux(mag: numpy.typing.ArrayLike, mag_err: numpy.typing.ArrayLike = None) numpy.typing.ArrayLike[source]
Convert AB magnitude to bandflux in nJy.
- Parameters:
mag (ndarray of float) – The magnitude to convert to bandflux.
mag_err (ndarray of float, optional) – The magnitude error to convert to bandflux error.
- Returns:
bandflux (ndarray of float) – The bandflux corresponding to the input magnitude.
bandflux_err (ndarray of float, optional) – The bandflux error corresponding to the input magnitude error. Only returned if
mag_erris provided (not None), making the return value a tuple(bandflux, bandflux_err).
- flux2mag(flux_njy: numpy.typing.ArrayLike, flux_err_njy: numpy.typing.ArrayLike = None) numpy.typing.ArrayLike[source]
Convert bandflux in nJy to AB magnitude
- Parameters:
flux_njy (ndarray of float) – The bandflux to convert to magnitude.
flux_err_njy (ndarray of float, optional) – The bandflux error to convert to magnitude error.
- Returns:
mag (ndarray of float) – The magnitude corresponding to the input bandflux.
mag_err (ndarray of float) – The magnitude error corresponding to the input bandflux error. Only returned if flux_err_njy is provided(not None), making the return value a tuple (mag, mag_err).
- class Mag2FluxNode(mag, **kwargs)[source]
Bases:
lightcurvelynx.base_models.FunctionNodeA wrapper class for the mag2flux() function.
- Parameters:
mag (ndarray of float) – The magnitude to convert to bandflux.
**kwargs (dict, optional) – Any additional keyword arguments.
- class Flux2MagNode(flux_njy, **kwargs)[source]
Bases:
lightcurvelynx.base_models.FunctionNodeA wrapper class for the flux2mag() function.
- Parameters:
flux_njy (float or array-like) – The flux in nJy to convert to magnitude.
**kwargs (dict, optional) – Any additional keyword arguments.