lightcurvelynx.effects.white_noise

Classes

WhiteNoise

A white noise model.

Module Contents

class WhiteNoise(white_noise_sigma, **kwargs)[source]

Bases: lightcurvelynx.effects.effect_model.EffectModel

A white noise model.

white_noise_sigma

The scale of the noise.

Type:

parameter

apply(flux_density, times=None, wavelengths=None, white_noise_sigma=None, white_noise_seed=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.

  • white_noise_sigma (float, optional) – The scale of the noise. Raises an error if None is provided.

  • white_noise_seed (int, optional) – The seed for the random number generator. If None, a random seed is used.

  • **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, white_noise_sigma=None, white_noise_seed=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.

  • white_noise_sigma (float, optional) – The scale of the noise. Raises an error if None is provided.

  • white_noise_seed (int, optional) – The seed for the random number generator. If None, a random seed is used.

  • **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