target.kilonova#
This module provides the Kilonovae class, a pre-defined Transient class. See the corresponding documentation page in “List of transient classes” for more detail on this Transient class.
- skysurvey.target.kilonova.read_possis_file(filename)[source]#
Read in a spectral model created by POSSIS (1906.04205).
This is as appropriate for injestion as a skysurvey.source.angular.AngularTimeSeriesSource. Model grids can be found here: mbulla/kilonova_models.
- Parameters:
filename (str) – Path to the POSSIS file.
- Returns:
phase (numpy.ndarray) – Phases in days.
wave (numpy.ndarray) – Wavelengths in Angstroms.
cos_theta (numpy.ndarray) – Cosine of viewing angle.
flux (numpy.ndarray) – Model spectral flux density in arbitrary units. Must have shape (num_phases).
- skysurvey.target.kilonova.get_kilonova_model(filename=None)[source]#
Get a kilonova model from a POSSIS file.
- Parameters:
filename (str, optional) – Path to the POSSIS file. If None, it loads the default data file:
nsns_nph1.0e+06_mejdyn0.020_mejwind0.130_phi30.txt.- Returns:
The initialized kilonova model with an angular-dependent source.
- Return type:
sncosmo.Model
- class skysurvey.target.kilonova.Kilonova[source]#
Bases:
TransientA class to model kilonovae.
- Parameters:
_KIND (str, optional) – The kind of transient. The default is “kilonova”.
_TEMPLATE (sncosmo.Model, optional) – The template to use. The default is a sncosmo.Model with a skysurvey.source.angular.AngularTimeSeriesSource source.
_RATE (float, optional) – The rate of kilonovae. The default is 1e3.
_MODEL (dict, optional) –
The model to use. The default is a dictionary with the following keys:
t0: The time of maximum of the kilonova.
redshift: The redshift of the kilonova.
magabs: The absolute magnitude of the kilonova.
magobs: The observed magnitude of the kilonova.
amplitude: The amplitude of the kilonova.
theta: The viewing angle of the kilonova.
radec: The ra and dec of the kilonova.