interferometry
interferometry.py computes the response and sensitivity functions of space-based interferometer GW detectors (e.g., LISA, Taiji) for the detection of stochastic gravitational wave backgrounds (SGWB).
Adapted from the original interferometry in GW_turbulence (https://github.com/AlbertoRoper/GW_turbulence), created in May 2022
Currently part of the cosmoGW code:
https://github.com/cosmoGW/cosmoGW/ https://github.com/cosmoGW/cosmoGW/blob/main/src/cosmoGW/interferometry.py
Note
For full documentation, visit Read the Docs
Note
See tutorials/interferometry/interferometry.ipynb for usage examples.
To use it, first install cosmoGW:
pip install cosmoGW
Dates
Created: 01/05/2022
Updated: 21/08/2025 (release cosmoGW 1.0: https://pypi.org/project/cosmoGW)
References
[Caprini:2019pxz]: C. Caprini, D. Figueroa, R. Flauger, G. Nardini, M. Peloso, M. Pieroni, A. Ricciardone, G. Tassinato, “Reconstructing the spectral shape of a stochastic gravitational wave background with LISA,” JCAP 11 (2019), 017, arXiv:1906.09244.
[Schmitz:2020syl]: K. Schmitz “New Sensitivity Curves for Gravitational-Wave Signals from Cosmological Phase Transitions,” JHEP 01, 097 (2021), arXiv:2002.04615.
[Orlando:2020oko]: G. Orlando, M. Pieroni, A. Ricciardone, “Measuring Parity Violation in the Stochastic Gravitational Wave Background with the LISA-Taiji network,” JCAP 03, 069 (2021), arXiv:2011.07059.
[RoperPol:2021xnd]: A. Roper Pol, S. Mandal, A. Brandenburg, T. Kahniashvili, “Polarization of gravitational waves from helical MHD turbulent sources,” JCAP 04 (2022), 019, arXiv:2107.05356.
[RoperPol:2022iel]: A. Roper Pol, C. Caprini, A. Neronov, D. Semikoz, “The gravitational wave signal from primordial magnetic fields in the Pulsar Timing Array frequency band,” Phys. Rev. D 105, 123502 (2022), arXiv:2201.05630.
- cosmoGW.interferometry.OmPLS(Oms, f=<Quantity [1.00000000e-04, 1.00184413e-04, 1.00369167e-04, ..., 9.96321908e-01, 9.98159260e-01, 1.00000000e+00] Hz>, beta=array([-20. , -19.98666222, -19.97332444, ..., 19.97332444, 19.98666222, 20. ], shape=(3000,)), SNR=1, T=1, Xi=0)
Compute the power law sensitivity (PLS).
Reference
RoperPol:2021xnd, appendix B (equation B.31).
Parameters
- Omsnp.ndarray
GW energy density sensitivity.
- fnp.ndarray or astropy.units.Quantity, optional
Frequency array (default: f_ref).
- betanp.ndarray, optional
Array of slopes (default: beta_ref from -20 to 20).
- SNRfloat, optional
Signal-to-noise ratio threshold (default: 1).
- Tfloat, optional
Duration of the observation in years (default: 1).
- Xifloat, optional
For polarization signals using the dipole response (default: 0).
Returns
- Omeganp.ndarray
GW energy density power law sensitivity (PLS).
- cosmoGW.interferometry.Oms(f, S, h0=1.0, comb=False, S2=None, S3=None, S4=None, Xi=False)
Return the sensitivity Sh(f) in terms of the GW energy density Om(f).
Reference for Omega is RoperPol:2021xnd, equation B.18 (seems like it might have a typo, need to investigate this!). Final PLS sensitivites are again correct for a single channel, since the factor of 2 in the SNR compensates for the 1/2 factor here. Reference for combined sensitivities is RoperPol:2021xnd, equations B.37 (GW energy density, combining LISA and Taiji TDI channels A and C), and B.41 (polarization, combining 4 cross-correlation between LISA and Taiji TDI channels AE, AD, CE, CD).
Strain sensitivities, Omega sensitivities, and OmGW PLS agree with those of reference Caprini:2019pxz, see equation 2.14.
References
RoperPol:2021xnd, equations B.18, B.21, B.37, B.41. Caprini:2019pxz, equation 2.14.
Parameters
- fnp.ndarray or astropy.units.Quantity
Frequency array (should be in units of Hz).
- Snp.ndarray
Strain sensitivity function.
- h0float, optional
Hubble rate uncertainty parameter (default: 1).
- combbool, optional
If True, combine two sensitivities (default: False).
- S2, S3, S4np.ndarray, optional
Additional sensitivities for combination (default: None).
- Xibool, optional
If True, compute sensitivity to polarized GW backgrounds (default: False).
Returns
- Omeganp.ndarray
GW energy density sensitivity.
- cosmoGW.interferometry.Pacc_f(f=<Quantity [1.00000000e-04, 1.00184413e-04, 1.00369167e-04, ..., 9.96321908e-01, 9.98159260e-01, 1.00000000e+00] Hz>, A=3, L=<Quantity 2500000. km>)
Compute the power spectral density (PSD) of the mass acceleration noise for a space-based interferometer channel.
This function implements the analytical formula for the acceleration noise PSD as described in RoperPol:2021xnd, equation B.25.
Parameters
- fastropy.units.Quantity, optional
Frequency array (default: f_ref, units of Hz).
- Afloat, optional
Acceleration noise parameter (default: 3 for LISA; Taiji also uses 3).
- Lastropy.units.Quantity, optional
Length of the interferometer arm (default: 2.5e6 km for LISA).
Returns
- Paccastropy.units.Quantity
Mass acceleration PSD noise (units of 1/Hz).
References
RoperPol2021xnd
- cosmoGW.interferometry.Pn_f(f=<Quantity [1.00000000e-04, 1.00184413e-04, 1.00369167e-04, ..., 9.96321908e-01, 9.98159260e-01, 1.00000000e+00] Hz>, P=15, A=3, L=<Quantity 2500000. km>, TDI=True)
Compute the noise power spectral density (PSD) for a space-based interferometer channel and its cross-correlation.
This function calculates the PSD for a single channel (X) and the cross-correlation (XY), or the TDI channels (A and T) if TDI is True.
Implements the analytical formulas from RoperPol:2021xnd, equations B.23 and B.26.
Parameters
- fastropy.units.Quantity, optional
Frequency array (default: f_ref, units of Hz).
- Pfloat, optional
Optical metrology system noise parameter (default: 15 for LISA).
- Afloat, optional
Acceleration noise parameter (default: 3 for LISA).
- Lastropy.units.Quantity, optional
Length of the interferometer arm (default: 2.5e6 km for LISA).
- TDIbool, optional
If True, compute TDI channel PSDs (A and T). If False, compute single channel and cross-correlation PSDs.
Returns
- If TDI is True:
- PnAastropy.units.Quantity
Noise PSD of the TDI channel A.
- PnTastropy.units.Quantity
Noise PSD of the TDI channel T.
- If TDI is False:
- Pnastropy.units.Quantity
Noise PSD of the single channel.
- Pn_crossastropy.units.Quantity
Noise PSD of the cross-correlation channel.
References
Roper Pol et al., JCAP 04 (2022) 019, https://arxiv.org/abs/2107.05356
- cosmoGW.interferometry.Poms_f(f=<Quantity [1.00000000e-04, 1.00184413e-04, 1.00369167e-04, ..., 9.96321908e-01, 9.98159260e-01, 1.00000000e+00] Hz>, P=15, L=<Quantity 2500000. km>)
Compute the power spectral density (PSD) of the optical metrology system (OMS) noise for a space-based interferometer.
Reference
RoperPol:2021xnd, equation B.24.
Parameters
- fastropy.units.Quantity, optional
Frequency array (default: f_ref).
- Pfloat, optional
OMS noise parameter (default: 15 for LISA, 8 for Taiji).
- Lastropy.units.Quantity, optional
Length of the interferometer arm (default: 2.5e6 km for LISA).
Returns
- astropy.units.Quantity
OMS PSD noise array (units: 1/Hz).
- cosmoGW.interferometry.R_f(f=<Quantity [1.00000000e-04, 1.00184413e-04, 1.00369167e-04, ..., 9.96321908e-01, 9.98159260e-01, 1.00000000e+00] Hz>, L=<Quantity 2500000. km>)
Compute the analytical fit of the response function for a space-based interferometer channel.
Implements the analytical formula from RoperPol:2021xnd, equation B.15.
Parameters
- fastropy.units.Quantity, optional
Frequency array (default: f_ref, units of Hz).
- Lastropy.units.Quantity, optional
Length of the interferometer arm (default: 2.5e6 km for LISA).
Returns
- Rfastropy.units.Quantity
Analytical fit of the response function.
References
RoperPol2021xnd
- cosmoGW.interferometry.SNR(f, OmGW, fs, Oms, T=1.0)
Compute the signal-to-noise ratio (SNR) of a GW signal.
\[{\rm SNR} = \sqrt{T \int \left( \frac{\Omega_{\rm GW} (f)} {\Omega_{\rm sens} (f)} \right)^2 df}\]Reference
RoperPol:2021xnd, appendix B (equation B.30).
Parameters
- fnp.ndarray or astropy.units.Quantity
Frequency array of the GW signal.
- OmGWnp.ndarray
GW energy density spectrum of the GW signal.
- fsnp.ndarray or astropy.units.Quantity
Frequency array of the GW detector sensitivity.
- Omsnp.ndarray
GW energy density sensitivity of the GW detector.
- Tfloat, optional
Duration of observations in years (default: 1.0).
Returns
- float
SNR of the GW signal.
- cosmoGW.interferometry.Sn_f(fs=<Quantity [1.00000000e-04, 1.00184413e-04, 1.00369167e-04, ..., 9.96321908e-01, 9.98159260e-01, 1.00000000e+00] Hz>, v=0.00123, interf='LISA', TDI=True, M='MED', Xi=False)
Compute the strain sensitivity using the analytical fit for an interferometer channel.
Parameters
- fsnp.ndarray or astropy.units.Quantity, optional
Frequency array (default: f_ref).
- vfloat, optional
Dipole velocity of the solar system (default: 1.23e-3).
- interfstr, optional
Interferometer (‘LISA’, ‘Taiji’, ‘comb’; default: ‘LISA’).
- TDIbool, optional
If True, use TDI channels (default: True).
- Mstr, optional
Cross-correlated channel (default: ‘MED’).
- Xibool, optional
If True, compute sensitivity to polarized GW backgrounds (default: False).
Returns
- tuple
Frequency array and strain sensitivities (see function body).
- cosmoGW.interferometry.Sn_f_analytical(f=<Quantity [1.00000000e-04, 1.00184413e-04, 1.00369167e-04, ..., 9.96321908e-01, 9.98159260e-01, 1.00000000e+00] Hz>, P=15, A=3, L=<Quantity 2500000. km>)
Compute the strain sensitivity using the analytical fit for a space-based interferometer channel.
This function uses the analytical noise PSD and response function to calculate the strain sensitivity.
Parameters
- fastropy.units.Quantity, optional
Frequency array (default: f_ref, units of Hz).
- Pfloat, optional
Optical metrology system noise parameter (default: 15 for LISA).
- Afloat, optional
Acceleration noise parameter (default: 3 for LISA).
- Lastropy.units.Quantity, optional
Length of the interferometer arm (default: 2.5e6 km for LISA).
Returns
- Snastropy.units.Quantity
Strain sensitivity array (units: 1/Hz).
References
RoperPol2021xnd
- cosmoGW.interferometry.compute_Oms_LISA_Taiji(interf='LISA', TDI=True, h0=1.0)
Read response functions for LISA and/or Taiji, compute strain sensitivities, and from those, the sensitivity to the GW energy density spectrum Omega_s.
Parameters
- interfstr, optional
Interferometer (‘LISA’, ‘Taiji’, ‘comb’; default: ‘LISA’).
- TDIbool, optional
If True, use TDI channels (default: True).
- h0float, optional
Hubble rate uncertainty parameter (default: 1.0).
Returns
- tuple
fs : frequency array OmSA : GW energy density sensitivity for channel A OmST : GW energy density sensitivity for channel T
- cosmoGW.interferometry.compute_interferometry(f=<Quantity [1.00000000e-04, 1.00184413e-04, 1.00369167e-04, ..., 9.96321908e-01, 9.98159260e-01, 1.00000000e+00] Hz>, L=<Quantity 2500000. km>, TDI=True, order=1, comp_all=False, comp_all_rel=True)
Numerically compute the monopole (order=1) or dipole (order=2) response functions of a space-based GW interferometer channel.
This function integrates over sky directions and computes the response functions for interferometer channels (or TDI channels if TDI is True). It can compute all relevant response functions, including those for geometric symmetries.
Implements the formalism from RoperPol:2021xnd, appendix B (eqs. B.13, B.16).
Parameters
- fastropy.units.Quantity, optional
Frequency array (default: f_ref, units of Hz).
- Lastropy.units.Quantity, optional
Length of the interferometer arm (default: 2.5e6 km for LISA).
- TDIbool, optional
If True, compute TDI channel response functions (A, E, T). If False, compute XYZ channel response functions.
- orderint, optional
Moment of the response function (1 for monopole, 2 for dipole).
- comp_allbool, optional
If True, compute all response functions (monopole and dipole, X and A channels).
- comp_all_relbool, optional
If True, compute only relevant response functions (not identically zero or equal).
Returns
- tuple
Monopole or dipole response functions, depending on order and options. See function body for details.
References
RoperPol2021xnd
- cosmoGW.interferometry.compute_response_LISA_Taiji(f=<Quantity [1.00000000e-04, 1.00184413e-04, 1.00369167e-04, ..., 9.96321908e-01, 9.98159260e-01, 1.00000000e+00] Hz>, dir0='resources/detectors_sensitivity/', dir_HOME=None, save=True, ret=False)
Compute LISA and Taiji’s monopole and dipole response functions.
Uses the
compute_interferometry()routine and refines the response functions at low frequencies.Parameters
- fnp.ndarray or astropy.units.Quantity, optional
Frequency array (default: f_ref).
- dir0str, optional
Directory to save results (default: dir_sens).
- savebool, optional
If True, saves results as output files (default: True).
- retbool, optional
If True, returns the results from the function (default: False).
Returns
- MAAnp.ndarray
Monopole response function of the TDI channel A.
- MTTnp.ndarray
Monopole response function of the TDI channel T (Sagnac channel).
- DAEnp.ndarray
Dipole response function of the TDI correlation of the channels A and E.
- MXXnp.ndarray
Monopole response function of the interferometer channel X.
- MXYnp.ndarray
Monopole response function of the correlation of interferometer channels X and Y.
- DXYnp.ndarray
Dipole response functions of the correlation of the interferometer channels X and Y.
- cosmoGW.interferometry.read_MAC(dirr0='/LISA_Taiji/', dir_HOME=None, M='MAC', V='V')
Read the V response functions of the cross-correlated channels of the LISA-Taiji network.
Reference
RoperPol:2021xnd, see figure 18. Data from Orlando:2020oko, see figure 2.
Parameters
- dirr0str, optional
Directory where to save the results (default: ‘detector_sensitivity/LISA_Taiji/’).
- Mstr, optional
Channel to be read (‘MAC’, ‘MAD’, ‘MEC’, ‘MED’; default: ‘MAC’).
- Vstr, optional
Stokes parameter. Use ‘I’ to read the intensity response (default: ‘V’).
Returns
- tuple
- fastropy.units.Quantity
Frequency array in Hz.
- MACnp.ndarray
Response function array.
- cosmoGW.interferometry.read_all_MAC(V='V')
Read all relevant TDI cross-correlated response functions between LISA and Taiji (AC, AD, EC, ED channels) using read_MAC.
Reference
RoperPol:2021xnd, see figure 18. Data from Orlando:2020oko, see figure 2.
Parameters
- Vstr, optional
Stokes parameter. Use ‘I’ to read the intensity response (default: ‘V’).
Returns
- tuple
- fsastropy.units.Quantity
Frequency array in Hz.
- M_ACnp.ndarray
Response function for AC channel.
- M_ADnp.ndarray
Response function for AD channel.
- M_ECnp.ndarray
Response function for EC channel.
- M_EDnp.ndarray
Response function for ED channel.
- cosmoGW.interferometry.read_detector_PLIS_Schmitz(dirr0='/power-law-integrated_sensitivities/', dir_HOME=None, det='BBO', SNR=10, T=4)
Read power law integrated sensitivities from Schmitz:2020syl.
Parameters
- dirr0str, optional
Directory where the PLS are stored (default: ‘detector_sensitivity/power-law-integrated_sensitivities’).
- detstr, optional
GW detector name (check available detectors in default directory).
- SNRfloat, optional
Signal-to-noise ratio (SNR) of the resulting PLS (default: 10).
- Tfloat, optional
Duration of the mission in years (default: 4).
Returns
- tuple
- fnp.ndarray
Frequency array.
- Omeganp.ndarray
Power law integrated sensitivity curve.
- cosmoGW.interferometry.read_response_LISA_Taiji(dir0='resources/detectors_sensitivity/', dir_HOME=None, TDI=True, interf='LISA')
Read response functions for LISA or Taiji interferometers. TDI channels are defined following RoperPol:2021xnd, appendix B.
Parameters
- dir0str, optional
Directory containing sensitivity files (default: dir_sens).
- TDIbool, optional
If True, read response functions for TDI channels; otherwise XYZ.
- interfstr, optional
Interferometer name (‘LISA’ or ‘Taiji’).
Returns
- fsastropy.units.Quantity
Frequency array in Hz.
- MAsnp.ndarray
Response function MA (or MX for XYZ).
- MTsnp.ndarray
Response function MT (or MXY for XYZ).
- cosmoGW.interferometry.read_sens(dir0='resources/detectors_sensitivity/', SNR=10, T=4, interf='LISA', Xi=False, TDI=True, chan='A')
Read sensitivity curve for a given interferometer.
For LISA and Taiji the sensitivity can be given for each chanel X, Y, Z or on the TDI chanels A=E, T (A chanel is the default option, and the relevant for Omega sensitivity).
Parameters
- dir0str, optional
Directory containing sensitivity files (default: ‘detector_sensitivity’).
- SNRfloat, optional
Signal-to-noise ratio threshold (default: 10).
- Tfloat, optional
Observation time in years (default: 4).
- interfstr, optional
Interferometer name (‘LISA’, ‘Taiji’, ‘comb’, ‘muAres’).
- Xibool, optional
If True, include helical sensitivity and PLS.
- TDIbool, optional
If True, use TDI channels.
- chanstr, optional
Specific channel (‘A’, ‘X’, ‘Y’, ‘Z’, ‘T’).
Returns
- fsastropy.units.Quantity
Frequency array in Hz.
- Omeganp.ndarray
Sensitivity curve array.
- OmegaPLSnp.ndarray
Power law sensitivity curve array.
- Xinp.ndarray, optional
Helical sensitivity curve array (if Xi is True).
- XiPLSnp.ndarray, optional
Helical power law sensitivity curve array (if Xi is True).
- cosmoGW.interferometry.refine_M(f, M, A=0.3, exp=0)
Refine the response function by appending a low-frequency term.
Parameters
- fnp.ndarray or astropy.units.Quantity
Frequency array (should be in units of Hz).
- Mnp.ndarray
Response function to be refined at low frequencies.
- Afloat, optional
Amplitude of the response function at low frequencies (default: 0.3 for LISA monopole).
- expint, optional
Exponent of the response function at low frequencies (default: 0).
Returns
- fsnp.ndarray
Refined array of frequencies.
- Msnp.ndarray
Refined response function.