2.7. empix.cumulatively_integrate_1d

cumulatively_integrate_1d(input_signal, optional_params=None)[source]

Integrate cumulatively a given input 1D hyperspy signal.

This Python function assumes that the input 1D hyperspy signal samples from a mathematical function \(F_{\mathbf{m}}\left(u\right)\) which is piecewise continuous in \(u\), where \(u\) is the signal space coordinate of the input signal, and \(\mathbf{m}\) is a vector of integers representing the navigation indices of the input signal. The Python function approximates the cumulative integral of \(F_{\mathbf{m}}\left(u\right)\) given the input signal. We define the cumulative integral of \(F_{\mathbf{m}}\left(u\right)\) as

(2.7.1)\[\begin{split}\text{CDF}_{\text{1D}}\left(u\right)&=\frac{1}{\Gamma} \int_{u_{i}}^{u}du^{\prime}\,F_{\mathbf{m}}\left(u^{\prime}\right), \\&\quad u\in\left[\min\left(u_{i},u_{f}\right), \max\left(u_{i},u_{f}\right)\right],\end{split}\]

where

(2.7.2)\[\begin{split}\Gamma=\begin{cases} 1, & \text{if }\mathcal{N}\le 10^{-10} \text{ or } \text{normalize}=\text{False}, \\\left|\int_{u_{i}}^{u_{f}}du^{\prime}\, F_{\mathbf{m}}\left(u^{\prime}\right)\right|, & \text{otherwise}, \end{cases}\end{split}\]
(2.7.3)\[\mathcal{N}=\left|\int_{u_{i}}^{u_{f}}du^{\prime} \,F_{\mathbf{m}}\left(u^{\prime}\right)\right|,\]

\(u_i\) and \(u_f\) specify the interval over which cumulative integration is performed, the interval being \(\left[\min\left(u_{i},u_{f}\right), \max\left(u_{i},u_{f}\right)\right]\), and normalize is an optional boolean parameter that determines whether normalization is enabled or not.

Parameters:
input_signalhyperspy._signals.signal1d.Signal1D | hyperspy._signals.complex_signal1d.ComplexSignal1D

The input hyperspy signal.

optional_paramsempix.OptionalCumulative1dIntegrationParams | None, optional

The set of optional parameters. See the documentation for the class empix.OptionalCumulative1dIntegrationParams for details. If optional_params is set to None, rather than an instance of empix.OptionalCumulative1dIntegrationParams, then the default values of the optional parameters are chosen.

Returns:
output_signalhyperspy._signals.signal1d.Signal1D | hyperspy._signals.complex_signal1d.ComplexSignal1D

The output hyperspy signal that samples the cumulative integral of the input signal input_signal. Note that the metadata of the input signal is copied over to the output signal, with the title being overwritten.