lightcurvelynx.models.basic_models
A collection of toy models that are primarily used for testing.
Classes
A model with a constant SED over both wavelength and time. |
|
A static model that is on for a fixed amount of time. |
|
A model that emits a sine wave: |
|
A model that emits flux as a linear function of wavelength |
Module Contents
- class ConstantSEDModel(brightness, **kwargs)[source]
Bases:
lightcurvelynx.models.physical_model.SEDModelA model with a constant SED over both wavelength and time.
Parameterized values include:
brightness - The inherent brightness
dec - The object’s declination in degrees. [from BasePhysicalModel]
distance - The object’s luminosity distance in pc. [from BasePhysicalModel]
ra - The object’s right ascension in degrees. [from BasePhysicalModel]
redshift - The object’s redshift. [from BasePhysicalModel]
t0 - No effect for static model. [from BasePhysicalModel]
- Parameters:
brightness (float) – The inherent brightness
**kwargs (dict, optional) – Any additional keyword arguments.
- compute_sed(times, wavelengths, graph_state, **kwargs)[source]
Draw effect-free observations for this object.
- Parameters:
times (numpy.ndarray) – A length T array of rest frame timestamps.
wavelengths (numpy.ndarray, optional) – A length N array of wavelengths (in angstroms).
graph_state (GraphState) – An object mapping graph parameters to their values.
**kwargs (dict, optional) – Any additional keyword arguments.
- Returns:
flux_density – A length T x N matrix of SED values (in nJy).
- Return type:
numpy.ndarray
- class StepModel(brightness, t1, **kwargs)[source]
Bases:
ConstantSEDModelA static model that is on for a fixed amount of time.
Parameterized values include:
brightness - The inherent brightness
dec - The object’s declination in degrees. [from BasePhysicalModel]
distance - The object’s luminosity distance in pc. [from BasePhysicalModel]
ra - The object’s right ascension in degrees. [from BasePhysicalModel]
redshift - The object’s redshift. [from BasePhysicalModel]
t0 - The time the step function starts, in MJD.
t1- The time the step function ends, in MJD.
- Parameters:
brightness (float) – The inherent brightness
t0 (float) – The time the step function starts, in MJD.
t1 (float) – The time the step function ends, in MJD.
**kwargs (dict, optional) – Any additional keyword arguments.
- compute_sed(times, wavelengths, graph_state, **kwargs)[source]
Draw effect-free observations for this object.
- Parameters:
times (numpy.ndarray) – A length T array of rest frame timestamps.
wavelengths (numpy.ndarray, optional) – A length N array of wavelengths (in angstroms).
graph_state (GraphState) – An object mapping graph parameters to their values.
**kwargs (dict, optional) – Any additional keyword arguments.
- Returns:
flux_density – A length T x N matrix of SED values (in nJy).
- Return type:
numpy.ndarray
- class SinWaveModel(*, brightness=0.0, amplitude=0.0, frequency=1.0, **kwargs)[source]
Bases:
lightcurvelynx.models.physical_model.SEDModelA model that emits a sine wave:
flux = brightness + amplitude * sin(2 * pi * frequency * (time - t0))
Parameterized values include:
brightness - The inherent brightness
frequency - The frequence of the sine wave.
dec - The object’s declination in degrees. [from BasePhysicalModel]
distance - The object’s luminosity distance in pc. [from BasePhysicalModel]
ra - The object’s right ascension in degrees. [from BasePhysicalModel]
redshift - The object’s redshift. [from BasePhysicalModel]
t0 - The start of the sine wave’s period. [from BasePhysicalModel]
- Parameters:
brightness (float) – The inherent brightness. Default: 0.0
amplitude (float) – The amplitude of the sine wave. Default: 0.0
frequency (float) – The frequency of the sine wave. Default: 1.0
**kwargs (dict, optional) – Any additional keyword arguments.
- compute_sed(times, wavelengths, graph_state, **kwargs)[source]
Draw effect-free observations for this object.
- Parameters:
times (numpy.ndarray) – A length T array of rest frame timestamps.
wavelengths (numpy.ndarray, optional) – A length N array of wavelengths (in angstroms).
graph_state (GraphState) – An object mapping graph parameters to their values.
**kwargs (dict, optional) – Any additional keyword arguments.
- Returns:
flux_density – A length T x N matrix of SED values (in nJy).
- Return type:
numpy.ndarray
- class LinearWavelengthModel(linear_base, linear_scale, min_wave=None, max_wave=None, **kwargs)[source]
Bases:
lightcurvelynx.models.physical_model.SEDModelA model that emits flux as a linear function of wavelength (that is constant over time):
f(t, w) = scale * w + base.
Includes optional minimum and maximum wavelength bounds to test extrapolation.
Parameterized values include:
linear_base - The base brightness in nJy.
linear_scale - The slope of the linear function in nJy/Angstrom.
dec - The object’s declination in degrees. [from BasePhysicalModel]
distance - The object’s luminosity distance in pc. [from BasePhysicalModel]
ra - The object’s right ascension in degrees. [from BasePhysicalModel]
redshift - The object’s redshift. [from BasePhysicalModel]
t0 - No effect for static model. [from BasePhysicalModel]
- min_wave[source]
The minimum wavelength of the model (in angstroms). Or None if there is no minimum wavelength.
- Type:
float or None
- max_wave[source]
The maximum wavelength of the model (in angstroms). Or None if there is no maximum wavelength.
- Type:
float or None
- Parameters:
linear_base (parameter) – The base brightness in nJy.
linear_scale (parameter) – The slope of the linear function in nJy/Angstrom.
min_wave (float or None) – The minimum wavelength of the model (in angstroms). Or None if there is no minimum wavelength.
max_wave (float or None) – The maximum wavelength of the model (in angstroms). Or None if there is no maximum wavelength.
**kwargs (dict, optional) – Any additional keyword arguments.
- minwave(graph_state=None)[source]
Get the minimum wavelength of the model.
- Parameters:
graph_state (GraphState, optional) – An object mapping graph parameters to their values. Not used for this model.
- Returns:
minwave – The minimum wavelength of the model (in angstroms) or None if the model does not have a defined minimum wavelength.
- Return type:
float or None
- maxwave(graph_state=None)[source]
Get the maximum wavelength of the model.
- Parameters:
graph_state (GraphState, optional) – An object mapping graph parameters to their values. Not used for this model.
- Returns:
maxwave – The maximum wavelength of the model (in angstroms) or None if the model does not have a defined maximum wavelength.
- Return type:
float or None
- compute_sed(times, wavelengths, graph_state, **kwargs)[source]
Draw effect-free observations for this object.
- Parameters:
times (numpy.ndarray) – A length T array of rest frame timestamps.
wavelengths (numpy.ndarray, optional) – A length N array of wavelengths (in angstroms).
graph_state (GraphState) – An object mapping graph parameters to their values.
**kwargs (dict, optional) – Any additional keyword arguments.
- Returns:
flux_density – A length T x N matrix of SED values (in nJy).
- Return type:
numpy.ndarray