Modules containing the eXSpy signals and their lazy counterparts.
EELSSpectrum
For electron energy-loss data with signal_dimension equal one, i.e.
spectral data of n dimensions. The signal is binned by default.
EDSTEMSpectrum
For electron energy-dispersive X-ray data acquired in a transmission
electron microscopy with signal_dimension equal one, i.e.
spectral data of n dimensions. The signal is binned by default.
EDSSEMSpectrum
For electron energy-dispersive X-ray data acquired in a scanning
electron microscope with signal_dimension equal one, i.e.
spectral data of n dimensions. The signal is binned by default.
DielectricFunction
For dielectric function data with signal_dimension equal one. The signal
is unbinned by default.
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.
Compute single-scattering electron-energy loss spectrum from
the dielectric function.
Parameters:
zlp (float or hyperspy.api.signals.BaseSignal) – If the ZLP is the same for all spectra, the intengral of the ZLP
can be provided as a number. Otherwise, if the ZLP intensity is not
the same for all spectra, it can be provided as i) a Signal
of the same dimensions as the current signal containing the ZLP
spectra for each location ii) a Signal of signal dimension 0
and navigation_dimension equal to the current signal containing the
integrated ZLP intensity.
t (None, float or hyperspy.api.signals.BaseSignal) – The sample thickness in nm. If the thickness is the same for all
spectra it can be given by a number. Otherwise, it can be provided
as a Signal with signal dimension 0 and navigation_dimension equal
to the current signal.
nat (float) – Number of atoms (or molecules) per unit volume of the sample.
Returns:
neff1, neff2 – Signal1D instances containing neff1 and neff2. The signal and
navigation dimensions are the same as the current signal if
cumulative is True, otherwise the signal dimension is 0
and the navigation dimension is the same as the current
signal.
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.
auto_background (boolean, default True) – If True, adds automatically a polynomial order 6 to the model,
using the edsmodel.add_polynomial_background method.
auto_add_lines (boolean, default True) – If True, automatically add Gaussians for all X-rays generated in
the energy range by an element using the edsmodel.add_family_lines
method.
dictionary ({None, dict}, optional) – A dictionary to be used to recreate a model. Usually generated
using hyperspy.model.as_dictionary()
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.
Examples
>>> s=exspy.data.EDS_TEM_FePt_nanoparticles()>>> print('Default value %s eV'%>>> s.metadata.Acquisition_instrument.>>> SEM.Detector.EDS.energy_resolution_MnKa)>>> s.set_microscope_parameters(energy_resolution_MnKa=135.)>>> print('Now set to %s eV'%>>> s.metadata.Acquisition_instrument.>>> SEM.Detector.EDS.energy_resolution_MnKa)Default value 130.0 eVNow set to 135.0 eV
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.
Although most functions do not require an internal list of
X-ray lines because they can be calculated from the internal
list of elements, ocassionally it might be useful to customize the
X-ray lines to be use by all functions by default using this method.
The list of X-ray lines is stored in
metadata.Sample.xray_lines
Parameters:
lines (list of strings) – A list of valid element X-ray lines to add e.g. Fe_Kb.
Additionally, if metadata.Sample.elements is
defined, add the lines of those elements that where not
given in this list. If the list is empty (default), and
metadata.Sample.elements is
defined, add the lines of all those elements.
only_one (bool) – If False, add all the lines of each element in
metadata.Sample.elements that has not line
defined in lines. If True (default),
only add the line at the highest energy
above an overvoltage of 2 (< beam energy / 2).
only_lines ({None, list of strings}) – If not None, only the given lines will be added.
Estimate two windows around each X-ray line containing only the
background.
Parameters:
line_width (list of two floats) – The position of the two windows around the X-ray line is given by
the line_width (left and right) times the calculated FWHM of the
line.
windows_width (float) – The width of the windows is is the windows_width times the
calculated FWHM of the line.
xray_lines (None or list of string) – If None, use metadata.Sample.elements.xray_lines. Else,
provide an iterable containing a list of valid X-ray lines
symbols.
Returns:
windows_position – The position of the windows in energy. Each line corresponds to a
X-ray line. In a line, the two first values correspond to the
limits of the left window and the two last values correspond to
the limits of the right window.
Estimate a window of integration for each X-ray line.
Parameters:
windows_width (float) – The width of the integration windows is the ‘windows_width’ times
the calculated FWHM of the line.
xray_lines (None or list of string) – If None, use ‘metadata.Sample.elements.xray_lines’. Else,
provide an iterable containing a list of valid X-ray lines
symbols.
Returns:
integration_windows – The positions of the windows in energy. Each row corresponds to a
X-ray line. Each row contains the left and right value of the
window.
The intensities, the number of X-ray counts, are computed by
suming the spectrum over the
different X-ray lines. The sum window width
is calculated from the energy resolution of the detector
as defined in ‘energy_resolution_MnKa’ of the metadata.
Backgrounds average in provided windows can be subtracted from the
intensities.
Parameters:
xray_lines ({None, Iterable* of strings}) – If None,
if metadata.Sample.elements.xray_lines contains a
list of lines use those.
If metadata.Sample.elements.xray_lines is undefined
or empty but metadata.Sample.elements is defined,
use the same syntax as add_line to select a subset of lines
for the operation.
Alternatively, provide an iterable containing
a list of valid X-ray lines symbols.
* Note that while dictionaries and strings are iterable,
their use is ambiguous and specifically not allowed.
integration_windows (Float or array) – If float, the width of the integration windows is the
‘integration_windows_width’ times the calculated FWHM of the line.
Else provide an array for which each row corresponds to a X-ray
line. Each row contains the left and right value of the window.
background_windows (None or 2D array of float) – If None, no background subtraction. Else, the backgrounds average
in the windows are subtracted from the return intensities.
‘background_windows’ provides the position of the windows in
energy. Each line corresponds to a X-ray line. In a line, the two
first values correspond to the limits of the left window and the
two last values correspond to the limits of the right window.
plot_result (bool) – If True, plot the calculated line intensities. If the current
object is a single spectrum it prints the result instead.
only_one (bool) – If False, use all the lines of each element in the data spectral
range. If True use only the line at the highest energy
above an overvoltage of 2 (< beam energy / 2).
only_lines ({None, list of strings}) – If not None, use only the given lines.
kwargs – The extra keyword arguments for plotting. See
utils.plot.plot_signals
Returns:
intensities – A list containing the intensities as BaseSignal subclasses.
TOA is the angle with which the X-rays leave the surface towards
the detector. Parameters are read in ‘SEM.Stage.tilt_alpha’,
‘Acquisition_instrument.SEM.Detector.EDS.azimuth_angle’ and
‘SEM.Detector.EDS.elevation_angle’ and ‘SEM.Stage.tilt_beta in
‘metadata’.
Plot the EDS spectrum. The following markers can be added
The position of the X-ray lines and their names.
The background windows associated with each X-ray lines. A black line
links the left and right window with the average value in each window.
Parameters:
xray_lines ({False, True, 'from_elements', list of string}) – If not False, indicate the position and the name of the X-ray
lines.
If True, if metadata.Sample.elements.xray_lines contains a
list of lines use those. If metadata.Sample.elements.xray_lines
is undefined or empty or if xray_lines equals ‘from_elements’ and
metadata.Sample.elements is defined, use the same syntax as
add_line to select a subset of lines for the operation.
Alternatively, provide an iterable containing a list of valid X-ray
lines symbols.
only_lines (None or list of strings) – If not None, use only the given lines (eg. (‘a’,’Kb’)).
If None, use all lines.
only_one (bool) – If False, use all the lines of each element in the data spectral
range. If True use only the line at the highest energy
above an overvoltage of 2 (< beam energy / 2).
background_windows (None or 2D array of float) – If not None, add markers at the position of the windows in energy.
Each line corresponds to a X-ray lines. In a line, the two first
value corresponds to the limit of the left window and the two
last values corresponds to the limit of the right window.
integration_windows (None or 'auto' or float or 2D array of float) – If not None, add markers at the position of the integration
windows.
If ‘auto’ (or float), the width of the integration windows is 2.0
(or float) times the calculated FWHM of the line. see
‘estimate_integration_windows’.
Else provide an array for which each row corresponds to a X-ray
line. Each row contains the left and right value of the window.
navigator (str, None, or BaseSignal (or subclass).)
'auto' (Allowed string values are) –
If 'auto':
If navigation_dimension > 0, a navigator is
provided to explore the data.
If navigation_dimension is 1 and the signal is an image
the navigator is a sum spectrum obtained by integrating
over the signal axes (the image).
If navigation_dimension is 1 and the signal is a spectrum
the navigator is an image obtained by stacking all the
spectra in the dataset horizontally.
If navigation_dimension is > 1, the navigator is a sum
image obtained by integrating the data over the signal axes.
Additionally, if navigation_dimension > 2, a window
with one slider per axis is raised to navigate the data.
For example, if the dataset consists of 3 navigation axes “X”,
“Y”, “Z” and one signal axis, “E”, the default navigator will
be an image obtained by integrating the data over “E” at the
current “Z” index and a window with sliders for the “X”, “Y”,
and “Z” axes will be raised. Notice that changing the “Z”-axis
index changes the navigator in this case.
For lazy signals, the navigator will be calculated using the
compute_navigator()
method.
If 'slider':
If navigationdimension > 0 a window with one slider per
axis is raised to navigate the data.
If 'spectrum':
If navigation_dimension > 0 the navigator is always a
spectrum obtained by integrating the data over all other axes.
Not supported for lazy signals, the 'auto' option will
be used instead.
If None, no navigator will be provided.
Alternatively a BaseSignal (or subclass)
instance can be provided. The navigation or signal shape must
match the navigation shape of the signal to plot or the
navigation_shape + signal_shape must be equal to the
navigator_shape of the current object (for a dynamic navigator).
If the signal dtype is RGB or RGBA this parameter has no effect and
the value is always set to 'slider'.
'slider' –
If 'auto':
If navigation_dimension > 0, a navigator is
provided to explore the data.
If navigation_dimension is 1 and the signal is an image
the navigator is a sum spectrum obtained by integrating
over the signal axes (the image).
If navigation_dimension is 1 and the signal is a spectrum
the navigator is an image obtained by stacking all the
spectra in the dataset horizontally.
If navigation_dimension is > 1, the navigator is a sum
image obtained by integrating the data over the signal axes.
Additionally, if navigation_dimension > 2, a window
with one slider per axis is raised to navigate the data.
For example, if the dataset consists of 3 navigation axes “X”,
“Y”, “Z” and one signal axis, “E”, the default navigator will
be an image obtained by integrating the data over “E” at the
current “Z” index and a window with sliders for the “X”, “Y”,
and “Z” axes will be raised. Notice that changing the “Z”-axis
index changes the navigator in this case.
For lazy signals, the navigator will be calculated using the
compute_navigator()
method.
If 'slider':
If navigationdimension > 0 a window with one slider per
axis is raised to navigate the data.
If 'spectrum':
If navigation_dimension > 0 the navigator is always a
spectrum obtained by integrating the data over all other axes.
Not supported for lazy signals, the 'auto' option will
be used instead.
If None, no navigator will be provided.
Alternatively a BaseSignal (or subclass)
instance can be provided. The navigation or signal shape must
match the navigation shape of the signal to plot or the
navigation_shape + signal_shape must be equal to the
navigator_shape of the current object (for a dynamic navigator).
If the signal dtype is RGB or RGBA this parameter has no effect and
the value is always set to 'slider'.
'spectrum'. (and) –
If 'auto':
If navigation_dimension > 0, a navigator is
provided to explore the data.
If navigation_dimension is 1 and the signal is an image
the navigator is a sum spectrum obtained by integrating
over the signal axes (the image).
If navigation_dimension is 1 and the signal is a spectrum
the navigator is an image obtained by stacking all the
spectra in the dataset horizontally.
If navigation_dimension is > 1, the navigator is a sum
image obtained by integrating the data over the signal axes.
Additionally, if navigation_dimension > 2, a window
with one slider per axis is raised to navigate the data.
For example, if the dataset consists of 3 navigation axes “X”,
“Y”, “Z” and one signal axis, “E”, the default navigator will
be an image obtained by integrating the data over “E” at the
current “Z” index and a window with sliders for the “X”, “Y”,
and “Z” axes will be raised. Notice that changing the “Z”-axis
index changes the navigator in this case.
For lazy signals, the navigator will be calculated using the
compute_navigator()
method.
If 'slider':
If navigationdimension > 0 a window with one slider per
axis is raised to navigate the data.
If 'spectrum':
If navigation_dimension > 0 the navigator is always a
spectrum obtained by integrating the data over all other axes.
Not supported for lazy signals, the 'auto' option will
be used instead.
If None, no navigator will be provided.
Alternatively a BaseSignal (or subclass)
instance can be provided. The navigation or signal shape must
match the navigation shape of the signal to plot or the
navigation_shape + signal_shape must be equal to the
navigator_shape of the current object (for a dynamic navigator).
If the signal dtype is RGB or RGBA this parameter has no effect and
the value is always set to 'slider'.
axes_manager (None or AxesManager) – If None, the signal’s axes_manager attribute is used.
plot_markers (bool, default True) – Plot markers added using s.add_marker(marker, permanent=True).
Note, a large number of markers might lead to very slow plotting.
norm (str, default 'auto') – The function used to normalize the data prior to plotting.
Allowable strings are: 'auto', 'linear', 'log'.
If 'auto', intensity is plotted on a linear scale except when
power_spectrum=True (only for complex signals).
autoscale (str) – The string must contain any combination of the 'x' and 'v'
characters. If 'x' or 'v' (for values) are in the string, the
corresponding horizontal or vertical axis limits are set to their
maxima and the axis limits will reset when the data or the
navigation indices are changed. Default is 'v'.
Rebin the signal into a smaller or larger shape, based on linear
interpolation. Specify eithernew_shape or scale. Scale of 1
means no binning and scale less than one results in up-sampling.
Parameters:
new_shape (list (of float or int) or None) – For each dimension specify the new_shape. This will internally be
converted into a scale parameter.
scale (list (of float or int) or None) – For each dimension, specify the new:old pixel ratio, e.g. a ratio
of 1 is no binning and a ratio of 2 means that each pixel in the new
spectrum is twice the size of the pixels in the old spectrum.
The length of the list should match the dimension of the
Signal’s underlying data array.
Note : Only one of ``scale`` or ``new_shape`` should be specified,
otherwise the function will not run
crop (bool) – Whether or not to crop the resulting rebinned data (default is
True). When binning by a non-integer number of
pixels it is likely that the final row in each dimension will
contain fewer than the full quota to fill one pixel. For example,
a 5*5 array binned by 2.1 will produce two rows containing
2.1 pixels and one row containing only 0.8 pixels. Selection of
crop=True or crop=False determines whether or not this
“black” line is cropped from the final binned array or not.
Please note that if ``crop=False`` is used, the final row in each
dimension may appear black if a fractional number of pixels are left
over. It can be removed but has been left to preserve total counts
before and after binning.
dtype ({None, numpy.dtype, "same"}) – Specify the dtype of the output. If None, the dtype will be
determined by the behaviour of numpy.sum(), if "same",
the dtype will be kept the same. Default is None.
out (BaseSignal (or subclass) or None) – If None, a new Signal is created with the result of the
operation and returned (default). If a Signal is passed,
it is used to receive the output of the operation, and nothing is
returned.
By default dtype=None, the dtype is determined by the behaviour of
numpy.sum, in this case, unsigned integer of the same precision as
the platform integer
lines (list of strings) – A list of valid element X-ray lines to add e.g. Fe_Kb.
Additionally, if metadata.Sample.elements is
defined, add the lines of those elements that where not
given in this list.
only_one (bool) – If False, add all the lines of each element in
metadata.Sample.elements that has not line
defined in lines. If True (default),
only add the line at the highest energy
above an overvoltage of 2 (< beam energy / 2).
only_lines ({None, list of strings}) – If not None, only the given lines will be added.
axis (int, str, DataAxis or tuple) – Either a single or multiple axes in a tuple can be passed. In
both cases, the axes can be passed directly, or specified using the
index in axes_manager or the name of the axis. Any duplicates are
removed. If "sig" or "nav", the signal or navigation axes
will be used, respectively. If None, the operation is performed
over all navigation axes (default).
out (BaseSignal (or subclass) or None) – If None, a new Signal is created with the result of the
operation and returned (default). If a Signal is passed,
it is used to receive the output of the operation, and nothing is
returned.
rechunk (bool) – Only has effect when operating on lazy signal. Default False,
which means the chunking structure will be retained. If True,
the data may be automatically rechunked before performing this
operation.
Returns:
A new Signal containing the sum of the provided Signal along the
specified axes.
If you intend to calculate the numerical integral of an unbinned signal,
please use the integrate1D() function
instead. To avoid erroneous misuse of the sum function as integral,
it raises a warning when working with an unbinned, non-uniform axis.
See also
max, min, mean, std, var, indexmax, indexmin, valuemax, valuemin
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.
Creates a array of mass_thickness based on a known material composition
and measured thickness. Required for absorption correction calcultions
using the Cliff Lorimer method.
Parameters:
weight_percent (BaseSignal (or subclass)) – Stack of compositions as determined from an initial k_factor
quantification.
thickness (float or numpy.ndarray) – Either a float value for thickness in nm or an array equal to the
size of the EDX map with thickness at each position of the sample.
auto_background (bool, default True) – If True, adds automatically a polynomial order 6 to the model,
using the edsmodel.add_polynomial_background method.
auto_add_lines (bool, default True) – If True, automatically add Gaussians for all X-rays generated in
the energy range by an element using the edsmodel.add_family_lines
method.
dictionary ({None, dict}, optional) – A dictionary to be used to recreate a model. Usually generated
using hyperspy.model.as_dictionary()
normalize_poissonian_noise (bool, default True) – If True, scale the signal to normalize Poissonian noise using
the approach described in [†].
navigation_mask (None or float or boolean numpy array, default 1.0) – The navigation locations marked as True are not used in the
decomposition. If float is given the vacuum_mask method is used to
generate a mask with the float value as threshold.
closing (bool, default True) – If true, applied a morphologic closing to the mask obtained by
vacuum_mask.
algorithm ({"SVD", "MLPCA", "sklearn_pca", "NMF", "sparse_pca", "mini_batch_sparse_pca", "RPCA", "ORPCA", "ORNMF", custom object}, default "SVD") – The decomposition algorithm to use. If algorithm is an object,
it must implement a fit_transform() method or fit() and
transform() methods, in the same manner as a scikit-learn estimator.
output_dimension (None or int) – Number of components to keep/calculate.
Default is None, i.e. min(data.shape).
centre ({None, "navigation", "signal"}, default None) –
If None, the data is not centered prior to decomposition.
If “navigation”, the data is centered along the navigation axis.
Only used by the “SVD” algorithm.
If “signal”, the data is centered along the signal axis.
Only used by the “SVD” algorithm.
auto_transpose (bool, default True) – If True, automatically transposes the data to boost performance.
Only used by the “SVD” algorithm.
signal_mask (boolean numpy array) – The signal locations marked as True are not used in the
decomposition.
var_array (numpy array) – Array of variance for the maximum likelihood PCA algorithm.
Only used by the “MLPCA” algorithm.
var_func (None or function or numpy array, default None) –
If None, ignored
If function, applies the function to the data to obtain var_array.
Only used by the “MLPCA” algorithm.
If numpy array, creates var_array by applying a polynomial function
defined by the array of coefficients to the data. Only used by
the “MLPCA” algorithm.
reproject ({None, "signal", "navigation", "both"}, default None) – If not None, the results of the decomposition will be projected in
the selected masked area.
return_info (bool, default False) – The result of the decomposition is stored internally. However,
some algorithms generate some extra information that is not
stored. If True, return any extra information if available.
In the case of sklearn.decomposition objects, this includes the
sklearn Estimator object.
print_info (bool, default True) – If True, print information about the decomposition being performed.
In the case of sklearn.decomposition objects, this includes the
values of all arguments of the chosen sklearn algorithm.
The solver is selected by a default policy based on data.shape and
output_dimension: if the input data is larger than 500x500 and the
number of components to extract is lower than 80% of the smallest
dimension of the data, then the more efficient “randomized”
method is enabled. Otherwise the exact full SVD is computed and
optionally truncated afterwards.
If full:
run exact SVD, calling the standard LAPACK solver via
scipy.linalg.svd(), and select the components by postprocessing
If arpack:
use truncated SVD, calling ARPACK solver via
scipy.sparse.linalg.svds(). It requires strictly
0 < output_dimension < min(data.shape)
If randomized:
use truncated SVD, calling sklearn.utils.extmath.randomized_svd()
to estimate a limited number of components
If True, stores a copy of the data before any pre-treatments
such as normalization in s._data_before_treatments. The original
data can then be restored by calling s.undo_treatments().
If False, no copy is made. This can be beneficial for memory
usage, but care must be taken since data will be overwritten.
**kwargs (extra keyword arguments) – Any keyword arguments are passed to the decomposition algorithm.
Calculates a pixel area which can be approximated to probe area,
when the beam is larger than or equal to pixel size.
The probe area can be calculated only when the number of navigation
dimension are less than 2 and all the units have the dimensions of
length.
Parameters:
navigation_axes (DataAxis, string or integer (or list of)) – Navigation axes corresponding to the probe area. If string or
integer, the provided value is used to index the axes_manager.
Absorption corrected quantification using Cliff-Lorimer, the zeta-factor
method, or ionization cross sections. The function iterates through
quantification function until two successive interations don’t change
the final composition by a defined percentage critera (0.5% by default).
Parameters:
intensities (list of signal) – the intensitiy for each X-ray lines.
method ({'CL', 'zeta', 'cross_section'}) – Set the quantification method: Cliff-Lorimer, zeta-factor, or
ionization cross sections.
factors (list of float) – The list of kfactors, zeta-factors or cross sections in same order
as intensities. Note that intensities provided by Hyperspy are
sorted by the alphabetical order of the X-ray lines.
eg. factors =[0.982, 1.32, 1.60] for [‘Al_Ka’, ‘Cr_Ka’, ‘Ni_Ka’].
composition_units ({'atomic', 'weight'}) – The quantification returns the composition in ‘atomic’ percent by
default, but can also return weight percent if specified.
absorption_correction (bool) – Specify whether or not an absorption correction should be applied.
‘False’ by default so absorption will not be applied unless
specfied.
take_off_angle ({'auto'}) – The angle between the sample surface and the vector along which
X-rays travel to reach the centre of the detector.
thickness ({'auto'}) – thickness in nm (can be a single value or
have the same navigation dimension as the signal).
NB: Must be specified for ‘CL’ method. For ‘zeta’ or ‘cross_section’
methods, first quantification step provides a mass_thickness
internally during quantification.
convergence_criterion (The convergence criterium defined as the percentage) – difference between 2 successive iterations. 0.5% by default.
navigation_mask (None or float or signal) – The navigation locations marked as True are not used in the
quantification. If float is given the vacuum_mask method is used to
generate a mask with the float value as threhsold.
Else provides a signal with the navigation shape. Only for the
‘Cliff-Lorimer’ method.
closing (bool) – If true, applied a morphologic closing to the mask obtained by
vacuum_mask.
plot_result (bool) – If True, plot the calculated composition. If the current
object is a single spectrum it prints the result instead.
{'auto'} (probe_area =) – This allows the user to specify the probe_area for interaction with
the sample needed specifically for the cross_section method of
quantification. When left as ‘auto’ the pixel area is used,
calculated from the navigation axes information.
max_iterations (int) – An upper limit to the number of calculations for absorption correction.
kwargs – The extra keyword arguments are passed to plot.
Returns:
A list of quantified elemental maps (signal) giving the composition of
the sample in weight or atomic percent with absorption correciton taken
into account based on the sample thickness estimate provided.
If the method is ‘zeta’ this function also returns the mass thickness
profile for the data.
If the method is ‘cross_section’ this function also returns the atom
counts for each element.
Examples
>>> s=exspy.data.EDS_TEM_FePt_nanoparticles()>>> s.add_lines()>>> kfactors=[1.450226,5.075602]#For Fe Ka and Pt La>>> bw=s.estimate_background_windows(line_width=[5.0,2.0])>>> s.plot(background_windows=bw)>>> intensities=s.get_lines_intensity(background_windows=bw)>>> res=s.quantification(intensities,kfactors,plot_result=True,>>> composition_units='atomic')Fe (Fe_Ka): Composition = 15.41 atomic percentPt (Pt_La): Composition = 84.59 atomic percent
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.
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.
The ionisation edges of the elements present in the current
energy range will be added automatically.
Parameters:
elements (tuple of strings) – The symbol of the elements. Note this input must always be
in the form of a tuple. Meaning: add_elements((‘C’,)) will
work, while add_elements((‘C’)) will NOT work.
include_pre_edges (bool) – If True, the ionization edges with an onset below the lower
energy limit of the SI will be included
This function first aligns the spectra using the result of
estimate_zero_loss_peak_centre which finds the maximum in the
given energy range, then if subpixel is True,
proceeds to align with subpixel accuracy using align1D. The offset
is automatically correct if calibrate is True.
Parameters:
calibrate (bool) – If True, set the offset of the spectral axis so that the
zero-loss peak is at position zero.
also_align (list of signals) – A list containing other spectra of identical dimensions to
align using the shifts applied to the current spectrum.
If calibrate is True, the calibration is also applied to
the spectra in the list.
print_stats (bool) – If True, print summary statistics of the ZLP maximum before
the alignment.
subpixel (bool) – If True, perform the alignment with subpixel accuracy
using cross-correlation.
mask (Signal1D of bool data type or bool array.) – It must have signal_dimension = 0 and navigation_shape equal to
the shape of the current signal. Where mask is True the shift is
not computed and set to nan.
signal_range (tuple of integers, tuple of floats. Optional) – Will only search for the ZLP within the signal_range. If given
in integers, the range will be in index values. If given floats,
the range will be in spectrum values. Useful if there are features
in the spectrum which are more intense than the ZLP.
Default is searching in the whole signal. Note that ROIs can be used
in place of a tuple.
show_progressbar (None or bool) – If True, display a progress bar. If None, the default from
the preferences settings is used.
crop (bool) – If True automatically crop the signal axis at both ends if needed.
ll (None or EELSSpectrum) – If an EELSSpectrum is provided, it will be assumed that it is
a low-loss EELS spectrum, and it will be used to simulate the
effect of multiple scattering by convolving it with the EELS
spectrum.
auto_background (bool) – If True, and if spectrum is an EELS instance adds automatically
a powerlaw to the model and estimate the parameters by the
two-area method.
auto_add_edges (bool) – If True, and if spectrum is an EELS instance, it will automatically
add the ionization edges as defined in the
EELSSpectrum instance. Adding a new element to
the spectrum using the add_elements()
method automatically add the corresponding ionisation edges to the model.
GOS (Generalized Oscillator Strength, availiable option in ['hydrogenic', 'dft', 'dirac', 'Hartree-Slater'], default is 'dft') – The GOS to use. Default is 'dft'.
gos_file_path (str, None) – Only with GOS=’dft’ or ‘dirac’. Specify the file path of the gosh file
to use. If None, use the file from doi:10.5281/zenodo.7645765
dictionary (None or dict) – A dictionary to be used to recreate a model. Usually generated using
as_dictionary()
Show EELS edges according to an energy range selected from the
spectrum or within a provided energy window
Parameters:
energy ('interactive' or float) – If it is ‘interactive’, a table with edges are shown and it depends
on the energy range selected in the spectrum. If it is a float, a
table with edges are shown and it depends on the energy window
defined by energy +/- (width/2). The default is ‘interactive’.
width (float) – Width of window, in eV, around energy in which to find nearby
energies, i.e. a value of 10 eV (the default) means to
search +/- 5 eV. The default is 10.
only_major (bool) – Whether to show only the major edges. The default is False.
order (str) – Sort the edges, if ‘closest’, return in the order of energy
difference, if ‘ascending’, return in ascending order, similarly
for ‘descending’. The default is ‘closest’.
Returns:
An interactive widget if energy is ‘interactive’, or a html-format
Rough estimation of the elastic scattering intensity by
truncation of a EELS low-loss spectrum.
Parameters:
threshold ({Signal1D, float, int}) – Truncation energy to estimate the intensity of the elastic
scattering. The threshold can be provided as a signal of the same
dimension as the input spectrum navigation space containing the
threshold value in the energy units. Alternatively a constant
threshold can be specified in energy/index units by passing
float/int.
show_progressbar (None or bool) – If True, display a progress bar. If None, the default from
the preferences settings is used.
Calculate the first inflexion point of the spectrum derivative
within a window.
This method assumes that the zero-loss peak is located at position zero
in all the spectra. Currently it looks for an inflexion point, that can
be a local maximum or minimum. Therefore, to estimate the elastic
scattering threshold start + window must be less than the first
maximum for all spectra (often the bulk plasmon maximum). If there is
more than one inflexion point in energy the window it selects the
smoother one what, often, but not always, is a good choice in this
case.
Parameters:
window ({None, float}) – If None, the search for the local inflexion point is performed
using the full energy range. A positive float will restrict
the search to the (0,window] energy window, where window is given
in the axis units. If no inflexion point is found in this
spectral range the window value is returned instead.
tol ({None, float}) – The threshold tolerance for the derivative. If “auto” it is
automatically calculated as the minimum value that guarantees
finding an inflexion point in all the spectra in given energy
range.
window_length (int) – If non zero performs order three Savitzky-Golay smoothing
to the data to avoid falling in local minima caused by
the noise. It must be an odd integer.
start (float) – Position from the zero-loss peak centre from where to start
looking for the inflexion point.
Returns:
threshold – A Signal1D of the same dimension as the input spectrum
navigation space containing the estimated threshold. Where the
threshold couldn’t be estimated the value is set to nan.
The main purpose of this method is to be used as input for
estimate_elastic_scattering_intensity. Indeed, for currently
achievable energy resolutions, there is not such a thing as a elastic
scattering threshold. Therefore, please be aware of the limitations of
this method when using it.
Estimates the thickness (relative and absolute)
of a sample using the log-ratio method.
The current EELS spectrum must be a low-loss spectrum containing
the zero-loss peak. The hyperspectrum must be well calibrated
and aligned. To obtain the thickness relative to the mean free path
don’t set the density and the mean_free_path.
Parameters:
threshold ({BaseSignal, float}, optional) – If the zero-loss-peak is not provided, use this energy threshold
to roughly estimate its intensity by truncation.
If the threshold is constant across the dataset use a float. Otherwise,
provide a signal of
the same dimension as the input spectrum navigation space
containing the threshold value in the energy units.
zlp (BaseSignal, optional) – If not None the zero-loss peak intensity is calculated from the ZLP
spectrum supplied by integration.
mean_free_path (float, optional) – The mean free path of the material in nanometers.
If not provided, the thickness
is given relative to the mean free path.
density (float, optional) – The density of the material in g/cm**3. This is used to estimate the mean
free path when the mean free path is not known and to perform the
angular corrections.
Returns:
s – The thickness relative to the MFP. It returns a Signal1D,
Signal2D or a BaseSignal, depending on the current navigation
dimensions.
Return type:
BaseSignal
Notes
For details see Egerton, R. Electron Energy-Loss Spectroscopy in the Electron
Microscope. Springer-Verlag, 2011.
This function provides just a coarse estimation of the position
of the zero-loss peak centre by computing the position of the maximum
of the spectra. For subpixel accuracy use estimate_shift1D.
Parameters:
mask (Signal1D of bool data type or bool array) – It must have signal_dimension = 0 and navigation_shape equal to the
navigation shape of the current signal. Where mask is True the
shift is not computed and set to nan.
Returns:
zlpc – The estimated position of the maximum of the ZLP peak.
Return type:
Signal1D subclass
Notes
This function only works when the zero-loss peak is the most
intense feature in the spectrum. If it is not in most cases
the spectrum can be cropped to meet this criterion.
Alternatively use estimate_shift1D.
The core-loss should have the background removed. To reduce the noise
amplification the result is convolved with a Gaussian function.
Parameters:
ll (EELSSpectrum) – The corresponding low-loss (ll) EELSSpectrum.
fwhm (float or None) – Full-width half-maximum of the Gaussian function by which
the result of the deconvolution is convolved. It can be
used to select the final SNR and spectral resolution. If
None, the FWHM of the zero-loss peak of the low-loss is
estimated and used.
threshold ({None, float}) – Truncation energy to estimate the intensity of the
elastic scattering. If None the threshold is taken as the
first minimum after the ZLP centre.
extrapolate_lowloss (bool) – If True the signals are extrapolated using a power law,
extrapolate_coreloss (bool) – If True the signals are extrapolated using a power law,
Return boolean array with True value at the position of the zero
loss peak. This mask can be used to restrict operation to the signal
locations not marked as True (masked).
Parameters:
zero_loss_peak_mask_width (float) – Width of the zero loss peak mask.
signal_mask (numpy.ndarray of bool) – Restricts the operation to the signal locations not marked
as True (masked).
Calculate the complex dielectric function from a single scattering
distribution (SSD) using the Kramers-Kronig relations.
It uses the FFT method as in [1]. The SSD is an
EELSSpectrum instance containing SSD low-loss EELS with no zero-loss
peak. The internal loop is devised to approximately subtract the
surface plasmon contribution supposing an unoxidized planar surface and
neglecting coupling between the surfaces. This method does not account
for retardation effects, instrumental broadening and surface plasmon
excitation in particles.
Note that either refractive index or thickness are required.
If both are None or if both are provided an exception is raised.
Parameters:
zlp ({None, number, Signal1D}) – ZLP intensity. It is optional (can be None) if t is None and n
is not None and the thickness estimation is not required. If t
is not None, the ZLP is required to perform the normalization and
if t is not None, the ZLP is required to calculate the thickness.
If the ZLP is the same for all spectra, the integral of the ZLP
can be provided as a number. Otherwise, if the ZLP intensity is not
the same for all spectra, it can be provided as i) a Signal1D
of the same dimensions as the current signal containing the ZLP
spectra for each location ii) a BaseSignal of signal dimension 0
and navigation_dimension equal to the current signal containing the
integrated ZLP intensity.
iterations (int) – Number of the iterations for the internal loop to remove the
surface plasmon contribution. If 1 the surface plasmon contribution
is not estimated and subtracted (the default is 1).
n ({None, float}) – The medium refractive index. Used for normalization of the
SSD to obtain the energy loss function. If given the thickness
is estimated and returned. It is only required when t is None.
t ({None, number, Signal1D}) – The sample thickness in nm. Used for normalization of the SSD
to obtain the energy loss function. It is only required when
n is None. If the thickness is the same for all spectra it can be
given by a number. Otherwise, it can be provided as a BaseSignal
with signal dimension 0 and navigation_dimension equal to the
current signal.
delta (float) – A small number (0.1-0.5 eV) added to the energy axis in
specific steps of the calculation the surface loss correction to
improve stability.
full_output (bool) – If True, return a dictionary that contains the estimated
thickness if t is None and the estimated surface plasmon
excitation and the spectrum corrected from surface plasmon
excitations if iterations > 1.
Returns:
eps (DielectricFunction instance) –
The complex dielectric function results,
\[\epsilon = \epsilon_1 + i*\epsilon_2,\]
contained in an DielectricFunction instance.
output (Dictionary (optional)) – A dictionary of optional outputs with the following keys
thickness: the estimated thickness in nm calculated by
normalization of the SSD (only when t is None)
surfaceplasmonestimation: the estimated surface plasmon
excitation (only if iterations > 1.)
Raises:
ValueError – If both n and t are undefined (None).
AttributeError – If the beam_energy or the collection semi-angle are not defined in
metadata.
This method is based in Egerton’s Matlab code [1] with a
minor difference: the wrap-around problem when computing the FFTs is
workarounded by padding the signal instead of subtracting the
reflected tail.
Plot the EELS spectrum. Markers indicating the position of the
EELS edges can be added.
Parameters:
plot_edges ({False, True, list of string or string}) – If True, draws on s.metadata.Sample.elements for edges.
Alternatively, provide a string of a single edge, or an iterable
containing a list of valid elements, EELS families or edges. For
example, an element should be ‘Zr’, an element edge family should
be ‘Zr_L’ or an EELS edge ‘Zr_L3’.
only_edges (tuple of string) – Either ‘Major’ or ‘Minor’. Defaults to both.
Extrapolate the spectrum to the right using a powerlaw.
Parameters:
window_size (int) – The number of channels from the right side of the
spectrum that are used to estimate the power law
parameters.
extrapolation_size (int) – Size of the extrapolation in number of channels
add_noise (bool) – If True, add poissonian noise to the extrapolated spectrum.
fix_neg_r (bool) – If True, the negative values for the “components.PowerLaw”
parameter r will be flagged and the extrapolation will be
done with a constant zero-value.
width (float) – Width of window, in eV, around energy in which to find nearby
energies, i.e. a value of 10 eV (the default) means to
search +/- 5 eV. The default is 10.
only_major (bool) – Whether to show only the major edges. The default is False.
order (str) – Sort the edges, if ‘closest’, return in the order of energy
difference, if ‘ascending’, return in ascending order, similarly
for ‘descending’. The default is ‘closest’.
edges (iterable) – A sequence of edges, if provided, it overrides energy, width,
only_major and order.
Returns:
A PrettyText object where its representation is ASCII in terminal and
Rebin the signal into a smaller or larger shape, based on linear
interpolation. Specify eithernew_shape or scale. Scale of 1
means no binning and scale less than one results in up-sampling.
Parameters:
new_shape (list (of float or int) or None) – For each dimension specify the new_shape. This will internally be
converted into a scale parameter.
scale (list (of float or int) or None) – For each dimension, specify the new:old pixel ratio, e.g. a ratio
of 1 is no binning and a ratio of 2 means that each pixel in the new
spectrum is twice the size of the pixels in the old spectrum.
The length of the list should match the dimension of the
Signal’s underlying data array.
Note : Only one of ``scale`` or ``new_shape`` should be specified,
otherwise the function will not run
crop (bool) – Whether or not to crop the resulting rebinned data (default is
True). When binning by a non-integer number of
pixels it is likely that the final row in each dimension will
contain fewer than the full quota to fill one pixel. For example,
a 5*5 array binned by 2.1 will produce two rows containing
2.1 pixels and one row containing only 0.8 pixels. Selection of
crop=True or crop=False determines whether or not this
“black” line is cropped from the final binned array or not.
Please note that if ``crop=False`` is used, the final row in each
dimension may appear black if a fractional number of pixels are left
over. It can be removed but has been left to preserve total counts
before and after binning.
dtype ({None, numpy.dtype, "same"}) – Specify the dtype of the output. If None, the dtype will be
determined by the behaviour of numpy.sum(), if "same",
the dtype will be kept the same. Default is None.
out (BaseSignal (or subclass) or None) – If None, a new Signal is created with the result of the
operation and returned (default). If a Signal is passed,
it is used to receive the output of the operation, and nothing is
returned.
By default dtype=None, the dtype is determined by the behaviour of
numpy.sum, in this case, unsigned integer of the same precision as
the platform integer
For details on the algorithm see Gloter, A., A. Douiri,
M. Tence, and C. Colliex. “Improving Energy Resolution of
EELS Spectra: An Alternative to the Monochromator Solution.”
Ultramicroscopy 96, no. 3–4 (September 2003): 385–400.
Set the microscope parameters that are necessary to calculate
the GOS.
If not all of them are defined, in interactive mode
raises an UI item to fill the values.
beam_energy: float
The energy of the electron beam in keV.
convergence_anglefloat
The microscope convergence semi-angle in mrad.
collection_anglefloat
The collection semi-angle in mrad.
toolkitstr, 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.
displaybool
If True, display the user interface widgets. If False, return the
widgets container in a dictionary, usually for customisation or
testing.
Plots a histogram to help in choosing the threshold for
spikes removal.
Parameters:
signal_mask (boolean array) – Restricts the operation to the signal locations not marked
as True (masked)
navigation_mask (boolean array) – Restricts the operation to the navigation locations not
marked as True (masked).
zero_loss_peak_mask_width (None or float) – If None, the zero loss peak is not masked, otherwise, use the
provided value as width of the zero loss peak mask.
Default is None.
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) – if int 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 the
spikes_diagnosis()
method.
zero_loss_peak_mask_width (None or float) – If None, the zero loss peak is not masked, otherwise, use the
provided value as width of the zero loss peak mask.
Default is None.
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.
threshold (float) – For a given navigation coordinate, mean value in the energy axis
below which the pixel is considered as vacuum.
start_energy (float, None) – Minimum energy included in the calculation of the mean intensity.
If None, consider only the last quarter of the spectrum to
calculate the mask.
closing (bool) – If True, a morphological closing is applied to the mask.
opening (bool) – If True, a morphological opening is applied to the mask.
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.
data (numpy.ndarray) – The signal data. It can be an array of any dimensions.
axes ([dict/axes], optional) – List of either dictionaries or axes objects to define the axes (see
the documentation of the AxesManager
class for more details).
attributes (dict, optional) – A dictionary whose items are stored as attributes.
metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the metadata attribute.
Some parameters might be mandatory in some cases.
original_metadata (dict, optional) – A dictionary containing a set of parameters
that will to stores in the original_metadata attribute. It
typically contains all the parameters that has been
imported from the original data file.
ragged (bool or None, optional) – Define whether the signal is ragged or not. Overwrite the
ragged value in the attributes dictionary. If None, it does
nothing. Default is None.