uvex_transients.models.arnett.ArnettDecaySED.as_astropy_model#
- classmethod ArnettDecaySED.as_astropy_model(x_type: str = 'lambda', y_type: str = 'lambda', *, y_kind: str = 'energy', wave_unit: str | UnitBase = Unit('Angstrom'), freq_unit: str | UnitBase = Unit('Hz'), redshift: PhysicalInput | None = None, luminosity_distance: Quantity | None = None, angular_diameter_distance: Quantity | None = None, proper_distance: Quantity | None = None, cosmology: FLRW | None = None, **parameters: ParameterValue) Model#
Build an
Modelof thisSpectralModelfor a given parameter set.This method is the single entry point for converting a
SpectralModelinto a model compatible withsynphot/astropy.modeling/m4opt.synphot. Several parameters can be modified to specify exactly what type of spectral model to generate:x_type: May be either"lambda"or"nu"to control what input the model expects.y_type: May be either"lambda"or"nu". If"lambda", then \(F_\lambda\) is generated, otherwise \(F_\nu\) is generated.y_kind: May be either"energy"or"photon". If"energy", then the output is an energy-flux density (\(F_\nu\)/\(F_\lambda\)). If"photon", then the output is a photon count flux density.
Additionally, any of a number of cosmological parameters may be specified to provide the distance from the source. If any of these are provided, the model will generate a flux density. Otherwise a luminosity density is produced.
- Parameters:
x_type (
str) –"lambda"(the default) if the model’s first input is a wavelength, or"nu"if it is a frequency.y_type (
str) –"lambda"(the default) if the output is expressed per unit wavelength, or"nu"if per unit frequency.y_kind (
str) –"energy"(the default) for an energy-flux density, or"photon"for a photon-count-flux density (dividing by the photon energy \(h\nu\)).wave_unit (
strorUnitBase) – The wavelength unit used whereverx_type/y_typeis"lambda".freq_unit (
strorUnitBase) – The frequency unit used whereverx_type/y_typeis"nu".redshift (
array-likeorQuantity, optional) – If any ofredshift/luminosity_distance/angular_diameter_distance/proper_distanceis given, exactly one of them must be given; the rest (andcosmology) are as influx_log(), and the output is the observed, diluted flux. If none of the four is given, the output is the rest-frame luminosity andcosmologyis ignored.luminosity_distance (
Quantity, optional) – Seeredshiftabove.angular_diameter_distance (
Quantity, optional) – Seeredshiftabove.proper_distance (
Quantity, optional) – Seeredshiftabove.cosmology (
FLRW, optional) – Seeredshiftabove.**parameters – This model’s parameter values, either
Quantityor already unit-stripped cgs values (seeeval_log_cgs()). May carry leading batch axes.
- Returns:
Callable as
model(x, t), withx/teither bare numbers (xinwave_unit/freq_unit,tin seconds) orQuantity. Unit-attached only when at least one ofx/twas itself aQuantity(a property ofastropy.modeling.Model.__call__(), not something this method controls).- Return type:
- Raises:
ValueError – If
x_type/y_typeis not"lambda"/"nu", ify_kindis not"energy"/"photon", or ifwave_unit/freq_unitis not a wavelength/frequency unit.