lumispy.signals.cl_spectrum module
Signal class for cathodoluminescence spectral data
- class lumispy.signals.cl_spectrum.CLSEMSpectrum(*args, **kwargs)
Bases:
CLSpectrum
1D scanning electron microscopy cathodoluminescence signal class.
- correct_grating_shift(cal_factor_x_axis, corr_factor_grating, sem_magnification, **kwargs)
Applies shift caused by the grating offset wrt the scanning centre. Authorship: Gunnar Kusch (gk419@cam.ac.uk)
- Parameters:
cal_factor_x_axis – The navigation correction factor.
corr_factor_grating – The grating correction factor.
sem_magnification – The SEM (real) magnification value. For the Attolight original metadata, take the SEM.Real_Magnification value
kwargs – The parameters passed to hyperspy.align1D() function like: interpolation_method (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic, ‘cubic’) parallel: Bool crop, expand, fill_value …
- class lumispy.signals.cl_spectrum.CLSTEMSpectrum(*args, **kwargs)
Bases:
CLSpectrum
1D scanning transmission electron microscopy cathodoluminescence signal class.
- class lumispy.signals.cl_spectrum.CLSpectrum(*args, **kwargs)
Bases:
LumiSpectrum
General 1D cathodoluminescence signal class.
- _make_signal_mask(luminescence_roi)
Creates a mask from the peak position and peak widths of the luminescence spectrum.
- Parameters:
luminescence_roi (array) – In the form of an array of pairwise elements [[peak1_x, peak1_width], [peak2_x, peak2_width],…].
- Returns:
A signal_mask.
- Return type:
array
- remove_spikes(threshold='auto', show_diagnosis_histogram=False, inplace=False, luminescence_roi=None, signal_mask=None, add_noise=False, navigation_mask=None, interactive=False, **kwargs)
HyperSpy-based spike removal tool adapted to LumiSpy to run non-interactively and without noise addition by default. Graphical interface to remove spikes from EELS spectra or luminescence data. If non-interactive, it removes all spikes.
- Parameters:
signal_mask (numpy.ndarray of bool) – Restricts the operation to the signal locations not marked as True (masked).
navigation_mask (numpy.ndarray of bool) – Restricts the operation to the navigation locations not marked as True (masked).
threshold (
'auto'
or int) – ifint
set the threshold value use for the detecting the spikes. If"auto"
, determine the threshold value as being the first zero value in the histogram obtained from thespikes_diagnosis()
method.interactive (bool) – If True, remove the spikes using the graphical user interface. If False, remove all the spikes automatically, which can introduce artefacts if used with signal containing peak-like features. However, this can be mitigated by using the
signal_mask
argument to mask the signal of interest.display (bool) – If True, display the user interface widgets. If False, return the widgets container in a dictionary, usually for customisation or testing.
toolkit (str, iterable of str or None) – If None (default), all available widgets are displayed or returned. If string, only the widgets of the selected toolkit are displayed if available. If an interable of toolkit strings, the widgets of all listed toolkits are displayed or returned.
**kwargs (dict) – Keyword arguments pass to
SpikesRemoval
.
See also
- Parameters:
show_diagnosis_histogram (bool) – Plot or not the derivative histogram to show the magnitude of the spikes present.
inplace (bool) – If False, a new signal object is created and returned. If True, the original signal object is modified.
luminescence_roi (array) – The peak position and peak widths of the peaks in the luminescence spectrum. In the form of an array of pairwise elements [[peak1_x, peak1_width], [peak2_x, peak2_width],…] in the units of the signal axis. It creates a signal_mask protecting the peak regions. To be used instead of signal_mask.
- Returns:
Depends on inplace, returns or overwrites the CLSpectrum after spike removal.
- Return type:
None or CLSpectrum
- class lumispy.signals.cl_spectrum.LazyCLSEMSpectrum(*args, **kwargs)
Bases:
LazySignal
,CLSEMSpectrum
Lazy 1D scanning electron microscopy cathodoluminescence signal class.
- class lumispy.signals.cl_spectrum.LazyCLSTEMSpectrum(*args, **kwargs)
Bases:
LazySignal
,CLSTEMSpectrum
Lazy 1D scanning transmission electron microscopy cathodoluminescence signal class.
- class lumispy.signals.cl_spectrum.LazyCLSpectrum(*args, **kwargs)
Bases:
LazySignal
,CLSpectrum
General lazy 1D cathodoluminescence signal class.