save#

EBSD.save(filename: Path | str | None = None, overwrite: bool | None = None, extension: str | None = None, **kwargs) None[source]#

Write the signal to file in the specified format.

If no extension is given, the signal is written to a file in kikuchipy’s h5ebsd format.

Parameters:
filename

If not given and ‘tmp_parameters.filename’ and ‘tmp_parameters.folder’ are defined in signal metadata, the filename and path will be taken from there.

overwrite

If not given and the file exists, it will query the user. If True (False) it (does not) overwrite the file if it exists.

extension

Extension of the file that defines the file format. Options are:

  • h5, hdf5, or h5ebsd: kikuchipy’s specification of the h5ebsd format

  • dat: NORDIF’s binary format

  • hspy: HyperSpy’s HDF5 format

  • zspy: HyperSpy’s zarr format

Each format accepts different parameters.

If not given, the extension is determined from the following list in this order: i) the filename, ii) ‘tmp_parameters.extension’ or iii) ‘h5’ (kikuchipy’s h5ebsd format).

**kwargs

Keyword arguments passed to the corresponding writer.

Notes

This method is a modified version of HyperSpy’s function hyperspy.signal.BaseSignal.save().