Data Models

Parameter Space

class master_thesis_code.datamodels.parameter_space.Parameter(symbol, unit, lower_limit, upper_limit, value=0.0, derivative_epsilon=1e-06, is_fixed=False, randomize_by_distribution=<function uniform>)[source]

Bases: object

Main class for parameters.

Parameters:
  • symbol (str)

  • unit (str)

  • lower_limit (float)

  • upper_limit (float)

  • value (float)

  • derivative_epsilon (float)

  • is_fixed (bool)

  • randomize_by_distribution (Callable[[float, float, Generator], float])

derivative_epsilon: float = 1e-06
is_fixed: bool = False
lower_limit: float
randomize_by_distribution(upper_limit, rng)
Parameters:
  • lower_limit (float)

  • upper_limit (float)

  • rng (Generator)

Return type:

float

symbol: str
unit: str
upper_limit: float
value: float = 0.0
class master_thesis_code.datamodels.parameter_space.ParameterSpace(M=<factory>, mu=<factory>, a=<factory>, p0=<factory>, e0=<factory>, x0=<factory>, luminosity_distance=<factory>, qS=<factory>, phiS=<factory>, qK=<factory>, phiK=<factory>, Phi_phi0=<factory>, Phi_theta0=<factory>, Phi_r0=<factory>)[source]

Bases: object

Dataclass to manage the parameter space of a simulation.

Parameters:
M: Parameter
Phi_phi0: Parameter
Phi_r0: Parameter
Phi_theta0: Parameter
a: Parameter
e0: Parameter
luminosity_distance: Parameter
mu: Parameter
p0: Parameter
phiK: Parameter
phiS: Parameter
qK: Parameter
qS: Parameter
randomize_parameter(parameter, rng)[source]
Parameters:
Return type:

None

randomize_parameters(rng=None)[source]
Parameters:

rng (Generator | None)

Return type:

None

set_host_galaxy_parameters(host_galaxy, h)[source]
Parameters:
  • host_galaxy (HostGalaxy)

  • h (float)

Return type:

None

x0: Parameter
master_thesis_code.datamodels.parameter_space.log_uniform(lower_limit, upper_limit, rng)[source]
Parameters:
  • lower_limit (float)

  • upper_limit (float)

  • rng (Generator)

Return type:

float

master_thesis_code.datamodels.parameter_space.polar_angle_distribution(lower_limit, upper_limit, rng)[source]
Parameters:
  • lower_limit (float)

  • upper_limit (float)

  • rng (Generator)

Return type:

float

master_thesis_code.datamodels.parameter_space.uniform(lower_limit, upper_limit, rng)[source]
Parameters:
  • lower_limit (float)

  • upper_limit (float)

  • rng (Generator)

Return type:

float

Detection (Cramér-Rao)

Detection datamodel for Cramér-Rao bounds based EMRI inference.

class master_thesis_code.datamodels.detection.Detection(parameters)[source]

Bases: object

EMRI detection parsed from Cramér-Rao bounds CSV output.

Stores the maximum-likelihood parameter estimates and their 1-σ errors derived from the Fisher information matrix for a single detected EMRI event.

Variables:
  • d_L (float) – Luminosity distance \(d_L\) in Gpc.

  • d_L_uncertainty (float) – 1-σ error on \(d_L\) in Gpc, equal to \(\sqrt{\Gamma^{-1}_{d_L d_L}}\).

  • phi (float) – Sky azimuthal angle \(\phi_S\) in radians.

  • phi_error (float) – 1-σ error on \(\phi_S\) in radians.

  • theta (float) – Sky polar angle \(\theta_S\) (= \(q_S\)) in radians.

  • theta_error (float) – 1-σ error on \(\theta_S\) in radians.

  • M (float) – Redshifted central BH mass \(M_z\) in solar masses.

  • M_uncertainty (float) – 1-σ error on \(M_z\) in solar masses.

  • theta_phi_covariance (float) – Off-diagonal Cramér-Rao element \(C_{\theta\phi}\) in rad².

  • M_phi_covariance (float) – Off-diagonal element \(C_{M\phi}\) in \(M_\odot \cdot \mathrm{rad}\).

  • M_theta_covariance (float) – Off-diagonal element \(C_{M\theta}\) in \(M_\odot \cdot \mathrm{rad}\).

  • d_L_M_covariance (float) – Off-diagonal element \(C_{d_L M}\) in \(\mathrm{Gpc} \cdot M_\odot\).

  • d_L_theta_covariance (float) – Off-diagonal element \(C_{d_L\theta}\) in \(\mathrm{Gpc} \cdot \mathrm{rad}\).

  • d_L_phi_covariance (float) – Off-diagonal element \(C_{d_L\phi}\) in \(\mathrm{Gpc} \cdot \mathrm{rad}\).

  • host_galaxy_index (int) – Index of the host galaxy in the galaxy catalog.

  • snr (float) – Signal-to-noise ratio (dimensionless).

  • WL_uncertainty (float) – Weak-lensing contribution to the \(d_L\) uncertainty in Gpc.

Parameters:

parameters (Series)

M: float
M_phi_covariance: float
M_theta_covariance: float
M_uncertainty: float
WL_uncertainty: float = 0.0
convert_to_best_guess_parameters(rng=None)[source]

Draw simulated measured parameters from the Fisher-matrix posterior.

When rng is provided, draws a single correlated sample from the 4-dimensional multivariate normal defined by the full Cramér-Rao covariance sub-matrix for (phi, theta, d_L, M) and clips to physical bounds. This is the standard procedure in the GW literature (Cutler & Flanagan 1994; Vallisneri 2008, arXiv:gr-qc/0703086).

When rng is None the legacy behaviour is preserved: four independent truncated-normal draws from the marginal distributions.

Parameters:

rng (Generator | None) – NumPy random generator for reproducible, correlated draws. Pass None to keep the legacy independent-sampling path.

Return type:

None

d_L: float
d_L_M_covariance: float
d_L_phi_covariance: float
d_L_theta_covariance: float
d_L_uncertainty: float
get_relative_distance_error()[source]
Return type:

float

get_skylocalization_error()[source]
Return type:

float

host_galaxy_index: int
phi: float
phi_error: float
snr: float
theta: float
theta_error: float
theta_phi_covariance: float