Skip to content
Snippets Groups Projects
Commit 966ad8ca authored by Wanting Niu's avatar Wanting Niu :speech_balloon:
Browse files

directly read spin1 and spin2 from sngl_inspiral_table

parent d9bced77
No related branches found
No related tags found
1 merge request!369Document the template_duration in svd_bank match to the actual waveform
Pipeline #482307 failed
......@@ -292,8 +292,8 @@ def cal_higher_f_low(template_bank_url, bank_xmldoc, flow, max_duration):
for row in bank_sngl_table:
m1_SI = lal.MSUN_SI * row.mass1
m2_SI = lal.MSUN_SI * row.mass2
spin1 = numpy.dot(row.spin1x**2 + row.spin1y**2 + row.spin1z**2, row.spin1x**2 + row.spin1y**2 + row.spin1z**2)**.5
spin2 = numpy.dot(row.spin2x**2 + row.spin2y**2 + row.spin2z**2, row.spin2x**2 + row.spin2y**2 + row.spin2z**2)**.5
spin1 = numpy.dot(row.spin1, row.spin1)**.5
spin2 = numpy.dot(row.spin2, row.spin2)**.5
f_max = min(row.f_final, 2 * chirptime.ringf(lal.MSUN_SI * row.mass1 + lal.MSUN_SI * row.mass2, chirptime.overestimate_j_from_chi(max(spin1, spin2))) if approximant in templates.gstlal_IMR_approximants else spawaveform.ffinal(row.mass1, row.mass2, 'bkl_isco'))
time_constrained_f_low.append(scipy.optimize.fsolve(time_freq_bound, x0 = flow, args = (max_duration, m1_SI, m2_SI, spin1, spin2, f_max)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment