Reader for spectroscopy data saved using Renishaw’s WiRE software. Currently, RosettaSciIO can only read the .wdf format from Renishaw. When reading spectral images, the white light image will be returned along the spectral images in the list of dictionaries. The position of the mapped area is returned in the metadata dictionary of the white light image and this will be displayed when plotting the image with HyperSpy.

If LumiSpy is installed, Luminescence will be used as the signal_type.


There are many different options for the axes according to the format specifications. However, only a limited subset is tested: Spectral (Wavelength and Raman Shift) for the signal axes and X, Y, Z, FocusTrackZ and Time for navigation axes. Reading maps obtained in a serpentine path is not implemented.

This reader is based on the py-wdf-reader, which is inspired by the matlab reader from Alex Henderson. Moreover, inspiration is taken from gwyddion’s reader.

API functions#

rsciio.renishaw.file_reader(filename, lazy=False, use_uniform_signal_axis=False, load_unmatched_metadata=False)#

Read Renishaw’s .wdf file. In case of mapping data, the image area will be returned with a marker showing the mapped area.

filenamestr, pathlib.Path

Filename of the file to read or corresponding pathlib.Path.

lazybool, default=False

Whether to open the file lazily or not.

use_uniform_signal_axisbool, default=False

Can be specified to choose between non-uniform or uniform signal axes. If True, the scale attribute is calculated from the average delta along the signal axis and a warning is raised in case the delta varies by more than 1%.

load_unmatched_metadatabool, default=False

Some of the original_metadata cannot be matched (no key, just value). Part of this is a VisualBasic-Script used for data acquisition (~230kB), which blows up the size of original_metadata. If this option is set to True, this metadata will be included and can be accessed by s.original_metadata.UNMATCHED, otherwise the UNMATCHED tag will not exist.

list of dict

List of dictionaries containing the following fields:

  • ‘data’ – multidimensional numpy.ndarray or dask.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.