2.7. empix.cumulatively_integrate_1d
- cumulatively_integrate_1d(input_signal, optional_params=None)[source]
Integrate cumulatively a given input 1D
hyperspysignal.This Python function assumes that the input 1D
hyperspysignal 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
normalizeis an optional boolean parameter that determines whether normalization is enabled or not.- Parameters:
- input_signal
hyperspy._signals.signal1d.Signal1D|hyperspy._signals.complex_signal1d.ComplexSignal1D The input
hyperspysignal.- optional_params
empix.OptionalCumulative1dIntegrationParams| None, optional The set of optional parameters. See the documentation for the class
empix.OptionalCumulative1dIntegrationParamsfor details. Ifoptional_paramsis set toNone, rather than an instance ofempix.OptionalCumulative1dIntegrationParams, then the default values of the optional parameters are chosen.
- input_signal
- Returns:
- output_signal
hyperspy._signals.signal1d.Signal1D|hyperspy._signals.complex_signal1d.ComplexSignal1D The output
hyperspysignal that samples the cumulative integral of the input signalinput_signal. Note that the metadata of the input signal is copied over to the output signal, with the title being overwritten.
- output_signal