NetCDF (EELSlab) format#
The .nc format was the default format in HyperSpy’s predecessor, EELSLab, but it has been
superseded by HSpy - HyperSpy’s HDF5 Specification in RosettaSciIO. We provide only reading capabilities
but we do not support writing to this format.
Note that only NetCDF files written by EELSLab are supported.
To use this format a python netcdf interface, such as netcdf4 must be installed manually because it is not installed by default.
API functions#
- rsciio.netcdf.file_reader(filename, *args, **kwds)#
Read netCDF
.ncfiles saved using the HyperSpy predecessor EELSlab.- Parameters:
filename (str, pathlib.Path) – Filename of the file to read or corresponding pathlib.Path.
- Returns:
List of dictionaries containing the following fields:
’data’ – multidimensional numpy 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
- Return type:
list of dicts