spvctrl.scripts.test_data.write_demo_dataset#

write_demo_dataset(path: str | Path, series: str = 'demo', wavelengths: tuple[float, ...] = (350.0, 450.0, 550.0), spv_A0_V: float = 0.15, spv_tau_s: float = 0.001, variant_amplitude_step_V: float = 0.025, **dataset_kw) → Path[source]#

Generate a multi-variant demo series and finalize it to path, like a full measurement.

For every wavelength a variant wl=<wavelength>nm is generated (the SPV amplitude A0 increases by variant_amplitude_step_V per variant), stored as a full measurement with the raw and log-subsampled versions, the averaged part and all individual pulses (pulse0001 …), and finalized with csv, plots and metadata into the variant subdirectory.

The resulting layout in path is:

<path>/
  <series>.tspv            # all versions x variants x parts
  log-sub/wl=350.0nm/      # <series>.csv, *.pdf plots, metadata.yaml
  log-sub/wl=450.0nm/
  log-sub/wl=550.0nm/
Parameters:
  • path – Target directory of the demo series; created if it does not exist.

  • series – Series name of the demo dataset.

  • wavelengths – Laser wavelengths in nm, one per variant.

  • spv_A0_V – SPV amplitude A of the first pulse of the first variant in V.

  • spv_tau_s – SPV decay time constant in s.

  • variant_amplitude_step_V – SPV amplitude increase per variant in V.

  • dataset_kw – Passed on to make_adc_dataset() (e.g. n_pulses, sample_rate_Hz, the diode parameters).

Returns:

The series directory path.