2Class for NRSur3dq8Remnant model for the remnant mass, spin and kick velocity
3for nonprecessing BBH systems. This model was called surfinBH3dq8 in the paper.
9import lalsimulation
as lalsim
12from .nrfits
import NRFits
16 Class for NRSur3dq8Remnant model
for the remnant mass, spin
and kick
17 velocity
for nonprecessing BBH systems. This model was called surfinBH3dq8
20 Paper: arxiv:1809.09125. The model
is referred to
as surfinBH3dq8
in the
23 Parameter ranges
for usage: \n
25 \f$\chi_{1z}, \chi_{2z}\f$ = [-0.91, 0.91] \n
28 \f$\chi_{1z}, \chi_{2z}\f$ = [-0.81, 0.81]
30 Training parameter ranges: \n
32 \f$\chi_{1z}, \chi_{2z}\f$ = [-0.81, 0.81]
34 But extrapolates reasonably to the above mass ratios
and spins. However,
35 if a guarantee of accuracy
is required, this model should be used within
36 the training parameter range.
40 def _get_fit_params(self, m1, m2, chiA_vec, chiB_vec, f_ref,
42 """ No processing or spin evolution is required here, just returns the
43 mass ratio, total mass and spins along the z-direction.
45 See eval_fits.eval_nrfit()
for the definitions of the arguments of
60 raise ValueError(
"This model only works for f_ref=-1.")
63 fit_params = [q, chiA_vec[2], chiB_vec[2]]
67 def _eval_fit(self, fit_params, fit_type, extra_params_dict):
68 """ Evaluates a particular fit for NRSur3dq8Remnant using the fit_params
69 returned by _get_fit_params().
71 q, chiAz, chiBz = fit_params
72 LALParams = lal.CreateDict()
73 if extra_params_dict[
"unlimited_extrapolation"]:
74 lal.DictInsertUINT4Value(LALParams,
"unlimited_extrapolation", 1)
76 if fit_type ==
"FinalMass":
78 val = lalsim.NRSur3dq8Remnant(q, chiAz, chiBz,
"mf", LALParams)
79 elif fit_type ==
"FinalSpin":
81 chifz = lalsim.NRSur3dq8Remnant(q, chiAz, chiBz,
"chifz", LALParams)
83 elif fit_type ==
"RecoilKick":
85 vfx = lalsim.NRSur3dq8Remnant(q, chiAz, chiBz,
"vfx", LALParams)
86 vfy = lalsim.NRSur3dq8Remnant(q, chiAz, chiBz,
"vfy", LALParams)
89 raise ValueError(
"Invalid fit_type=%s. This model only allows "
90 "'FinalMass', 'FinalSpin' and 'RecoilKick'."%fit_type)
92 return np.atleast_1d(val)
Class for NRSur3dq8Remnant model for the remnant mass, spin and kick velocity for nonprecessing BBH s...
Base class for Numerical Relativity fits such as remnant BH mass, spin, etc.