Skip to content

Fix covariance QA and posterior transform plotting#7

Open
botjean wants to merge 1 commit into
JETSCAPE:mainfrom
botjean:fix/covariance-plotting-and-qa
Open

Fix covariance QA and posterior transform plotting#7
botjean wants to merge 1 commit into
JETSCAPE:mainfrom
botjean:fix/covariance-plotting-and-qa

Conversation

@botjean

@botjean botjean commented May 26, 2026

Copy link
Copy Markdown

Summary

This PR fixes several issues encountered when running the covariance-enabled Bayesian workflow on current table snapshots:

  • ignore filesystem sidecars / stray non-table files during table loading
  • add reproducible emcee seeding and persist lightweight chain QA diagnostics
  • fix plot_mcmc compatibility with the current MCConfig
  • add config-driven posterior transform plotting from unit-space to physical parameters
  • make observable panel plotting robust when plot_panel_shapes is omitted
  • replace / add regression tests covering these paths

Details

Table loading

  • Skip :Zone.Identifier sidecars and other non-table junk files in Data/, Design/, and Prediction/
  • Add a loader integration test covering sidecars and stray files

MCMC reproducibility and QA

  • Add optional random_seed support to the emcee sampler
  • Seed both initial positions and emcee's internal RNG
  • Persist random_seed and chain_diagnostics into mcmc.h5
  • Add tests for deterministic seeded short chains
  • Add tests for chain diagnostics and input validation

Posterior plotting

  • Fix acceptance-fraction plotting so it no longer assumes config.n_walkers
  • Add plot_posterior_transform.py to generate:
    • unit-space 1D/2D posterior plots
    • physical-space 1D/2D posterior plots
    • linear-axis variants for transformed parameters when useful
    • posterior_unit_and_physical.npz
    • posterior_transform_summary.txt
  • Drive the transform from YAML via parameterization.<name>.physical_posterior_transform
  • Add guards for invalid / nonpositive values on log-scaled transformed axes

Plot utility robustness

  • Fall back to an automatically derived subplot grid when plot_panel_shapes is not specified

Tests

  • Replace the broken fixture-dependent outlier smoothing test with a self-contained synthetic test
  • Add transform tests, including inverse-step support and log-axis filtering behavior

Validation

  • pytest: 16 passed
  • Verified real plotting reruns on saved detailed and compact outputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant