hyperspy.misc.eels.tools module¶
-
hyperspy.misc.eels.tools.
eels_constant
(s, zlp, t)¶ Calculate the constant of proportionality (k) in the relationship between the EELS signal and the dielectric function. dielectric function from a single scattering distribution (SSD) using the Kramers-Kronig relations.
Parameters: - zlp ({number, 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, number, 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.
Returns: k
Return type: Signal instance
-
hyperspy.misc.eels.tools.
estimate_variance_parameters
(noisy_signal, clean_signal, mask=None, pol_order=1, higher_than=None, return_results=False, plot_results=True, weighted=False, store_results='ask')¶ Find the scale and offset of the Poissonian noise
By comparing an SI with its denoised version (i.e. by PCA), this plots an estimation of the variance as a function of the number of counts and fits a polynomy to the result.
Parameters: - clean_SI (noisy_SI,) –
- mask (numpy bool array) – To define the channels that will be used in the calculation.
- pol_order (int) – The order of the polynomy.
- higher_than (float) – To restrict the fit to counts over the given value.
- return_results (Bool) –
- plot_results (Bool) –
- store_results ({True, False, "ask"}, default "ask") – If True, it stores the result in the signal metadata
Returns: - Dictionary with the result of a linear fit to estimate the offset
- and scale factor
-
hyperspy.misc.eels.tools.
power_law_perc_area
(E1, E2, r)¶
-
hyperspy.misc.eels.tools.
ratio
(edge_A, edge_B)¶
-
hyperspy.misc.eels.tools.
rel_std_of_fraction
(a, std_a, b, std_b, corr_factor=1)¶