Closed liuchzzyy closed 6 months ago
I'm going to leave the discussion to people who are a bit more knowledgeable in doing eels. @francisco-dlp and @ericpre might have good suggestions. The background for your data doens't look like power law function. It could be because you are in the more linear reagion that fitting the background is struggling.
There are lots of different options for background subtraction you could try:
Maybe start with a polynomial of degree 2-3 and see if that works. A better discussion of the different types of backgrounds common to electron microscopy might be a useful addition to the documentation.
This PR might also be relevent https://github.com/hyperspy/hyperspy/pull/3381/files/2ddac67596e725517a6d2d937e0f4c279dcf331c..4175422e6f52e85ec3fb09b3bb8a086b670e556f
Similarly as @CSSFrancis already said, it seems that the spectrum you get from clustering is not suitable for what you are trying to do:
Hi, all I am just starting to EELS curve fitting with the data obtained after cluster_analysis of hyperspy, but resulting in a bad Background fitting.
and also if considering
m.print_current_values()
, I could have that information:Then I tried the
remove_background
of my data obtained from cluster_analysis, but it does not plot properly, which should show background and the data after background removal, but not, as below:also with or without the parameters
signal_range
andfast = False
, they don't work,,, :( (which mentioned in Hyperspy issues)To think out where the problem is from, first I tried the sample and code from exspy demo, and it works well, which means the issue does not stem from the package, I guess. (sample and example code I used)
I have no idea what else I could attempt further, hence want to ask a question here, any idea would be appreciative. And also, I attached one high loss spectrum and related low loss from cluster_analysis of hyperspy in case you could have a trrrry. Clusters.zip
Here is my code for EELS curve fitting
It is also showing some outputs like: