spvctrl.measurement.scan.scan_wavelength#

scan_wavelength(settings: TspvSettings, laser, osci, wavelengths_nm: list[float], series: str, data_dir_cache: str | Path = '~/.cache/spvctrl/data', live_view: bool = True, compress_data: bool = True, setup_info: TspvSetupInfo | dict | None = None, sample: Sample | str | None = None, **kw) → list[TspvData][source]#

Measure a transient at each of the given wavelengths.

All transients are stored as hierarchy variants (wl=<wl>nm) in ONE series .tspv file in the cache directory. A repeated wavelength is stored as an additional variant with a numeric suffix (wl=355nm-2), so that it does not overwrite the data of the earlier point. The per-point measurement data (partial pulse files, average, metadata) is stored in a subdirectory of the series directory for each wavelength. The csv file and plots of each point are written into the point directory.

Parameters:
  • settings – All measurement settings. The wavelength in settings.laser is ignored and replaced per point.

  • laser – The (connected) laser device.

  • osci – The (connected) oscilloscope device.

  • wavelengths_nm – List of wavelengths in nm to measure at.

  • series – Name of the series, used for the series directory and file names. Defaults to ‘wl-scan’.

  • data_dir_cache – Cache directory where the series directory is created.

  • live_view – Whether to show a live view of each point.

  • compress_data – Whether to gzip-compress the data files (with the byte-shuffle filter).

  • setup_info – Setup description (e.g. buffer, laser temperatures) recorded in the metadata.yaml of each point, either as a TspvSetupInfo object or as a preprocessed dict, or None to not record setup info.

  • sample – Sample object, or its name as stored in the sample database, or a name not present in the database (stored as plain string), or None (stored as null). Recorded in the metadata.yaml of each point.

  • kw – Passed on to spvctrl.measurement.measurement.measure_transient().

Returns:

List of TspvData, one per scan point.