LumiSpy / lumispy

Luminescence data analysis with HyperSpy.
https://lumispy.org
GNU General Public License v3.0
25 stars 17 forks source link

Find maximum and width of a peak #171

Closed jlaehne closed 1 year ago

jlaehne commented 1 year ago

Similar to the centroid function from #168 we should create further functions that give back information about a peak without fitting

  1. Maximum of a peak HyperSpy provides the valuemax function to find the position of a maximum of a signal. With smoothing and signal ranges that can work also on noisier data or data with multiple peaks, respectively. However, an alternative approach that I would like to see implemented is taking the first derivative and then finding zero-crossings. In particular this method is useful to identify the positions of secondary maxima. EDIT: This functionality is actually provided by find_peaks1D_ohaver -- its been a while since I had looked at that function

  2. Width of a peak From fits, you can get the FWHM of a peak, but that is not very helpful for asymmetric peak shapes. I therefore envisage a function that calculates the distance between the half maximum points of a peak along the signal axis. EDIT: This is actually provided by estimate_peak_width

jlaehne commented 1 year ago

Great, we don't need to reinvent the wheel. Helps to dig deeper in the HyperSpy documentation.

However, we should consider including such functions that are particularly relevant for LumiSpy in the user guide - and definitely in our demos/tutorial lectures.