Development documentation · 0.2.7 12b76261 · Intro examples tested with 0.2.4 · Version details · Known limitations

Physics Models and Analysis Theory#

This page explains the advanced models and analytical theories implemented in gwexpy for handling specific physical phenomena and hardware responses.

Response and Coupling Functions#

Automatic Excitation Detection#

Extracts stable intervals for analysis from data containing injections (such as swept sine or stepped sine). By tracking power in specific frequency bands on a spectrogram, it identifies segments that exceed thresholds, eliminating the need for manual time-range specification.

Coupling Function (:term:Coupling Function; CF)#

Estimates coupling functions while accounting for background noise. By comparing power during injection and background periods for both the target and witness signals, it isolates the true coupling degree.

\[ \text{CF}(f) = \sqrt{\frac{P_{\text{tgt,inj}}(f) - P_{\text{tgt,bkg}}(f)}{P_{\text{wit,inj}}(f) - P_{\text{wit,bkg}}(f)}} \]

Variable

Definition

Physical Meaning

\(f\)

Frequency

Frequency point for analysis

\(P_{\text{tgt,inj}}(f)\)

Target signal power (during injection)

Power distribution of the main signal during excitation

\(P_{\text{tgt,bkg}}(f)\)

Target signal power (during background)

Noise floor of the main signal without excitation

\(P_{\text{wit,inj}}(f)\)

Witness signal power (during injection)

Power of the reference signal (e.g., environmental noise)

\(P_{\text{wit,bkg}}(f)\)

Witness signal power (during background)

Noise floor of the reference signal without excitation

  • Related API: Analysis (gwexpy.analysis.coupling.estimate_coupling)


Coherence (:term:Coherence)#

TimeSeries.coherence(), TimeSeriesDict.coherence(), and the BruCo engine’s FastCoherenceEngine.compute_coherence() all return the magnitude-squared coherence \(\gamma^2(f)\), following the convention used by scipy.signal.coherence and gwpy:

\[ \gamma^2(f) = \frac{|S_{xy}(f)|^2}{S_{xx}(f)\, S_{yy}(f)} \]

Variable

Definition

\(S_{xy}(f)\)

Cross spectral density between \(x\) and \(y\)

\(S_{xx}(f)\), \(S_{yy}(f)\)

Power spectral densities of \(x\) and \(y\)

\(\gamma^2\) is bounded in \([0, 1]\): values near 1 indicate a strong linear relationship between the two channels at that frequency; values near 0 indicate no linear relationship (or a noise-dominated measurement).

Throughout the docs, “Coherence” refers to \(\gamma^2\) unless explicitly labeled otherwise. When a page needs the amplitude ratio (e.g. to scale an ASD by the coherent fraction, as in noise projection), it uses \(\sqrt{\gamma^2}\) explicitly and labels it accordingly (e.g. “Coherence Amplitude”).


Built-in Noise Models#

Provides physically motivated noise generators for use as initial models in simulations or fitting.

1. Schumann Resonance (:term:Schumann Resonance)#

Models magnetic noise corresponding to the resonance modes of the Earth-ionosphere cavity. It reproduces the low-frequency magnetic background by superimposing multiple independent Lorentzian profiles.

  • Related API: Noise (gwexpy.noise.magnetic.schumann_resonance)

2. Voigt Profile#

Generates peak shapes found in atomic physics or high-Q mechanical resonances, which combine Gaussian (Doppler broadening, etc.) and Lorentzian (collision/natural broadening, etc.) characteristics. It is calculated efficiently using the Faddeeva function.

  • Related API: Noise (gwexpy.noise.peaks.voigt_line)


Advanced Analysis Engines and Algorithms#

1. Independent and Principal Component Analysis (ICA/PCA)#

The ICA/PCA implementation in gwexpy provides preprocessing and metadata behavior intended for physical-data workflows:

  • Unit Variance Standardization: Standardizes data to unit variance internally to improve convergence, then restores (re-scales) the original physical scale after computation.

  • Spatio-temporal Metadata Inheritance: Automatically inherits the GPS time conventions from the input data for each statistically extracted component.

  • Related API: Signal Processing (ICA, PCA)

2. Fast Correlation Engine (:term:Bruco)#

The FastCoherenceEngine supports batch coherence scans over auxiliary channels for a target signal.

  • FFT Caching: Reuses FFT results for a common target signal in memory.

  • Sparse-like Computation: Skips non-correlated channels early to focus resources on significant contributors.

  • Related API: Analysis (gwexpy.analysis.bruco.FastCoherenceEngine)

3. Bayesian Inference and GLS Fitting#

Handles parameter estimation for multidimensional data with complex error structures.

  • GLS (Generalized Least Squares): Applies statistically justified weighting when bins at different frequencies have correlated (non-diagonal) covariance.

  • MCMC Integration: Uses emcee for posterior sampling, enabling robust fitting even for non-linear physical models.

  • Related API: Analysis