This is an old revision of the document!


Injections using NMMA

Injections files

For a parameter estimation run on simulated data (i.e., when no observational data is available), an injection-file line is required in your config.ini-file pointing a dat or json injection file. The injection file itself contains a list of values for each source parameter (such as masses, spins, distance etc.) and is used to generate a gravitational-wave signal for a particular source (e.g. Binary Neutron Star).

Generating injections files

To generate an injection file, NMMA provides the command-line utility nmma_create_injection. This generates a json style injection file by drawing from a prior file. The prior need not be the same prior used for analysis. An example of a prior file called bns.prior for binary neutron star systems with aligned spins is given below:

mass_1 = Uniform(name='mass_1', minimum=1., maximum=2.)
mass_2 = Uniform(name='mass_2', minimum=1., maximum=2.)
chi_1 = bilby.gw.prior.AlignedSpin(name='chi_1', a_prior=Uniform(minimum=0, maximum=0.05))
chi_2 = bilby.gw.prior.AlignedSpin(name='chi_2', a_prior=Uniform(minimum=0, maximum=0.05))
luminosity_distance = bilby.gw.prior.UniformComovingVolume(name='luminosity_distance', minimum=10, maximum=100, unit='Mpc', latex_label='$d_L$')
dec =  Cosine(name='dec', boundary='reflective')
ra =  Uniform(name='ra', minimum=0, maximum=2 * np.pi, boundary='periodic')
cos_theta_jn = Uniform(name='cos_theta_jn', minimum=-1, maximum=1)
psi = Uniform(name='psi', minimum=0, maximum=np.pi, boundary='periodic')
phase = Uniform(name='phase', minimum=0, maximum=2 * np.pi, boundary='periodic')

Running the command

nmma_create_injection --prior-file bns.prior -n 10 -s 42 --eos-file <EOSdata.dat> --binary-type BNS -e json -f <injection_bns> --duration 128
Last modified: le 2022/02/03 13:21