prsctrl.data.plot.plot_data#

plot_data(data: PrsData, basename: str | None = None, out_dir: Path | str | None = None, title: str | None = None, **plot_spectrum_kw) → None[source]#

Convenience function that generates and saves useful plots.

If the data has AC <.PrsData.has_AC() and DC <.PrsData.has_DC() data:

  1. dI-X/I

  2. dI/I, dI-X/I, dI-Y/I

  3. dI_I, dI, lock-in-R, theta-corr, lock-in-theta, I

  4. Errors of 3.

  5. Modulus plot of dI-X/I

  6. X/Y 2D plot

If the data also has multiple offset measurement, plots offsets over time.

If the data only has DC <.PrsData.has_DC() data, plots only I with error.

Parameters:
  • data – PrsData data object.

  • basename – Base filename. Defaults to the data's full name.

  • out_dir – Output directory. Defaults to the the data directory.

  • title – Optional title of the plots. If None, title may is set to data full name.

  • plot_spectrum_kw – Keyword arguments passed to plot_spectrum().