lightcurvelynx.models.gopreaux_models
Wrapper classes for models constructed using the gopreaux (Gaussian process Optimized Photometric Regression of Extragalactic Archival Ultraviolet-infrared eXplosions) package.
This model requires that the GoPreaux (caat) package is installed. Currently GoPreaux is not available on PyPI, so users will need to install it from source: https://github.com/crpellegrino/gopreaux
There is a version conflict with numpy between GoPreaux and LightCurveLynx, but this does not impact the functions we need. Users can install GoPreaux first and then install LightCurveLynx (upgrading all dependencies). You will still get errors about the version requirements for caat, but they can be ignored.
Classes
A class that can load and query models constructed using the gopreaux |
Module Contents
- class GoPreauxModel(model, peak_mag5500, **kwargs)[source]
Bases:
lightcurvelynx.models.physical_model.SEDModel,citation_compass.CiteClassA class that can load and query models constructed using the gopreaux (Gaussian process Optimized Photometric Regression of Extragalactic Archival Ultraviolet-infrared eXplosions) package.
- Parameterized values include:
peak_mag5500 - Rest-frame magnitude, at zero phase and 5500 angstroms. [specific to GoPreauxModel]
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 t0 of the zero phase, date. [from BasePhysicalModel]
Additional parameterized values are used for specific gopreaux models.
References
Gaussian process Optimized Photometric Regression of Extragalactic Archival Ultraviolet-infrared eXplosions (GoPreaux):
- Parameters:
model (caat.SNModel) – The gopreaux SNModel object that defines the surface to be evaluated.
peak_mag5500 (Parameter) – Rest-frame magnitude, at zero phase and 5500 angstroms.
**kwargs (dict, optional) – Any additional keyword arguments.
- minwave(**kwargs)[source]
Get the minimum supported wavelength of the model.
- Parameters:
**kwargs (dict) – Additional keyword arguments, not used in this method.
- 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(**kwargs)[source]
Get the maximum supported wavelength of the model.
- Parameters:
**kwargs (dict) – Additional keyword arguments, not used in this method.
- Returns:
maximum – 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
- minphase(**kwargs)[source]
Get the minimum supported phase of the model in days.
- Parameters:
**kwargs (dict) – Additional keyword arguments, not used in this method.
- Returns:
minphase – The minimum phase of the model (in days) or None if the model does not have a defined minimum phase.
- Return type:
float or None
- maxphase(**kwargs)[source]
Get the maximum supported phase of the model in days.
- Parameters:
**kwargs (dict) – Additional keyword arguments, not used in this method.
- Returns:
maximum – The maximum phase of the model (in days) or None if the model does not have a defined maximum phase.
- Return type:
float or None
- classmethod load_from_fits(filename, intrinsic_brightness, **kwargs)[source]
Load the data for gopreaux.SNModel model from a .fits file and use it to create the GoPreauxModel object.
- Parameters:
filename (str, Path) – The complete path to the .fits file.
intrinsic_brightness (Parameter or callable or float) – The intrinsic brightness of the supernova at its peak and the wavelength closest to the V-band (in magnitudes). This may be provided as a fixed scalar value or as a parameterized/sampled node accepted by the constructor.
**kwargs (dict, optional) – Any additional keyword arguments to be passed to the GoPreauxModel constructor.
- compute_sed(times, wavelengths, graph_state)[source]
Draw effect-free observer frame flux densities.
- Parameters:
times (numpy.ndarray) – A length T array of observer frame timestamps in MJD.
wavelengths (numpy.ndarray) – A length N array of observer frame wavelengths (in angstroms).
graph_state (GraphState) – An object mapping graph parameters to their values.
- Returns:
flux_density – A length T x N matrix of observer frame SED values (in nJy).
- Return type:
numpy.ndarray