Skip to content
Snippets Groups Projects
Commit 2197aa01 authored by Leo Singer's avatar Leo Singer
Browse files

Remove sys.exit()

Library code should not call exit.
parent f4ca4c33
No related branches found
No related tags found
1 merge request!27Remove sys.exit()
Pipeline #107745 passed
......@@ -16,11 +16,8 @@ def compute_isco(chi_bh):
returns the innermost stable circular orbit radius normalized by the mass
of the BH.
'''
try:
assert np.all([np.abs(chi_bh) <= 1.0])
except AssertionError:
print('|chi1| must be less than 1.0')
sys.exit(1)
if not np.all([np.abs(chi_bh) <= 1.0]):
raise ValueError('|chi1| must be less than 1.0')
Z1 = 1.0 + ((1.0 - chi_bh**2)**(1./3.))*((1 + chi_bh)**(1./3.) +
(1 - chi_bh)**(1./3.))
Z2 = np.sqrt(3*chi_bh**2 + Z1**2)
......
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