Introduction

What is LumiSpy

LumiSpy is an open-source python library aimed at helping with the analysis of luminescence spectroscopy data – the development started mainly with photoluminescence (PL), cathodoluminescence (CL), electroluminescence (EL) and Raman spectroscopy in mind. Besides the standard continuous-excitation spectral data, the idea is to provide tools also for the analysis of time-resolved (transient) measurements. However, it may prove useful also for other optical measurements, such as absorption or transmission spectroscopy, scanning optical near field miscroscopy (SNOM), as well as fourier-transform infrared spectroscopy (FTIR).

LumiSpy is an extension to the python package `HyperSpy <https://hyperspy.org>`_ that facilitates hyperspectral data analysis, i.e. maps or linescans where a spectrum is collected at each pixel. Or more general, multidimensional datasets that can be described as multidimensional arrays of a given signal. Notable features that HyperSpy provides are:

  • base signal classes for the handling of (multidimensional) spectral data,

  • the necessary tools for loading various data file formats with a focus on electron microscopy

  • analytical tools that exploit the multidimensionality of datasets,

  • a user-friendly and powerful framework for model fitting that provides many standard functions and can be easily extended to custom ones,

  • machine learning algorithms that can be useful e.g. for denoising data,

  • efficient handling of big datasets,,

  • functions for data visualization both to evaluate datasets during the analysis and provide interactive operation for certain functions, as well as for plotting of data.

  • extracting subsets of data from multidimensional datasets via regions of interest and a powerful numpy-style indexing mechanism,

  • handling of non-uniform data axes (introduced in the v1.7 release).

LumiSpy provides in particular:

  • additional Signal types specifically for luminescence spectra and transients,

  • transformation to signal_axis for use of other units, such as electron Volt and wavenumbers (Raman shift),

  • various utility functions useful in luminescence spectroscopy data analysis, such as joining multiple spectra along the signal axis, normalizing data, etc.

LumiSpy should facilitate an easy and reproducible analysis of single spectra or spectral images

Signal types

As an extension to HyperSpy, LumiSpy provides several signal types extending the base classes available in HyperSpy. When the LumiSpy library is installed, these additional signal types are directly available to HyperSpy. To print all available specialised hyperspy.signal.BaseSignal subclasses installed in your system call the hyperspy.utils.print_known_signal_types() function:

>>> hs.print_known_signal_types()

The different subclasses are characterized by the signal_type metadata attribute. Some additional properties are summarized in the table below. Depending on the use case, certain functions will only be available for some signal types (or inheriting) signal types.

LumiSpy subclasses and their basic attributes.

BaseSignal subclass

signal_dimension

signal_type

dtype

aliases

LumiSpectrum

1

Luminescence

real

LuminescenceSpectrum

CLSpectrum

1

CL

real

CLSpectrum, cathodoluminescence

CLSEMSpectrum

1

CL_SEM

real

CLSEM, cathodoluminescence SEM

CLSTEMSpectrum

1

CL_STEM

real

CLSTEM, cathodoluminescence STEM

ELSpectrum

1

EL

real

ELSpectrum, electroluminescence

PLSpectrum

1

PL

real

PLSpectrum, photoluminescence

LumiTransient

1

Transient

real

TRLumi, TR luminescence, time-resolved luminescence

LumiTransient

2

TransientSpec

real

TRLumiSpec, TR luminescence spectrum, time-resolved luminescence spectrum

The hierarchy of the LumiSpy signal types and their inheritance from HyperSpy is summarized in the following diagram:

│ └── LumiSpectrum
│ │ ├── CLSpectrum
│ │ │ ├── CLSEMSpectrum
│ │ │ └── CLSTEMSpectrum
│ │ ├── ELSpectrum
│ │ └── PLSpectrum
│ └── LumiTransient
└── hyperspy.signal.Signal2D

Where are we heading?

LumiSpy is under active development, and as a user-driven project, we welcome contributions (see Contributing) to the code and documentation from any other users.

Currrently, we have implemented the base functionality that extends HyperSpy’s capabilities to additional signal classes. In the near future, the following functions should be developed:

  • handling of transient (time-resolved) data,

  • reading of common PL data formats,

  • more dedicated analysis functionalities,