erlab.io.igor¶
Backend for Igor Pro files.
Functions
|
Load waves from an Igor experiment file( |
|
Load a HDF5 file exported by Igor Pro into an |
|
Load a wave from Igor binary format. |
Classes
Backend for Igor Pro files. |
- class erlab.io.igor.IgorBackendEntrypoint[source]¶
Bases:
BackendEntrypointBackend for Igor Pro files.
It can open “.pxt”, “.pxp”, and “.ibw” files using the
igor2library.It also supports loading HDF5 files exported from Igor Pro.
For more information about the underlying library, visit: https://github.com/AFM-analysis/igor2
- description: ClassVar[str] = 'Open Igor Pro files (.pxt, .pxp and .ibw) in Xarray'¶
- url: ClassVar[str] = 'https://erlabpy.readthedocs.io/en/stable/generated/erlab.io.igor.html'¶
- erlab.io.igor.load_experiment(filename, folder=None, *, prefix=None, ignore=None, recursive=False, **kwargs)[source]¶
Load waves from an Igor experiment file(
pxpandpxt).Use
xarray.load_dataset()withbackend="erlab-igor"for consistency.- Parameters:
folder (
str|None, default:None) – Target folder within the experiment, given as a slash-separated string. IfNone, defaults to the root.prefix (
str|None, default:None) – If given, only include waves with names that starts with the given string.ignore (
Iterable[str] |None, default:None) – List of wave names to ignore.recursive (
bool, default:False) – IfTrue, includes waves in child directories.**kwargs – Extra arguments to
load_wave().
- Returns:
xarray.Dataset– Dataset containing the waves.- Return type:
- erlab.io.igor.load_igor_hdf5(filename)[source]¶
Load a HDF5 file exported by Igor Pro into an
xarray.Dataset.Use
xarray.load_dataset()withbackend="erlab-igor"for consistency.- Parameters:
- Returns:
xarray.Dataset– The loaded data.- Return type:
- erlab.io.igor.load_wave(wave, data_dir=None)[source]¶
Load a wave from Igor binary format.
Use
xarray.load_dataarray()withbackend="erlab-igor"for consistency.- Parameters:
wave (
dict|WaveRecord|str|PathLike) – The wave to load. It can be provided as a dictionary, an instance ofigor2.record.WaveRecord, or a string representing the path to the wave file.data_dir (
str|PathLike|None, default:None) – The directory where the wave file is located. This parameter is only used ifwaveis a string orPathLikeobject. IfNone,wavemust be a valid path.
- Returns:
xarray.DataArray– The loaded wave.- Raises:
ValueError – If the wave file cannot be found or loaded.
TypeError – If the wave argument is of an unsupported type.
- Return type: