Commit e7972e08 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Closes #140

parent 895e6232
Pipeline #26286 passed with stage
in 1 minute and 26 seconds
......@@ -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)
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment