Architecture¶
The codebase has two distinct pipelines: the EMRI Simulation Pipeline and the Bayesian Inference Pipeline.
EMRI Simulation Pipeline¶
main.py:data_simulation() drives a loop over simulation_steps:
Model1CrossCheck(cosmological model) samples EMRI events from a distribution.GalaxyCatalogueHandlerresolves each event to a host galaxy from the GLADE catalog.ParameterSpace.randomize_parameters()+set_host_galaxy_parameters()set up the 14-parameter EMRI.ParameterEstimation.compute_signal_to_noise_ratio()computes SNR using a LISA waveform.If SNR ≥ threshold:
compute_Cramer_Rao_bounds()computes the Fisher matrix and saves to CSV.
Bayesian Inference Pipeline¶
main.py:evaluate() → BayesianStatistics.evaluate():
Loads saved Cramér-Rao bounds from CSV.
Uses
BayesianInference(inbayesian_inference/bayesian_inference.py) to compute the posterior over H₀.GalaxyCatalogmodels the galaxy distribution and mass distribution using normal/truncnorm distributions.
Key Data Flow¶
ParameterSpace (14 params)
│
▼
WaveformGenerator (few / ResponseWrapper)
│
▼
ParameterEstimation
├── compute_signal_to_noise_ratio() → SNR
└── compute_Cramer_Rao_bounds() → Fisher matrix → CSV
│
┌────────────────┘
▼
Detection (from CSV)
│
▼
BayesianInference
│
▼
posterior p(H₀ | {dᵢ})
Module Responsibilities¶
Module |
Responsibility |
|---|---|
|
Waveform generation via |
|
LISA antenna patterns (F+, F×), PSD, SSB↔detector frame transformations. |
|
14-parameter EMRI space with randomization and bounds. |
|
|
|
|
|
|
|
|
|
|
|
Interfaces with the GLADE galaxy catalog (BallTree-based lookups). |
|
Canonical distance functions: |
|
All physical constants and simulation configuration.
Key: |
GPU / CPU Portability¶
All computation functions resolve the array module via the _get_xp pattern, so
the same code runs on both NumPy (CPU) and CuPy (GPU) without branching.
See Quickstart for how to install the GPU extras.