lightcurvelynx.effects.basic_effects
A collection of toy effect models that are primarily used for testing.
Classes
An effect that scales the flux by a constant multiplicative amount. |
Module Contents
- class ScaleFluxEffect(flux_scale, **kwargs)[source]
Bases:
lightcurvelynx.effects.effect_model.EffectModelAn effect that scales the flux by a constant multiplicative amount.
- flux_scale
The multiplicative factor by which to scale the flux.
- Type:
parameter
- apply(flux_density, times=None, wavelengths=None, flux_scale=None, **kwargs)[source]
Apply the effect to observations (flux_density values).
- Parameters:
flux_density (numpy.ndarray) – A length T X N matrix of flux density values (in nJy).
times (numpy.ndarray, optional) – A length T array of times (in MJD). Not used for this effect.
wavelengths (numpy.ndarray, optional) – A length N array of wavelengths (in angstroms). Not used for this effect.
flux_scale (float, optional) – The multiplicative factor by which to scale the flux. Raises an error if None is provided.
**kwargs (dict, optional) – Any additional keyword arguments, including any additional parameters needed to apply the effect.
- Returns:
flux_density – A length T x N matrix of flux densities after the effect is applied (in nJy).
- Return type:
numpy.ndarray
- apply_bandflux(bandfluxes, *, times=None, filters=None, flux_scale=None, **kwargs)[source]
Apply the effect to band fluxes.
- Parameters:
bandfluxes (numpy.ndarray) – A length T array of band fluxes (in nJy).
times (numpy.ndarray, optional) – A length T array of times (in MJD).
filters (numpy.ndarray, optional) – A length N array of filters. If not provided, the effect is applied to all band fluxes.
flux_scale (float, optional) – The multiplicative factor by which to scale the flux. Raises an error if None is provided.
**kwargs (dict, optional) – Any additional keyword arguments, including any additional parameters needed to apply the effect.
- Returns:
bandfluxes – A length T array of band fluxes after the effect is applied (in nJy).
- Return type:
numpy.ndarray