file_writer#

kikuchipy.io.plugins.kikuchipy_h5ebsd.file_writer(filename: str, signal, add_scan: bool | None = None, scan_number: int = 1, **kwargs)[source]#

Write an EBSD or LazyEBSD signal to an existing but not open or new h5ebsd file.

Not meant to be used directly; use save().

The file is closed after writing.

Parameters:
filename

Full path of HDF5 file.

signalkikuchipy.signals.EBSD or kikuchipy.signals.LazyEBSD

Signal instance.

add_scan

Add signal to an existing, but not open, h5ebsd file. If it does not exist it is created and the signal is written to it.

scan_number

Scan number in name of HDF dataset when writing to an existing, but not open, h5ebsd file.

**kwargs

Keyword arguments passed to h5py.Group.require_dataset().