lightcurvelynx.astro_utils.mag_flux

Flux-magnitude conversion utilities.

Attributes

MAG_AB_ZP_NJY

Classes

Mag2FluxNode

A wrapper class for the mag2flux() function.

Flux2MagNode

A wrapper class for the flux2mag() function.

Functions

mag2flux(→ numpy.typing.ArrayLike)

Convert AB magnitude to bandflux in nJy

flux2mag(→ numpy.typing.ArrayLike)

Convert bandflux in nJy to AB magnitude

Module Contents

MAG_AB_ZP_NJY = 31.4[source]
mag2flux(mag: numpy.typing.ArrayLike) numpy.typing.ArrayLike[source]

Convert AB magnitude to bandflux in nJy

Parameters:

mag (ndarray of float) – The magnitude to convert to bandflux.

Returns:

bandflux – The bandflux corresponding to the input magnitude.

Return type:

ndarray of float

flux2mag(flux_njy: numpy.typing.ArrayLike) numpy.typing.ArrayLike[source]

Convert bandflux in nJy to AB magnitude

Parameters:

flux_njy (ndarray of float) – The bandflux to convert to magnitude.

Returns:

mag – The magnitude corresponding to the input bandflux.

Return type:

ndarray of float

class Mag2FluxNode(mag, **kwargs)[source]

Bases: lightcurvelynx.base_models.FunctionNode

A 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.FunctionNode

A 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.