hyperspy-demos icon indicating copy to clipboard operation
hyperspy-demos copied to clipboard

Demo on elemental mapping w EELS

Open idahj opened this issue 7 years ago • 8 comments

I've made a demo on creating elemental maps using EEL spectra.

idahj avatar Sep 24 '17 15:09 idahj

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!

thomasaarholt avatar Sep 24 '17 15:09 thomasaarholt

Thanks, Thomas.

  1. Noise: As I understand it, with EELS the noise can be viewed as Gaussian distributed (while EDS can not)?

  2. 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.

  3. 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.

idahj avatar Sep 24 '17 18:09 idahj

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.

idahj avatar Sep 27 '17 13:09 idahj

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!

magnunor avatar Nov 15 '19 08:11 magnunor

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.

francisco-dlp avatar Nov 15 '19 08:11 francisco-dlp

Good point! I added the power law background into the main model.

magnunor avatar Nov 15 '19 12:11 magnunor

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).

magnunor avatar Dec 10 '19 11:12 magnunor

anything blocking to merge this PR?

jlaehne avatar Aug 28 '21 13:08 jlaehne

Moved to https://github.com/hyperspy/exspy-demos/pull/3.

ericpre avatar Mar 17 '24 12:03 ericpre