Spectral Energy Distribution (SED) Class¶
The SED class is documented below:
- class piscola.sed_class.SEDTemplate(z=0.0, ra=None, dec=None, template='csp')¶
Spectral energy distribution (SED) class.
This is used for correcting a supernova’s multi-colout light curves.
- apply_extinction(scaling=0.86, reddening_law='fitzpatrick99', r_v=3.1, ebv=None)¶
Applies Milky-Way extinction to the SED template if not already applied.
- Parameters:
scaling (float, default
0.86) – Calibration of the Milky Way dust maps. Either0.86for the Schlafly & Finkbeiner (2011) recalibration or1.0for the original dust map of Schlegel, Fikbeiner & Davis (1998).reddening_law (str, default
fitzpatrick99) – Reddening law. The options are:ccm89(Cardelli, Clayton & Mathis 1989),odonnell94(O’Donnell 1994),fitzpatrick99(Fitzpatrick 1999),calzetti00(Calzetti 2000) andfm07(Fitzpatrick & Massa 2007 with \(R_V = 3.1\).)r_v (float, default
3.1) – Total-to-selective extinction ratio (\(R_V\))ebv (float, default
None) – Colour excess (\(E(B-V)\)). If given, this is used instead of the dust map value.
- calculate_obs_lightcurves(filters, bands=None, scaling=0.86, reddening_law='fitzpatrick99', r_v=3.1, ebv=None)¶
Calculates the multi-colour light curves of the SED as if it were observed by a telescope.
- Parameters:
filters (MultiFilters) – Filters for integrating flux.
bands (list-like) – Bands to use.
scaling (float, default
0.86) – Calibration of the Milky Way dust maps. Either0.86for the Schlafly & Finkbeiner (2011) recalibration or1.0for the original dust map of Schlegel, Fikbeiner & Davis (1998).reddening_law (str, default
fitzpatrick99) – Reddening law. The options are:ccm89(Cardelli, Clayton & Mathis 1989),odonnell94(O’Donnell 1994),fitzpatrick99(Fitzpatrick 1999),calzetti00(Calzetti 2000) andfm07(Fitzpatrick & Massa 2007 with \(R_V\) = 3.1.)r_v (float, default
3.1) – Total-to-selective extinction ratio (\(R_V\))ebv (float, default
None) – Colour excess (\(E(B-V)\)). If given, this is used instead of the dust map value.
- calculate_rest_lightcurves(filters)¶
Calculates rest-frame, corrected light curves of the SED.
- Parameters:
filters (list-like) – Filters to use.
- correct_extinction()¶
Corrects for Milky-Way extinction to the SED template if not already corrected.
The same parameters used to apply extinction are used to correct it.
- deredshift()¶
De-redshifts the SED template if not already de-redshifted.
- get_phase_data(phase, include_err=False)¶
Extracts the SED data for a given phase.
The phase is given by the epochs of the SED template.
- Parameters:
phase (int or float) – Phase of the SED.
include_err (bool, default
False) – Whether or not to include uncertainties.
- Returns:
wave (array-like) – SED’s wavelength range at the given phase.
flux (array-like) – SED’s flunx density at the given phase.
flux_err (array-like) – Associated uncertainty in flux density. Only returned if
include_err==True.
- mask_sed(min_phase=None, max_phase=None, min_wave=None, max_wave=None)¶
Masks the SED phase and wavelength coverage.
Both the minimum and maximum in time or wavenlength need to be given to mask the SED.
- Parameters:
min_phase (float, default
None) – Minimum phase to include.max_phase (float, default
None) – Maximum phase to include.min_wave (float, default
None) – Minimum wavelength to include.max_wave (float, default
None) – Maximum wavelength to include.
- plot_sed(phase=0.0)¶
Plots the SED template at the given phase.
The SED is shown at its current state, e.g. redshifted and/or extincted.
- Parameters:
phase (int or float) – Phase of the SED.
- redshift()¶
Redshifts the SED template if not already redshifted.
- piscola.sed_class.show_available_templates()¶
Prints all the available SED templates in the
templatesdirectory.