erlab.io.igor

Module Attributes

load_pxp(filename[, folder, prefix, ignore, ...])

Alias for load_experiment().

load_ibw(wave[, data_dir])

Alias for load_wave().

Functions

load_experiment(filename[, folder, prefix, ...])

Load waves from an igor experiment (pxp) file.

load_ibw(wave[, data_dir])

Alias for load_wave().

load_igor_hdf5(filename)

Load a HDF5 file exported by Igor Pro into an xarray.Dataset.

load_pxp(filename[, folder, prefix, ignore, ...])

Alias for load_experiment().

load_wave(wave[, data_dir])

Load a wave from Igor binary format.

erlab.io.igor.load_experiment(filename, folder=None, *, prefix=None, ignore=None, recursive=False, **kwargs)[source]

Load waves from an igor experiment (pxp) file.

Parameters:
  • filename (str | PathLike) – The experiment file.

  • folder (str | None) – Target folder within the experiment, given as a slash-separated string. If None, defaults to the root.

  • prefix (str | None) – If given, only include waves with names that starts with the given string.

  • ignore (list[str] | None) – List of wave names to ignore.

  • recursive (bool) – If True, includes waves in child directories.

  • **kwargs – Extra arguments to load_wave().

Returns:

Dataset containing the waves.

Return type:

xarray.Dataset

erlab.io.igor.load_igor_hdf5(filename)[source]

Load a HDF5 file exported by Igor Pro into an xarray.Dataset.

Parameters:

filename (str | PathLike) – The path to the file.

Returns:

The loaded data.

Return type:

xarray.Dataset

erlab.io.igor.load_wave(wave, data_dir=None)[source]

Load a wave from Igor binary format.

Parameters:
  • wave (dict | WaveRecord | str | PathLike) – The wave to load. It can be provided as a dictionary, an instance of igor2.record.WaveRecord, or a string representing the path to the wave file.

  • data_dir (str | PathLike | None) – The directory where the wave file is located. This parameter is only used if wave is a string or PathLike object. If None, wave must be a valid path.

Returns:

The loaded wave.

Return type:

xarray.DataArray

Raises:
  • ValueError – If the wave file cannot be found or loaded.

  • TypeError – If the wave argument is of an unsupported type.