Inference of electromagnetic signals

NMMA enables to perform parameter estimation in different electromagnetic regimes such as for kilonovae and gamma-ray burst afterglows. Similarly to light curve generation, the following models are available for kilonova inference: Bu2019nsbh (BH-NS model), Bu2019lm (BNS model), Me2017 (BNS model), and Ka2017 (BNS model).

Kilonovae

Example: Me2017 Model

At first, a number of BNS injections based on a specific EOS and prior can be compiled by using:

nmma_create_injection --prior-file priors/Me2017.prior --eos-file example_files/eos/ALF2.dat --binary-type BNS --n-injection 100 --original-parameters --extension json

This generates a file called injection.json that includes an injection file drawn from the prior file with a number of injections specified by –n-injection. The injection file generated for a certain kilonova model, (see also here) can be used to start a Bayesian inference analysis for kilonovae. The Bayesian inference can be started using:

light_curve_analysis --model Me2017 --svd-path ./svdmodels --interpolation_type sklearn_gp --outdir outdir --label injection --prior priors/Me2017.prior --tmin 0.1 --tmax 20 --dt 0.5 --error-budget 1 --nlive 512 --Ebv-max 0 --injection ./injection.json --injection-num 0 --injection-outfile outdir/lc.csv --generation-seed 42 --filters u,g,r,i,z,y,J,H,K --plot --remove-nondetections

A result of obtained posteriors is shown below:

Example: Bu2019lm Model

In order to perform parameter estimation with observational data, a prior as well as observational data are required. In this example, we use the Bu2019lm model to perform Bayesian inference on the observed kilonova event AT2017gfo. The prior for this event is shown below, whereas the observational data can be found here:

luminosity_distance = 40
KNphi = Uniform(name='KNphi', minimum=15., maximum=75., latex_label='$\Phi$')
inclination_EM = Sine(name='inclination_EM', minimum=0., maximum=np.pi/2., latex_label='$\\iota$')
KNtimeshift = 0.
log10_mej_dyn  = Uniform(name='log10_mej_dyn', minimum=-3., maximum=-1., latex_label='$\\log_{10}M^{\\rm{dyn}}_{\\rm{ej}}$')
log10_mej_wind = Uniform(name='log10_mej_wind', minimum=-3., maximum=-1, latex_label='$\\log_{10}M^{\\rm{wind}}_{\\rm{ej}}$')

As for the light curve generation, the Bu2019lm model requires a SVD grid as input and can be found here. Eventually, the Bayesian inference for kilonova observational data can then be started using:

mpiexec -np 16 light_curve_analysis --model Bu2019lm --svd-path nmma/svdmodels/ --interpolation_type sklearn_gp --outdir outdir --label AT2017gfo_Bu2019lm --trigger-time 57982.5285236896 --data ./AT2017gfo.dat --prior ./AT2017gfo.prior --tmin 0 --tmax 14 --dt 0.1 --error-budget 1 --nlive 1024 --Ebv-max 0

A result plot could look like the example shown below:

Gamma-ray burst afterglows

Example: TrPi2018 Model

Similar to the kilonova inference for the observed event AT2017gfo, parameter estimation can be performed for gamma-ray burst afterglow light curves. In this example, we use the TrPi2018 model to perform Bayesian inference on the observed GRB event GRB170817A. The prior GRB170817A for this event is shown below, whereas the observational data file GRB170817A.dat can be found here:

luminosity_distance = 44
KNtimeshift = 0.
inclination_EM = Sine(name='inclination_EM', minimum=0, maximum=np.pi / 2, latex_label='$\\iota$')
log10_E0 = Uniform(name='log10_E0', minimum=48, maximum=60, latex_label='$\\log_{10}E_{0}$')
thetaCore = Uniform(name='thetaCore', minimum=0.01, maximum=np.pi / 2, latex_label='$\\theta_{c}$')
thetaWing = Uniform(name='thetaWing', minimum=0.01, maximum=np.pi / 2, latex_label='$\\theta_{w}$')
log10_n0 = Uniform(name='log10_n0', minimum=-20, maximum=0, latex_label='$\\log_{10}n_{0}$')
p = Uniform(name='p', minimum=2, maximum=5., latex_label='$p$')
log10_epsilon_e = Uniform(name='log10_epsilon_e', minimum=-4, maximum=0, latex_label='$\\log_{10}\\epsilon_{e}$')
log10_epsilon_B = Uniform(name='log10_epsilon_B', minimum=-5, maximum=0, latex_label='$\\log_{10}\\epsilon_{B}$')

The Bayesian inference for an observed GRB afterglow event can be started as follows:

mpiexec -np 16 light_curve_analysis --model TrPi2018 --outdir outdir --label GRB170817A_TrPi2018 --trigger-time 57982.5285236896 --data ./GRB170817A.dat --prior ./GRB170817A.prior --tmin 1 --tmax 950 --dt 1 --nlive 1024 --grb-resolution 12 --error-budget 1 --Ebv-max 0 --seed 12345 

Last modified: le 2023/06/10 18:58