Skip to content

Commit

Permalink
Added SPAtmplt option in _get_imr_duration (#3540)
Browse files Browse the repository at this point in the history
* Added SPAtmplt approximant in _get_imr_duration function

* Added SPAtmplt approximant in _get_imr_duration function

* Corrected minor whitespaces and lenght issues

* Fixing codeclimate issues

* Codeclimate
  • Loading branch information
AlexisMV authored and spxiwh committed Dec 7, 2020
1 parent 56e0854 commit 79a0e22
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pycbc/pnutils.py
Original file line number Diff line number Diff line change
@@ -518,6 +518,13 @@ def _get_imr_duration(m1, m2, s1z, s2z, f_low, approximant="SEOBNRv4"):
# NB for no clear reason this function has f_low as first argument
time_length = lalsimulation.SimIMRSEOBNRv4ROMTimeOfFrequency(
f_low, m1 * lal.MSUN_SI, m2 * lal.MSUN_SI, s1z, s2z)
elif approximant == 'SPAtmplt' or approximant == 'TaylorF2':
chi = lalsimulation.SimInspiralTaylorF2ReducedSpinComputeChi(
m1, m2, s1z, s2z
)
time_length = lalsimulation.SimInspiralTaylorF2ReducedSpinChirpTime(
f_low, m1 * lal.MSUN_SI, m2 * lal.MSUN_SI, chi, -1
)
else:
raise RuntimeError("I can't calculate a duration for %s" % approximant)
# FIXME Add an extra factor of 1.1 for 'safety' since the duration

0 comments on commit 79a0e22

Please sign in to comment.