spvctrl.scripts.convert_legacy.load_legacy_spv#
- load_legacy_spv(bin_file: str | Path, name: str | None = None, variant: str | None = None, data_dir: str | Path | None = None, N: int = 5000) TspvData[source]#
Load a legacy MVP measurement (.bin + .txt) as a TspvData object.
The legacy MVP measured only the SPV channel, so the diode channel is filled with NaN. The pre-trigger samples are stripped. The returned TspvData contains the full-resolution raw data and the recalculated downsampled data, and can be saved and finalized, e.g. with
spvctrl.data.finalize.finalize_transient()(writes .tspv, csv and plots intodata_dir).- Parameters:
bin_file – Path of the legacy .bin file (the .txt file with the parameters must be next to it)
name – Name of the measurement. Defaults to the file name without extension.
variant – Hierarchy variant key, e.g. ‘wl=355nm’. Defaults to the wavelength parsed from the file name (
wl=<n>nm) if present.data_dir – Directory the TspvData is associated with, e.g. where it is finalized. Defaults to the directory of the .bin file.
N – Number of points of the downsampled data
- Returns:
TspvData with the measurement data