save#
- EBSD.save(filename: str | None = None, overwrite: bool | None = None, extension: str | None = None, **kwargs) None [source]#
Write the signal to file in the specified format.
The function gets the format from the extension:
h5
,hdf5
orh5ebsd
for kikuchipy’s specification of the h5ebsd format,dat
for the NORDIF binary format orhspy
for HyperSpy’s HDF5 specification. If no extension is provided the signal is written to a file in kikuchipy’s h5ebsd format. Each format accepts a different set of parameters.This method is a modified version of HyperSpy’s function
hyperspy.signal.BaseSignal.save()
.- Parameters:
- filename
If not given and
tmp_parameters.filename
andtmp_parameters.folder
in signal metadata are defined, the filename and path will be taken from there. A valid extension can be provided e.g."data.h5"
, seeextension
.- 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"
,"h5ebsd"
,"dat"
,"hspy"
."h5"
,"hdf5"
, and"h5ebsd"
are equivalent. 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 writer.
See also