vipr_reflectometry.reflectorch.plot_scripts package

Submodules

vipr_reflectometry.reflectorch.plot_scripts.reflectivity_plot module

Standalone reflectivity plot — run with: python plot_<id>.py [-o output.svg]

No VIPR installation required. Dependencies: see __dependencies__ below.

vipr_reflectometry.reflectorch.plot_scripts.reflectivity_plot.find_data_file() Path
Locate the companion CSV data file by convention:

plot_<id>.py → <id>_data.csv

vipr_reflectometry.reflectorch.plot_scripts.reflectivity_plot.make_plot(x_exp: ndarray, y_exp: ndarray, x_model: ndarray, y_pred: ndarray, *, xerr: ndarray | None = None, yerr: ndarray | None = None, y_polished: ndarray | None = None, spectrum_index: int = 0, title: str | None = None, figsize: tuple[float, float] = (10, 6))

Create a reflectivity curve matplotlib figure.

Parameters:
  • x_exp – Experimental Q values (Å⁻¹)

  • y_exp – Experimental reflectivity

  • x_model – Model Q values (Å⁻¹)

  • y_pred – Predicted reflectivity

  • xerr – Q error bars (optional)

  • yerr – Reflectivity error bars (optional)

  • y_polished – Polished/refined curve (optional)

  • spectrum_index – Used for the default title

  • title – Override default axis title

  • figsize – Figure size in inches

Returns:

matplotlib Figure

Module contents

Standalone plot scripts for the reflectorch submodule.