From eb73c29d39ea30950cf54a7d2839b21ea636232c Mon Sep 17 00:00:00 2001 From: acorreia61201 Date: Fri, 12 Jul 2024 16:46:08 +0000 Subject: [PATCH] fix bug when calling ESAOrbits without lisatools --- pycbc/detector.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pycbc/detector.py b/pycbc/detector.py index 155f692e12e..d1da98788d1 100644 --- a/pycbc/detector.py +++ b/pycbc/detector.py @@ -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 ---------- @@ -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