load#
- kikuchipy.load(filename: str | Path, lazy: bool = False, **kwargs) EBSD | EBSDMasterPattern | ECPMasterPattern | List[EBSD] | List[EBSDMasterPattern] | List[ECPMasterPattern] [source]#
Load an
EBSD
,EBSDMasterPattern
orECPMasterPattern
signal from one of the Supported file formats.This function is a modified version of
hyperspy.io.load()
.- Parameters:
- filename
Name of file to load.
- lazy
Open the data lazily without actually reading the data from disk until required. Allows opening arbitrary sized datasets. Default is
False
.- **kwargs
Keyword arguments passed to the corresponding kikuchipy reader. See their individual documentation for available options.
- Returns:
out
Signal or a list of signals.
- Raises:
IOError
If the file was not found or could not be read.
Examples
Import nine patterns from an HDF5 file in a directory
DATA_DIR
>>> import kikuchipy as kp >>> s = kp.load(DATA_DIR + "/patterns.h5") >>> s <EBSD, title: patterns Scan 1, dimensions: (3, 3|60, 60)>