jesterTOV.inference.postprocessing module

jesterTOV.inference.postprocessing module#

Visualization and analysis tools for EOS inference results. After a sampling run completes, the postprocessing module produces a standard suite of diagnostic and publication-quality plots from the HDF5 result file written by InferenceResult. The CLI entry point run_jester_postprocessing (see main()) can be called with the same config.yaml used for inference.

Configuration#

Postprocessing behaviour is controlled through the postprocessing block of the inference configuration file, parsed into PostprocessingConfig.

Data Loading#

load_eos_data(outdir)

Load EOS data from the specified output directory.

load_prior_data([prior_dir])

Load prior EOS data for comparison.

load_injection_eos(injection_path)

Load injection EOS data from an NPZ file.

Plotting Functions#

The main entry point is generate_all_plots(), which calls each individual plot function in sequence. Individual functions can also be called directly for custom workflows.

generate_all_plots(outdir[, prior_dir, ...])

Generate selected plots for the specified output directory.

make_cornerplot(data, outdir[, max_params, ...])

Create a cornerplot for EOS parameters.

make_mass_radius_plot(data, prior_data, outdir)

Create a mass-radius plot with posterior probability colouring.

make_mass_lambda_plot(data, prior_data, outdir)

Create a mass-Lambda plot with posterior probability colouring.

make_mass_lambda_ratio_plot(data, outdir, ...)

Create a mass-Lambda ratio plot relative to the injection.

make_pressure_density_plot(data, prior_data, ...)

Create an equation-of-state plot (pressure vs density).

make_cs2_plot(data, prior_data, outdir[, ...])

Create a speed-of-sound-squared vs density plot.

make_parameter_histograms(data, outdir[, ...])

Create KDE histograms for key EOS-derived parameters.

make_contour_radii_plot(data, prior_data, outdir)

Create a contour plot of radii vs mass.

make_contour_pressures_plot(data, outdir[, ...])

Create a contour plot of pressure vs density.

Utilities#

setup_matplotlib([use_tex])

Configure matplotlib with TeX rendering and sensible defaults.

report_credible_interval(values[, hdi_prob, ...])

Compute a symmetric credible interval around the median.

run_from_config(config_path)

Run postprocessing from a YAML config file.