hyperspy/hyperspy — pull request #48 by AEljarrat (2012-12-11 17:00:19+00:00)
Title: Zlp removal tool

Dear hyperspy developers,

my name is Alberto Eljarrat, PhD student at the University of Barcelona. My main interest is low-loss EELS analysis, although I first met hyperspy one time I wanted to perform PCA on a massive stacking of core-loss EELS data (at that time the toolbox had a different name :P).

I have started to work on the "estimate_elastic_scattering_threshold" and "estimate_elastic_scattering_intensity" routine of the EELSSpectrum class, adding some extra functionalities to the method.

In a nutshell: the old method was to use a single threshold point for the separation of the ZLP. Now, "estimate_elastic_scattering_threshold" should search for the inflexion point in the derivative of the EELSSpectrum (single, line or image) and return it (single float or image instance). It does so within a specified window and tolerance. Also uses an optional smoothing to deal with noise.

The changes in "estimate_elastic_scattering_intensity" have been made to make it compatible with the new routine.

I think that this new method can be of interest for the community, therefore I hope it can be included in hyperspy.

Thank you very much,
sincerely,

Alberto E.