hyperspy-demos
hyperspy-demos copied to clipboard
Demo on elemental mapping w EELS
I've made a demo on creating elemental maps using EEL spectra.
Great that you're adding this! It's been needed for a while!
I've got a few questions and suggestions:
For decomposition you should use the poissonian noise argument=True. That's the first argument in the method. It'll give you a (sometimes much) better component separation. This is valid because the noise in eels is shot noise and is poissonian distributed (also applies to EDS).
Your method of convolving with the zlp is interesting (and sounds reasonably correct) but perhaps a bit peculiar? It might be better to use an example featuring a ll + cl dataset and then use a "if you don't have a ll dataset then do this" approach. However, if you haven't got that we'll stock with this! Maybe also explain that the fwhm is often known so that's "why" we can choose that.
Fitting with mpfit is outdated - it's better and faster to use leastsq. :)
Nice and indepth guide!
Thanks, Thomas.
-
Noise: As I understand it, with EELS the noise can be viewed as Gaussian distributed (while EDS can not)?
-
Low loss: For this sample we did not use dual-EELS in order to maximize the spectral dynamic range, and optimize the signal from the trace Cu and Zn.
-
Thanks for the tip on leastsq, I wasn't aware that the method could be bounded. I've changed the demo to using this rather than mpfit.
I've removed PCA as one of the processing steps, as it potentially can introduce artifacts. It makes the data look nicer, but not necessarily more correct.
Next, I'll add a better explanation on fhwm.
I updated the code to work for HyperSpy 1.5, improved the text (including the FWHM mentioned above), and several minor code improvements. Should be ready for review or merging!
This is a nice example. One minor comment: why removing the background? One of the advantages of curve fitting is that the background is part of the model.
Good point! I added the power law background into the main model.
Is it ok if I merge this pull request? I've had several people looking for a notebook like this.
(Asking, since I'm one of its authors).
anything blocking to merge this PR?
Moved to https://github.com/hyperspy/exspy-demos/pull/3.