Skip to content
Snippets Groups Projects
Commit 847b8852 authored by Colm Talbot's avatar Colm Talbot
Browse files

Test whether spin magnitude is zero in conversion

parent 8c3d1d2e
No related branches found
No related tags found
1 merge request!731Resolve "Aligned spin conversion fails when secondary spin is zero."
Pipeline #103253 passed
......@@ -56,7 +56,7 @@ def luminosity_distance_to_comoving_distance(distance, cosmology=None):
def bilby_to_lalsimulation_spins(
theta_jn, phi_jl, tilt_1, tilt_2, phi_12, a_1, a_2, mass_1, mass_2,
reference_frequency, phase):
if tilt_1 in [0, np.pi] and tilt_2 in [0, np.pi]:
if (a_1 == 0 or tilt_1 in [0, np.pi]) and (a_2 == 0 or tilt_2 in [0, np.pi]):
spin_1x = 0
spin_1y = 0
spin_1z = a_1 * np.cos(tilt_1)
......
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