gwkokab.inference.factory¶
Factory for fetching the correct likelihood function based on the specified sampler backend and analysis type.
Functions¶
|
Fetch the likelihood factory for a sampler backend and analysis type. |
Module Contents¶
- gwkokab.inference.factory.get_likelihood_fn(sampler_name: Literal['flowMC', 'numpyro'], analysis_type: Literal['discrete', 'analytical_gwalk']) Callable[..., Callable][source]¶
Fetch the likelihood factory for a sampler backend and analysis type.
The 2x2 of
(sampler backend, data representation)maps onto the four modules ofgwkokab.inference. The sampler is chosen at runtime fromsampler_cfg.jsonrather than by the console script, which is why this dispatch exists.- Parameters:
sampler_name (Literal["flowMC", "numpyro"]) – Which sampler backend will consume the likelihood.
analysis_type (Literal["discrete", "analytical_gwalk"]) – Whether events are represented by posterior samples or by Gaussian summaries.
- Returns:
The matching likelihood factory, which builds the callable the sampler runs.
- Return type:
Callable[…, Callable]
- Raises:
LoggedValueError – If
sampler_nameis not recognised.