From e7972e08969c47ec21c7ed82bf0ff903929df4a5 Mon Sep 17 00:00:00 2001 From: Gregory Ashton <gregory.ashton@ligo.org> Date: Thu, 26 Jul 2018 10:55:26 +1000 Subject: [PATCH] Closes #140 --- tupak/gw/detector.py | 22 +++++++++++----------- tupak/gw/likelihood.py | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tupak/gw/detector.py b/tupak/gw/detector.py index e13f6fbdc..4a479a902 100644 --- a/tupak/gw/detector.py +++ b/tupak/gw/detector.py @@ -18,12 +18,12 @@ except ImportError: " not be able to use some of the prebuilt functions.") -class InterferometerSet(list): +class InterferometerList(list): """ A list of Interferometer objects """ def __init__(self, interferometers): - """ Instantiate a InterferometerSet + """ Instantiate a InterferometerList - The InterferometerSet is a list of Interferometer objects, each + The InterferometerList is a list of Interferometer objects, each object has the data used in evaluating the likelihood Parameters @@ -178,18 +178,18 @@ class InterferometerSet(list): return self[0].strain_data.frequency_array def append(self, interferometer): - if isinstance(interferometer, InterferometerSet): - super(InterferometerSet, self).extend(interferometer) + if isinstance(interferometer, InterferometerList): + super(InterferometerList, self).extend(interferometer) else: - super(InterferometerSet, self).append(interferometer) + super(InterferometerList, self).append(interferometer) self._check_interferometers() def extend(self, interferometers): - super(InterferometerSet, self).extend(interferometers) + super(InterferometerList, self).extend(interferometers) self._check_interferometers() def insert(self, index, interferometer): - super(InterferometerSet, self).insert(index, interferometer) + super(InterferometerList, self).insert(index, interferometer) self._check_interferometers() @@ -1437,12 +1437,12 @@ class Interferometer(object): outdir, self.name, label)) -class TriangularInterferometer(InterferometerSet): +class TriangularInterferometer(InterferometerList): def __init__(self, name, power_spectral_density, minimum_frequency, maximum_frequency, length, latitude, longitude, elevation, xarm_azimuth, yarm_azimuth, xarm_tilt=0., yarm_tilt=0.): - InterferometerSet.__init__(self, []) + InterferometerList.__init__(self, []) self.name = name # for attr in ['power_spectral_density', 'minimum_frequency', 'maximum_frequency']: if isinstance(power_spectral_density, PowerSpectralDensity): @@ -1998,4 +1998,4 @@ def get_event_data( logger.debug("Error raised {}".format(e)) logger.warning('No data found for {}.'.format(name)) - return InterferometerSet(interferometers) + return InterferometerList(interferometers) diff --git a/tupak/gw/likelihood.py b/tupak/gw/likelihood.py index b4f5f7516..b0d0b2d4d 100644 --- a/tupak/gw/likelihood.py +++ b/tupak/gw/likelihood.py @@ -56,7 +56,7 @@ class GravitationalWaveTransient(likelihood.Likelihood): self.waveform_generator = waveform_generator likelihood.Likelihood.__init__(self, waveform_generator.parameters) - self.interferometers = tupak.gw.detector.InterferometerSet(interferometers) + self.interferometers = tupak.gw.detector.InterferometerList(interferometers) self.time_marginalization = time_marginalization self.distance_marginalization = distance_marginalization self.phase_marginalization = phase_marginalization -- GitLab