EDAX TEAM/Genesis (SPC, SPD)#
RosettaSciIO can read both .spd
(spectrum image) and .spc
(single spectra)
files from the EDAX TEAM software and its predecessor EDAX Genesis.
If reading an .spd
file, the calibration of the
spectrum image is loaded from the corresponding .ipr
and .spc
files
stored in the same directory, or from specific files indicated by the user.
If these calibration files are not available, the data from the .spd
file will still be loaded, but with no spatial or energy calibration.
When using HyperSpy, if elemental information has been defined in the spectrum image, those elements will automatically be added to the signal loaded by HyperSpy.
In HyperSpy, if an .spd
file is loaded, the result will be a HyperSpy
EDSSEMSpectrum
map, and the calibration will be loaded from the appropriate
.spc
and .ipr
files (if available). If an .spc
file is loaded, the
result will be a single EDSSEMSpectrum
with no other files needed for
calibration.
Note
Currently, HyperSpy will load data as an EDSSEMSpectrum
signal. If support
for TEM EDS data is needed, please open an issue in the issues tracker to alert the developers
of the need.
For reference, file specifications for the EDAX file formats have been publicly available from EDAX.
API functions#
- rsciio.edax.file_reader(filename, lazy=False, load_all_spc=False, spc_fname=None, ipr_fname=None, endianess='<', **kwds)#
Read
.spc
(spectrum) or.spd
(spectrum image) files from EDAX Genesis or TEAMS software.- Parameters:
- filename
str
,pathlib.Path
Filename of the file to read or corresponding pathlib.Path.
- lazybool, default=False
Whether to open the file lazily or not. The file will stay open until closed in
compute()
or closed manually.get_file_handle()
can be used to access the file handler and close it manually.- load_all_spcbool, default=False
Switch to control whether the complete .spc header is read, or just the important parts for import into HyperSpy.
- spc_fname
None
orstr
For spd files only. Name of file from which to read the spectral calibration. If data was exported fully from EDAX TEAM software, an .spc file with the same name as the .spd should be present. If None, the default filename will be searched for. Otherwise, the name of the .spc file to use for calibration can be explicitly given as a string.
- ipr_fname
None
orstr
For spd files only. Name of file from which to read the spatial calibration. If data was exported fully from EDAX TEAM software, an .ipr file with the same name as the .spd (plus a “_Img” suffix) should be present. If None, the default filename will be searched for. Otherwise, the name of the .ipr file to use for spatial calibration can be explicitly given as a string.
- endianess
str
, default=”<” "<"
or">"
, depending on how the bits are written to the file.- **kwds
dict
, optional Remaining arguments are passed to
numpy.memmap
.
- filename
- Returns:
list
ofdict
List of dictionaries containing the following fields:
‘data’ – multidimensional
numpy.ndarray
ordask.array.Array
‘axes’ – list of dictionaries describing the axes containing the fields ‘name’, ‘units’, ‘index_in_array’, and either ‘size’, ‘offset’, and ‘scale’ or a numpy array ‘axis’ containing the full axes vector
‘metadata’ – dictionary containing the parsed metadata
‘original_metadata’ – dictionary containing the full metadata tree from the input file
When the file contains several datasets, each dataset will be loaded as separate dictionary.
Notes
The file specification is available at EDAX.