Parameter Estimation

EMRI parameter estimation: waveform generation, Fisher matrix, SNR, and Cramér-Rao bounds.

ParameterEstimation drives the core computational pipeline: it generates LISA TDI waveforms using the few package, computes the signal-to-noise ratio, and — for detections above the SNR threshold — evaluates the full Fisher information matrix via a 5-point finite-difference stencil to obtain Cramér-Rao lower bounds on all 14 EMRI parameters.

class master_thesis_code.parameter_estimation.parameter_estimation.ParameterEstimation(waveform_generation_type, parameter_space, *, use_gpu=True, use_five_point_stencil=True)[source]

Bases: object

EMRI waveform-based parameter estimation using the LISA Fisher information matrix.

Generates LISA TDI waveforms via the few package, computes the noise-weighted signal-to-noise ratio, and — for detections above the SNR threshold — evaluates the full \(14 \times 14\) Fisher matrix using a 5-point finite-difference stencil to obtain Cramér-Rao lower bounds on all EMRI parameters.

Variables:
  • parameter_space (master_thesis_code.datamodels.parameter_space.ParameterSpace) – 14-parameter EMRI configuration space.

  • lisa_response_generator (Any) – LISA TDI response generator for the full 5-year observation.

  • snr_check_generator (Any) – LISA TDI response generator for the 1-year SNR pre-check.

  • dt (int) – Time sampling interval in seconds.

  • T (float) – Observation time in years.

Parameters:
  • waveform_generation_type (WaveGeneratorType)

  • parameter_space (ParameterSpace)

  • use_gpu (bool)

  • use_five_point_stencil (bool)

SNR_analysis()[source]
Return type:

None

T: float = 5
compute_Cramer_Rao_bounds()[source]
Return type:

dict

compute_fisher_information_matrix()[source]
Return type:

Any

compute_signal_to_noise_ratio(use_snr_check_generator=False)[source]
Parameters:

use_snr_check_generator (bool)

Return type:

float

dt: int = 10
finite_difference_derivative()[source]

Compute partial derivative of the currently set parameters w.r.t. the provided parameter.

Parameters:

parameter_symbol (str) – parameter w.r.t. which the derivative is taken (Note: symbol string has to coincide with that in the ParameterSpace list!)

Returns:

mapping of parameter symbol to its derivative array (numpy.ndarray on CPU, cupy.ndarray on GPU; resolved by self._xp).

Return type:

dict[str, Any]

five_point_stencil_derivative()[source]

Compute partial derivatives for all parameters using the 5-point stencil method.

Uses the O(epsilon^4) central-difference stencil for each of the 14 EMRI parameters, matching the API of finite_difference_derivative() so the two methods are interchangeable in compute_fisher_information_matrix().

Returns:

Dictionary mapping parameter symbol to its derivative array.

Raises:

ParameterOutOfBoundsError – If the stencil would evaluate outside parameter bounds.

Return type:

dict[str, Any]

References

Vallisneri (2008), arXiv:gr-qc/0703086 — derivative accuracy for Fisher matrices.

flush_pending_results()[source]

Append all buffered Cramér-Rao bound rows to disk and clear the buffer.

Call this at the end of a simulation run to ensure no results are lost, and periodically (every _crb_flush_interval detections) during the run.

Rows are grouped by simulation index (in practice always the same within a job) and APPENDED to each file (mode="a"), writing only the buffered rows rather than re-reading and rewriting the whole growing CSV. Each array task writes its OWN file, so there are no concurrent writers and append is safe. Append makes each flush O(buffer) instead of O(total), so frequent flushing (small _crb_flush_interval) costs LESS Lustre I/O than the old every-25 read-modify-write while bounding hard-kill data loss. The header is written only when the file does not yet exist (or is empty); the per-detection row dict is constructed identically every time, so columns stay aligned across appends.

Return type:

None

generate_lisa_response(update_parameter_dict={}, use_snr_check_generator=False)[source]
Parameters:
  • update_parameter_dict (dict[str, Any])

  • use_snr_check_generator (bool)

Return type:

Any

lisa_response_generator: Any
parameter_space: ParameterSpace
save_cramer_rao_bound(cramer_rao_bound_dictionary, snr, simulation_index, host_galaxy_index=-1, in_catalog=True)[source]
Parameters:
  • cramer_rao_bound_dictionary (dict)

  • snr (float)

  • simulation_index (int)

  • host_galaxy_index (int)

  • in_catalog (bool)

Return type:

None

save_snr_analysis(snr, parameter_set_index)[source]
Parameters:
  • snr (float)

  • parameter_set_index (int)

Return type:

None

scalar_product_of_functions(tdi_channels_a, tdi_channels_b)[source]

LISA noise-weighted inner product between two TDI waveforms.

Implements the standard gravitational-wave inner product:

\[\langle h_1 \mid h_2 \rangle = 4 \,\mathrm{Re} \sum_{\alpha \in \{A, E\}} \int_{f_\min}^{f_\max} \frac{\tilde{h}_1^\alpha(f)\, \tilde{h}_2^{\alpha *}(f)}{S_n^\alpha(f)} \, df\]

summed over TDI channels, where \(S_n^\alpha(f)\) is the one-sided noise PSD from power_spectral_density().

This is the computational hot path: it is called \(O(N_\theta^2)\) times per Fisher matrix (105 calls for 14 parameters using the 5-point stencil).

Parameters:
  • tdi_channels_a (ndarray[tuple[Any, ...], dtype[float64]]) – TDI waveform array of shape (n_channels, n_samples).

  • tdi_channels_b (ndarray[tuple[Any, ...], dtype[float64]]) – TDI waveform array of shape (n_channels, n_samples).

Returns:

Real-valued inner product \(\langle h_1 \mid h_2 \rangle\).

Return type:

float

snr_check_generator: Any