save#
- EBSD.save(filename: Optional[str] = None, overwrite: Optional[bool] = None, extension: Optional[str] = None, **kwargs) None[source]#
Write the signal to file in the specified format.
The function gets the format from the extension:
h5,hdf5orh5ebsdfor kikuchipy’s specification of the h5ebsd format,datfor the NORDIF binary format orhspyfor 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.filenameandtmp_parameters.folderin 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.extensionor iii)"h5"(kikuchipy’s h5ebsd format).- **kwargs
Keyword arguments passed to the writer.
See also