GWForge.ifo.antenna

Attributes

Functions

finite_size_factor(x, y)

Single-arm transfer function for finite light travel time.

antenna_response(interferometer, ra, dec, ...[, ...])

Antenna pattern and arrival delay, per frequency bin.

detector_response(interferometer, ...[, frequencies, ...])

Project polarizations onto one detector.

inject_signal_with_response(interferometers, ...[, ...])

Inject a signal into a network using the frequency-dependent response.

Module Contents

GWForge.ifo.antenna.RESPONSE_PARAMETERS = ('ra', 'dec', 'psi', 'geocent_time', 'chirp_mass', 'symmetric_mass_ratio', 'mass_1', 'mass_2',...[source]
GWForge.ifo.antenna.finite_size_factor(x, y)[source]

Single-arm transfer function for finite light travel time.

This is the frequency-domain response of one Fabry-Perot arm to a wave arriving from direction \(\hat\Omega\), from Rakhmanov, Romano & Whelan (arXiv:0808.3805):

\[D(x, y) = \tfrac{1}{2}\left[ e^{-i\pi x(1+y)}\,\mathrm{sinc}\big(x(1-y)\big) + e^{ i\pi x(1-y)}\,\mathrm{sinc}\big(x(1+y)\big)\right]\]
Parameters:
  • x (array_like) – \(fL/c\), the arm length in wavelengths.

  • y (array_like) – \(-\hat\Omega\cdot\hat{a}\), the cosine of the angle between the arm and the direction of propagation.

Returns:

Complex transfer function. D(0, y) == 1 for every y, which is the long-wavelength limit – so setting this to 1 recovers bilby exactly.

Return type:

numpy.ndarray

Notes

numpy.sinc(z) is \(\sin(\pi z)/(\pi z)\), which is what the formula above already assumes; do not insert an extra factor of \(\pi\).

GWForge.ifo.antenna.antenna_response(interferometer, ra, dec, geocent_time, psi, frequencies, start_time, times_to_coalescence=None, earth_rotation=True, finite_size=True)[source]

Antenna pattern and arrival delay, per frequency bin.

Parameters:
  • interferometer (bilby.gw.detector.Interferometer) – Detector whose geometry is used. For ET this is one triangle arm; the three arms are separate Interferometer objects with their own vertices, so their responses differ correctly.

  • ra (float) – Sky position in radians.

  • dec (float) – Sky position in radians.

  • geocent_time (float) – GPS time of coalescence at the geocentre.

  • psi (float) – Polarisation angle in radians, counter-clockwise about the propagation direction (bilby’s convention).

  • frequencies (array_like) – Frequencies in Hz at which to evaluate the response.

  • start_time (float) – GPS start time of the data segment; the returned delay is measured from it, matching bilby’s get_detector_response.

  • times_to_coalescence (array_like or None) – \(\tau(f)\), same length as frequencies. Required when earth_rotation is True; ignored otherwise.

  • earth_rotation (bool) – Evolve the antenna pattern and the arrival delay along \(t(f)\).

  • finite_size (bool) – Apply the per-arm finite-light-travel-time transfer function.

Returns:

(F_plus, F_cross, tau). The first two are complex when finite_size is True and real-valued otherwise; tau is the delay from start_time to arrival at this detector’s vertex. The caller applies \(e^{-2\pi i f \tau}\) – keeping it separate leaves the rapidly oscillating factor available in closed form.

Return type:

tuple of (numpy.ndarray, numpy.ndarray, numpy.ndarray or float)

GWForge.ifo.antenna.detector_response(interferometer, waveform_polarizations, parameters, frequencies=None, earth_rotation=True, finite_size=True)[source]

Project polarizations onto one detector.

Drop-in replacement for bilby.gw.detector.Interferometer.get_detector_response() with the same masking and return contract: a full-length frequency-domain array, zero outside the interferometer’s frequency_mask.

Parameters:
  • interferometer (bilby.gw.detector.Interferometer) – Detector with strain data already set (its start_time is used).

  • waveform_polarizations (dict) – {'plus': ..., 'cross': ...} frequency-domain polarizations.

  • parameters (dict) – Source parameters. Needs ra, dec, psi, geocent_time, and – when earth_rotation is True – enough mass information to evaluate the time-frequency relation.

  • frequencies (array_like or None) – Evaluate at these frequencies instead of the interferometer’s own array. When given, no frequency masking is applied.

  • earth_rotation (bool) – Switch the two corrections off to recover bilby’s response exactly.

  • finite_size (bool) – Switch the two corrections off to recover bilby’s response exactly.

Returns:

Complex frequency-domain strain in this detector.

Return type:

numpy.ndarray

GWForge.ifo.antenna.inject_signal_with_response(interferometers, waveform_generator, parameters, earth_rotation=True, finite_size=True)[source]

Inject a signal into a network using the frequency-dependent response.

bilby’s InterferometerList.inject_signal calls get_detector_response internally and so cannot be reused. This mirrors Interferometer.inject_signal_from_waveform_polarizations, including the meta_data it populates, so downstream code that reads ifo.meta_data['optimal_SNR'] is unaffected.

Parameters:
  • interferometers (bilby.gw.detector.InterferometerList) – Network with strain data already set.

  • waveform_generator (bilby.gw.WaveformGenerator) – Generator matched to the network’s duration and sampling frequency.

  • parameters (dict) – Injection parameters.

  • earth_rotation (bool) – Response options; see detector_response().

  • finite_size (bool) – Response options; see detector_response().

Returns:

The waveform polarizations that were injected.

Return type:

dict