Skip to content

Commit

Permalink
fix bug when calling ESAOrbits without lisatools
Browse files Browse the repository at this point in the history
  • Loading branch information
acorreia61201 committed Jul 12, 2024
1 parent 8a8b733 commit eb73c29
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pycbc/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ class LISA_detector(object):
"""
LISA-like GW detector. Applies detector response from FastLISAResponse.
"""
def __init__(self, detector='LISA', reference_time=None, orbits=ESAOrbits(), use_gpu=False, t0=10000.):
def __init__(self, detector='LISA', reference_time=None, orbits=None, use_gpu=False, t0=10000.):
"""
Parameters
----------
Expand Down Expand Up @@ -691,7 +691,10 @@ def __init__(self, detector='LISA', reference_time=None, orbits=ESAOrbits(), use

# intialize orbit information
if orbits is None:
raise ImportError('LISAanalysistools required for inputting orbital data')
# set ESAOrbits as default; raise error if ESAOrbits cannot be imported
if ESAOrbits is None:
raise ImportError('LISAanalysistools required for inputting orbital data')
orbits = ESAOrbits()
orbits.configure(linear_interp_setup=True)
self.orbits = orbits

Expand Down

0 comments on commit eb73c29

Please sign in to comment.