Horiba Jobin Yvon LabSpec#

Reader for spectroscopy data saved using Horiba Jobin Yvon’s LabSpec software. Currently, RosettaSciIO can only read the .xml format from Jobin Yvon. However, this format supports spectral maps and contains all relevant metadata. Therefore, it is a good alternative to the binary .l5s or .l6s formats in order to transfer data to python or other analysis software.

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

When working with HyperSpy, a file can be read using the following code:

>>> import hyperspy.api as hs
>>> sig = hs.load("file.xml", reader="JobinYvon")

Specifying the reader is necessary as the EMPAD format also uses the .xml file-extension.

The reader supports all signal axis units exported by LabSpec, i.e. wavelengths, wavenumbers (absolute), Raman shift (relative wavenumbers), as well as energy.


The wavelength-to-energy conversion is not documented for LabSpec, i.e. it is not clear whether the refractive index of air is taken into account. When working with energy axes, it is therefore recommended to import the data using the wavelength axis and doing the conversion using the LumiSpy package. Additionally, to our knowledge, LabSpec does not have an option to take into account the Jacobian transformation of the intensity.


From LabSpec 6.3, an alternative export to an open HDF5 data format is available. In the future, this plugin may be extended to support this format, as well as to writing data to the open Horiba Jobin Yvon formats. Contributions are welcome.

API functions#

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

Read data from .xml files saved using Horiba Jobin Yvon’s LabSpec software.

filenamestr, pathlib.Path

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

lazybool, default=False

Lazy loading is not supported.

use_uniform_signal_axisbool, default=False

Can be specified to choose between non-uniform or uniform signal axis. 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 percent.

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.