- kikuchipy.io.plugins.ebsd_directory.file_reader(filename: str | Path, xy_pattern: str | None = None, show_progressbar: bool | None = None, lazy: bool = False) List[Dict] #
Read all images in a directory, assuming they are electron backscatter diffraction (EBSD) patterns of equal shape and data type.
Not meant to be used directly; use
Name of directory with patterns.
Regular expression to extract map coordinates from the filenames. If not given, two regular expressions will be tried: assuming (x, y) = (5, 10), “_x5y10.tif” or “-5-10.bmp”. Valid
xy_patternequal to these are
r"-(\d+)-(\d+).bmp", respectively. If none of these expressions match the first file’s name in the directory, a warning is printed and the returned signal will have only one navigation dimension.
Whether to show a progressbar when reading the signal into memory when
Read the patterns lazily without actually reading them from disk until required. Default is
Data, axes, metadata and original metadata.
Adapted from https://blog.dask.org/2019/06/20/load-image-data.