REVIEW: ejecta and lightcurve predictions
Overview
Note: the MR is from branch add_gwlc_new
- Component mass distributions
- Input component mass posterior samples
- EoS draws for each component mass pair
- Calculation of ejecta quantities
- Calculation of lightcurves
- Data products: ejecta, lightcurves, hasRemant
The lightcurve_predictions function in ligo/em_bright/lightcurves/calc_lightcurves.py
will do the following, starting with either types of input in 1.
- Start with component mass injections/posterior samples or you can choose to draw them from one of the distributions found in
ligo/em_bright/lightcurves/mass_distributions.py
. - Calculate ejecta quantities for the specified number of EoS's. EoS draws are equally weighted and from Phil's Zenodo release This results in a number of samples equal to (# of component mass pairs) * (# of EoS draws).
- Calculate lightcurves for each of these samples based on the desired model (Bu2019inc)
- Return the complete set of samples and hasRemnant (from 0 to 1, probability of having an ejecta > 1e-3) so we report the desired data products: ejecta estimate percentiles, peak magnitude percentiles, hasRemnant. Note, as things stand, the percentiles will be a part of the gwcelery function to execute this code, they will not be found here.
Component Mass distributions
The functions for the distributions are defined here in ligo/em_bright/lightcurves/mass_distributions.py
. Specific workings for the normalized distributions can be found here in ligo/em_bright/lightcurves/lightcurve_utils.py
. When calling these distributions you simply specify the number of draws desired. The lightcurve_predictions function in ligo/em_bright/lightcurves/calc_lightcurves.py
can be run by passing the distribution and number of component mass pairs to draw, where it will call the initial_mass_draws function to carry out the draws.
Input component mass posterior samples
The lightcurve_predictions function in ligo/em_bright/lightcurves/calc_lightcurves.py
can also be run by passing in arrays of the component masses (m1: larger mass, m2: smaller mass) and inclination angles (thetas)
EoS draws for each component mass pair
EoS draws found here: ligo/em_bright/data/LCEHL_EOS_posterior_samples_PSR+GW_slice.h5
. This is a slice from the Zenodo release that contains what we need. The eos_samples function in ligo/em_bright/lightcurves/calc_lightcurves.py
draws the specified number of EoS's (50, as of now) to be used for each component mass pair. As mentioned above, this results in a number of samples equal to (# of component mass pairs) * (# of EoS draws).
Calculation of ejecta quantities
The run_eos function in ligo/em_bright/lightcurves/calc_lightcurves.py
takes the EoS draws for each sample and calculates the ejecta quantities (mass ejecta, wind ejecta, dynamical ejecta, etc) for each sample. This is done using fits from gwemlightcurves.
Calculation of lightcurves
The ejecta_to_lightcurves function in ligo/em_bright/lightcurves/calc_lightcurves.py
uses the model function and the Bu2019inc model, both from gwemlightcurves, to calculate the lightcurves.
Data products: ejecta, lightcurves, hasRemant The complete set of samples and hasRemnant (from 0 to 1, probability of having an ejecta > 1e-3) are returned by the lightcurve_prediction function so that the desired data products can be calculated. We plan to report: ejecta estimate percentiles, peak magnitude percentiles, and hasRemnant.
Checklist (Potential things to check)
-
Draws from component mass distributions -
Able to input component mass posterior samples -
Draw EoS's and apply to each component mass pair -
Calculation of ejecta quantities -
Calculation of lightcurves -
Output desired data products: ejecta, lightcurves, hasRemant