vipr_reflectometry.panpe.plot_scripts package

Submodules

vipr_reflectometry.panpe.plot_scripts.panpe_posterior_plot module

Standalone PANPE posterior samples plot.

Run with:

python panpe_posterior_plot.py [-o output.svg]

No VIPR or PyTorch installation required. The data file is an NPZ archive located next to this script. Dependencies: matplotlib>=3.5.0, numpy>=1.21.0

vipr_reflectometry.panpe.plot_scripts.panpe_posterior_plot.find_data_file() Path

Locate companion NPZ in scripts/ directory relative to this script.

vipr_reflectometry.panpe.plot_scripts.panpe_posterior_plot.make_plot(data_path: Path | None = None, *, samples_alpha: float = 0.2, data_color: str = 'm', data_lw: float = 2, figsize: tuple = (15, 5), title: str = 'PANPE Posterior Samples') Figure

Reproduce the PANPE posterior samples plot from an NPZ archive.

The left panel shows sampled reflectivity curves R(q) vs q together with the measured data. The right panel shows the corresponding SLD profiles. Curves are colour-coded by distance to the MAP profile (closer → warmer).

Parameters:
  • data_path – Path to the NPZ file. Auto-detected if None.

  • samples_alpha – Transparency of individual posterior curves.

  • data_color – Colour for the measured data.

  • data_lw – Line width for the measured data.

  • figsize – Figure size in inches.

  • title – Suptitle shown above the figure.

Returns:

matplotlib Figure.

Module contents

Standalone plot scripts for PANPE results.