jesterTOV.inference.flows module#
Normalizing flow models for gravitational wave and other posterior density estimation. JESTER uses normalizing flows to build smooth density estimates from discrete posterior samples — for example from bilby GW analyses — so they can be evaluated at arbitrary points during inference.
Flow Model#
The Flow class is the central object: it wraps a trained
flowjax normalizing flow and exposes a simple log_prob
interface that handles data standardization automatically.
|
Wrapper class for flowjax normalizing flows with automatic standardization handling. |
|
Load a trained flow model from saved files. |
Training#
Flows are trained on posterior samples (stored as .npz files) using
train_flow_from_config(), which is driven by
FlowTrainingConfig. The CLI entry point
jester_train_flow invokes main() directly.
|
Configuration for training normalizing flows on posterior samples. |
|
Load posterior samples from npz file with flexible parameter selection. |
|
Train the normalizing flow on data. |
Train a normalizing flow using a configuration object. |
|
|
Save trained flow model, architecture kwargs, and metadata. |
Bilby Posterior Extraction#
When starting from a bilby HDF5 result file (e.g. a published GW analysis), use
extract_gw_posterior_from_bilby() to extract
the relevant posterior columns into a .npz file that the flow-training pipeline can consume.
The CLI entry point jester_extract_gw_posterior_bilby exposes this function without requiring
a full bilby installation.
Extract GW posterior samples from a bilby result HDF5 file. |