gwkokab.analysis.n_pls_m_gs.analytical_gwalk¶

The analytical_gwalk_n_pls_m_gs console script: N power-law plus M Gaussian inference over per-event Gaussian summaries.

One cell of the analysis matrix. The family half is NPowerlawMGaussianCore, which names the parameters and hyper-parameters; the data-representation half is AnalyticalGWalkBase, which supplies read_data and run. The sampler half is chosen at runtime by sampler_cfg.json, which is why there are two trivial subclasses – one mixing in flowMC, one NumPyro – and main() picks between them after reading that file.

Classes¶

NPowerlawMGaussianAnalyticalGWalkAnalysis

N power-law plus m gaussian analysis over per-event Gaussian summaries.

NPowerlawMGaussianFAnalyticalGWalkAnalysis

N power-law plus m gaussian analysis over per-event Gaussian summaries, sampled

NPowerlawMGaussianNAnalyticalGWalkAnalysis

N power-law plus m gaussian analysis over per-event Gaussian summaries, sampled

Functions¶

main(→ None)

Console script entry point for analytical_gwalk_n_pls_m_gs.

Module Contents¶

class gwkokab.analysis.n_pls_m_gs.analytical_gwalk.NPowerlawMGaussianAnalyticalGWalkAnalysis(N_pl: int, N_g: int, use_beta_spin_magnitude: bool, use_spin_magnitude_mixture: bool, use_truncated_normal_spin_x: bool, use_truncated_normal_spin_y: bool, use_truncated_normal_spin_z: bool, use_chi_eff_mixture: bool, use_skew_normal_chi_eff: bool, use_truncated_normal_chi_p: bool, use_tilt: bool, use_eccentricity_mixture: bool, use_eccentricity_powerlaw: bool, use_powerlaw_redshift: bool, use_madau_dickinson_redshift: bool, use_cos_iota: bool, use_phi_12: bool, use_polarization_angle: bool, use_right_ascension: bool, use_sin_declination: bool, use_detection_time: bool, use_phi_1: bool, use_phi_2: bool, use_phi_orb: bool, use_mean_anomaly: bool, likelihood_fn: collections.abc.Callable[..., collections.abc.Callable], data_loader: gwkokab.analysis.core.inference_io.AnalyticalGWalkPELoader, prior_filename: str, poisson_mean_filename: str, sampler_cfg, variance_cut_threshold: float | None, n_samples: int, debug_nans: bool = False, profile_memory: bool = False, check_leaks: bool = False)¶

Bases: gwkokab.analysis.n_pls_m_gs.common.NPowerlawMGaussianCore, gwkokab.analysis.core.analytical_gwalk_base.AnalyticalGWalkBase

N power-law plus m gaussian analysis over per-event Gaussian summaries.

Combines NPowerlawMGaussianCore with AnalyticalGWalkBase. Sampler-agnostic: mix in FlowMCBase or NumpyroBase to get a runnable analysis.

Configure both halves of the analysis.

The model and component arguments are forwarded to NPowerlawMGaussianCore, and the data, prior, selection-function and sampler arguments to AnalyticalGWalkBase. See those two constructors for the full parameter list.

class gwkokab.analysis.n_pls_m_gs.analytical_gwalk.NPowerlawMGaussianFAnalyticalGWalkAnalysis(N_pl: int, N_g: int, use_beta_spin_magnitude: bool, use_spin_magnitude_mixture: bool, use_truncated_normal_spin_x: bool, use_truncated_normal_spin_y: bool, use_truncated_normal_spin_z: bool, use_chi_eff_mixture: bool, use_skew_normal_chi_eff: bool, use_truncated_normal_chi_p: bool, use_tilt: bool, use_eccentricity_mixture: bool, use_eccentricity_powerlaw: bool, use_powerlaw_redshift: bool, use_madau_dickinson_redshift: bool, use_cos_iota: bool, use_phi_12: bool, use_polarization_angle: bool, use_right_ascension: bool, use_sin_declination: bool, use_detection_time: bool, use_phi_1: bool, use_phi_2: bool, use_phi_orb: bool, use_mean_anomaly: bool, likelihood_fn: collections.abc.Callable[..., collections.abc.Callable], data_loader: gwkokab.analysis.core.inference_io.AnalyticalGWalkPELoader, prior_filename: str, poisson_mean_filename: str, sampler_cfg, variance_cut_threshold: float | None, n_samples: int, debug_nans: bool = False, profile_memory: bool = False, check_leaks: bool = False)¶

Bases: NPowerlawMGaussianAnalyticalGWalkAnalysis, gwkokab.analysis.core.flowMC_base.FlowMCBase

N power-law plus m gaussian analysis over per-event Gaussian summaries, sampled with flowMC.

Selected by main() when sampler_cfg.json names flowMC.

Configure both halves of the analysis.

The model and component arguments are forwarded to NPowerlawMGaussianCore, and the data, prior, selection-function and sampler arguments to AnalyticalGWalkBase. See those two constructors for the full parameter list.

class gwkokab.analysis.n_pls_m_gs.analytical_gwalk.NPowerlawMGaussianNAnalyticalGWalkAnalysis(N_pl: int, N_g: int, use_beta_spin_magnitude: bool, use_spin_magnitude_mixture: bool, use_truncated_normal_spin_x: bool, use_truncated_normal_spin_y: bool, use_truncated_normal_spin_z: bool, use_chi_eff_mixture: bool, use_skew_normal_chi_eff: bool, use_truncated_normal_chi_p: bool, use_tilt: bool, use_eccentricity_mixture: bool, use_eccentricity_powerlaw: bool, use_powerlaw_redshift: bool, use_madau_dickinson_redshift: bool, use_cos_iota: bool, use_phi_12: bool, use_polarization_angle: bool, use_right_ascension: bool, use_sin_declination: bool, use_detection_time: bool, use_phi_1: bool, use_phi_2: bool, use_phi_orb: bool, use_mean_anomaly: bool, likelihood_fn: collections.abc.Callable[..., collections.abc.Callable], data_loader: gwkokab.analysis.core.inference_io.AnalyticalGWalkPELoader, prior_filename: str, poisson_mean_filename: str, sampler_cfg, variance_cut_threshold: float | None, n_samples: int, debug_nans: bool = False, profile_memory: bool = False, check_leaks: bool = False)¶

Bases: NPowerlawMGaussianAnalyticalGWalkAnalysis, gwkokab.analysis.core.numpyro_base.NumpyroBase

N power-law plus m gaussian analysis over per-event Gaussian summaries, sampled with NumPyro.

Selected by main() when sampler_cfg.json names numpyro.

Configure both halves of the analysis.

The model and component arguments are forwarded to NPowerlawMGaussianCore, and the data, prior, selection-function and sampler arguments to AnalyticalGWalkBase. See those two constructors for the full parameter list.

gwkokab.analysis.n_pls_m_gs.analytical_gwalk.main() → None¶

Console script entry point for analytical_gwalk_n_pls_m_gs.

Parses the command line, reads the sampler and data loader configurations, picks the likelihood and the analysis class matching the configured sampler, seeds the PRNG, and runs the analysis.