DigitalSurf format (SUR & PRO)#
The .sur and .pro files are a format developed by the digitalsurf company to handle various types of
scientific measurements data such as profilometer, SEM, AFM, RGB(A) images, multilayer
surfaces and profiles. Even though it is essentially a surfaces format, 1D signals
are supported for spectra and spectral maps. Specifically, this file format is used
by Attolight SA for its scanning electron microscope cathodoluminescence
(SEM-CL) hyperspectral maps. Metadata parsing is supported, including user-specific
metadata, as well as the loading of files containing multiple objects packed together.
The plugin was developed based on the MountainsMap software documentation, which contains a description of the binary format.
API functions#
- rsciio.digitalsurf.file_reader(filename, **kwds)#
Read a mountainsmap .sur file and return a dictionnary containing the information necessary for creating the data object. :param filename: Filename of the file to read or corresponding pathlib.Path. :type filename: str, pathlib.Path :param lazy: Whether to open the file lazily or not. :type lazy: bool, Default=False
- 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