pespace.detector.antenna¶
Module for descriping detectors and single link response models.
Functions
|
Compute the gravitational wave propagation unit vector. |
|
Compute the polarization tensors in the Solar System Barycenter frame. |
Classes
Frequency domain response model using long wavelength approximation. |
|
|
Frequency domain response model based on Marsat et al. (2018). |
Frequency domain response model using static long wavelength approximation. |
|
|
Class representing a space-borne gravitational wave detector. |
Abstract base class for single link response models. |
|
Taichi backend for backend for FDResponseModelMarset2018. |
- pespace.detector.antenna.get_polarization_tensor_ssb_taichi(lam, beta, psi)[source]¶
Compute the polarization tensors in the Solar System Barycenter frame.
- Parameters:
lam (float) – Ecliptic longitude in radians.
beta (float) – Ecliptic latitude in radians, in the range \((-\pi/2, \pi/2)\).
psi (float) – Polarization angle in radians.
- Returns:
A struct containing two 3x3 matrices: - plus: Plus polarization tensor (\(e_+ = p \otimes p - q \otimes q\)) - cross: Cross polarization tensor (\(e_\times = p \otimes q + q \otimes p\))
- Return type:
PolarizationStruct
- pespace.detector.antenna.get_gw_propagation_unit_vector_taichi(lam, beta)[source]¶
Compute the gravitational wave propagation unit vector.
- Parameters:
lam (float) – Ecliptic longitude in radians.
beta (float) – Ecliptic latitude in radians, in the range \((-\pi/2, \pi/2)\).
- Returns:
Unit vector pointing in the direction of GW propagation in the SSB frame.
- Return type:
ti.types.vector(3, float)
Notes
The propagation direction is opposite to the source direction.
- class pespace.detector.antenna.InterferometerAntenna(name, tdi_data, orbit_model, response_model, tdi_combination, backend='taichi')[source]¶
Bases:
objectClass representing a space-borne gravitational wave detector.
This class uses an orbit model to define a detector, and hosts data of TDI channels, the model for responses of single links, and the model for TDI combination. This class can be used to compute detector responses, inject signals, and calculate SNR.
It serves as the main interface to interact with the detector.
- Parameters:
name (str)
tdi_data (TDIChannelData)
orbit_model (str | OrbitModelBase)
response_model (SingleLinkResponseModel)
tdi_combination (TDICombinationModel)
backend (str)
- __init__(name, tdi_data, orbit_model, response_model, tdi_combination, backend='taichi')[source]¶
Initialize the InterferometerAntenna.
- Parameters:
name (str) – Name of the interferometer.
tdi_data (TDIChannelData) – TDI channel data object containing frequency/time domain data.
orbit_model (str or OrbitModelBase) – Orbit model of the detector. Can be a string name of an available orbit model or an instance of
OrbitModelBase.response_model (SingleLinkResponseModel) – Model for computing single link response.
tdi_combination (TDICombinationModel) – Model for TDI combination.
backend (str) – Computation backend, ‘taichi’ (default) or ‘jax’.
- Raises:
ValueError – If the
orbit_modelis string but not a recognized name.TypeError – If
orbit_modelis neither a string nor anOrbitModelBaseinstance.
- Return type:
None
- update_detector_response(waveform, lam, beta, psi, tc)[source]¶
Update detector responses for a given waveform.
- Parameters:
waveform (ti.StructField or jax.array, depending on
backend) – Waveform data.lam (float) – Ecliptic longitude of the source.
beta (float) – Ecliptic latitude of the source.
psi (float) – Polarization angle.
tc (float) – Coalescence time.
- Return type:
None
- inject_signal(waveform, lam, beta, psi, tc)[source]¶
Inject a signal into the detector data.
- Parameters:
waveform (ti.StructField or jax.array, depending on
backend) – Waveform data.lam (float) – Ecliptic longitude of the source.
beta (float) – Ecliptic latitude of the source.
psi (float) – Polarization angle.
tc (float) – Coalescence time.
- Raises:
NotImplementedError – If the domain is not supported.
- Return type:
None
- get_optimal_snr(waveform, lam, beta, psi, tc)[source]¶
Calculate the optimal SNR for the given waveform.
Placeholder implementation
- Parameters:
waveform (ti.StructField or jax.array, depending on
backend)lam (float) – Ecliptic longitude of the source in radians.
beta (float) – Ecliptic latitude of the source in radians.
psi (float) – Polarization angle in radians.
tc (float) – Coalescence time in seconds.
- Returns:
Dictionary containing SNR for (A, E, T) channels and the total.
- Return type:
dict[str, float]
- property tdi_response_numpy: tuple¶
Get the TDI response as a NamedTuple of complex arrays.
- property single_link_response_array: tuple¶
Get the single link response as a NamedTuple of complex arrays.
- class pespace.detector.antenna.SingleLinkResponseModel[source]¶
Bases:
ABCAbstract base class for single link response models.
- abstractmethod init_single_link_response_model(detector)[source]¶
Initialize the single link response model.
- Parameters:
detector (InterferometerAntenna) – The detector instance to bind with.
- Return type:
None
- abstractmethod update_single_link_response(waveform, lam, beta, psi, tc)[source]¶
Update the single link response.
- Return type:
None
- _abc_impl = <_abc._abc_data object>¶
- class pespace.detector.antenna.FDResponseModelMarset2018(backend='taichi')[source]¶
Bases:
objectFrequency domain response model based on Marsat et al. (2018).
This is the interface for external calling. The actual computation is delegated to the backend-specific implementation (
_FDResponseModelMarset2018Taichiorpespace.detector._jax_impl._antenna_jax._FDResponseModelMarset2018Jax).- Parameters:
backend (str, optional) – Computation backend, ‘taichi’ (default) or ‘jax’.
- class pespace.detector.antenna._FDResponseModelMarset2018Taichi[source]¶
Bases:
SingleLinkResponseModelTaichi backend for backend for FDResponseModelMarset2018.
- init_single_link_response_model(detector)[source]¶
Initialize the single link response model.
This method sets up
taichi.fieldfor storing single link responses and creates a weak reference to the detector to avoid circular references.- Parameters:
detector (InterferometerAntenna) – The detector instance binding with the response model.
- Return type:
None
- update_single_link_response(waveform, lam, beta, psi, tc)[source]¶
Update the single link response for the given waveform parameters.
- Parameters:
waveform (ti.template) – Waveform data structure containing polarization modes. Can be a structure with ‘plus’, ‘cross’, and ‘tf’ keys, or a structure with multiple modes.
lam (float) – Ecliptic longitude of the source in radians.
beta (float) – Ecliptic latitude of the source in radians.
psi (float) – Polarization angle in radians.
tc (float) – Coalescence time in seconds.
- _get_responses_at_fi(hp, hc, tf, fi, pol_tensor, k)[source]¶
Calculate single link responses at a specific frequency.
- Parameters:
hp (ti_complex) – Plus polarization at the given frequency.
hc (ti_complex) – Cross polarization at the given frequency.
tf (float) – time at the given frequency in seconds.
fi (float) – Frequency in Hz.
pol_tensor (PolarizationStruct) – Polarization tensor structure containing plus and cross components
k (ti.types.vector(3, float)) – Unit vector pointing in the GW propagation direction.
- Returns:
Structure containing complex responses for six links: link12, link21, link23, link32, link31, link13.
- Return type:
SingleLinkStructComplex
- _abc_impl = <_abc._abc_data object>¶
- _data_oriented = True¶
- class pespace.detector.antenna.FDResponseModelLongWavelength[source]¶
Bases:
SingleLinkResponseModelFrequency domain response model using long wavelength approximation.
Placeholder implementation.
- _abc_impl = <_abc._abc_data object>¶
- class pespace.detector.antenna.FDResponseModelStaticLongWavelength[source]¶
Bases:
SingleLinkResponseModelFrequency domain response model using static long wavelength approximation.
Placeholder implementation
- _abc_impl = <_abc._abc_data object>¶