InterferometerList

class InterferometerList(interferometers)[source]

Bases: list

A list of Interferometer objects

__init__(interferometers)[source]

Instantiate a InterferometerList

The InterferometerList is a list of Interferometer objects, each object has the data used in evaluating the likelihood

Parameters:
interferometers: iterable

The list of interferometers

__call__(*args, **kwargs)

Call self as a function.

Methods

__init__(interferometers)

Instantiate a InterferometerList

append(interferometer)

Append object to the end of the list.

extend(interferometers)

Extend list by appending elements from the iterable.

from_pickle([filename])

inject_signal([parameters, ...])

Inject a signal into noise in each of the three detectors.

insert(index, interferometer)

Insert object before index.

plot_data([signal, outdir, label])

plot_time_domain_data([outdir, label, ...])

Plots the strain data in the time domain for each of the interfeormeters

save_data(outdir[, label])

Creates a save file for the data in plain text format

set_strain_data_from_power_spectral_densities(...)

Set the Interferometer.strain_data from the power spectral densities of the detectors

set_strain_data_from_zero_noise(...[, ...])

Set the Interferometer.strain_data to zero in each detector

to_pickle([outdir, label])

Saves the object to a pickle file

Attributes

array_backend

duration

frequency_array

meta_data

Dictionary of the per-interferometer meta_data

number_of_interferometers

reference_time

sampling_frequency

start_time

append(interferometer)[source]

Append object to the end of the list.

extend(interferometers)[source]

Extend list by appending elements from the iterable.

inject_signal(parameters=None, injection_polarizations=None, waveform_generator=None, raise_error=True)[source]

Inject a signal into noise in each of the three detectors.

Parameters:
parameters: dict

Parameters of the injection.

injection_polarizations: dict

Polarizations of waveform to inject, output of waveform_generator.frequency_domain_strain(). If waveform_generator is also given, the injection_polarizations will be calculated directly and this argument can be ignored.

waveform_generator: bilby.gw.waveform_generator.WaveformGenerator

A WaveformGenerator instance using the source model to inject. If injection_polarizations is given, this will be ignored.

raise_error: bool

Whether to raise an error if the injected signal does not fit in the segment.

Returns:
injection_polarizations: dict

Notes

if your signal takes a substantial amount of time to generate, or you experience buggy behaviour. It is preferable to provide the injection_polarizations directly.

insert(index, interferometer)[source]

Insert object before index.

property meta_data

Dictionary of the per-interferometer meta_data

plot_time_domain_data(outdir='.', label=None, bandpass_frequencies=(50, 250), notches=None, start_end=None, t0=None)[source]

Plots the strain data in the time domain for each of the interfeormeters

Parameters:
outdir: str

The output directory in which the plots should be saved.

label: str

The string labelling the data.

bandpass_frequencies: tuple, optional

A tuple of the (low, high) frequencies to use when bandpassing data, if None no bandpass is applied.

notches: list, optional

A list of frequencies specifying any lines to notch.

start_end: tuple, optional

A tuple of the (start, end) range of GPS times to plot.

t0: float, optional

If given, the reference time to subtract from the time series plotting.

save_data(outdir, label=None)[source]

Creates a save file for the data in plain text format

Parameters:
outdir: str

The output directory in which the data is supposed to be saved

label: str

The string labelling the data

set_strain_data_from_power_spectral_densities(sampling_frequency, duration, start_time=0, *, random_state=None)[source]

Set the Interferometer.strain_data from the power spectral densities of the detectors

This uses the interferometer.power_spectral_density object to set the strain_data to a noise realization. See bilby.gw.detector.InterferometerStrainData for further information.

Parameters:
sampling_frequency: float

The sampling frequency (in Hz)

duration: float

The data duration (in s)

start_time: float

The GPS start-time of the data

set_strain_data_from_zero_noise(sampling_frequency, duration, start_time=0)[source]

Set the Interferometer.strain_data to zero in each detector

See bilby.gw.detector.InterferometerStrainData.set_from_zero_noise() for further information.

Parameters:
sampling_frequency: float

The sampling frequency (in Hz)

duration: float

The data duration (in s)

start_time: float

The GPS start-time of the data

to_pickle(outdir='outdir', label='ifo_list')[source]

Saves the object to a pickle file

Added in version 1.1.0.

Parameters:
outdir: str, optional

Output directory name of the file

label: str, optional

Output file name, is ‘ifo_list’ if not given otherwise. A list of the included interferometers will be appended.