spvctrl.measurement.measurement.measure_transient#
- measure_transient(settings: TspvSettings, laser: LaserOpo | None, osci: Oscilloscope, name: str | None = None, data_dir: str | Path | None = None, 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) tuple[ndarray, list[str], Path][source]#
Measure a single transient surface photovoltage.
Applies the settings to the devices, runs the pulse acquisition in a worker thread, shows a live view of the running average and stores the data in the cache directory:
PART_-prefixed per-pulse hdf5 files (always written, format perMeasurementParameters.pulse_storage) and the averaged data. In single acquisition mode, only the SPV channel is recorded and returned.- Parameters:
settings – All measurement settings.
laser – Laser device, or None to not control the laser.
osci – Oscilloscope device.
name – Name of the measurement, used for the cache directory name. Defaults to ‘transient’.
data_dir – Exact measurement directory to store the data in. Defaults to a new directory in
data_dir_cachenamed<date>_<name>.data_dir_cache – Cache directory where the measurement directory is created.
live_view – Whether to show a live view of the running average.
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, 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.
- Returns:
(data, columns, data_dir) with columns [“t_s”, “U_spv_V”, “U_diode_V”] in dual mode (“t_s”, “U_spv_V” in single mode), where data is the averaged transient stripped of pre-trigger samples, and data_dir is the measurement directory in the cache.