[Scilab-users] Peaks and valleys [was: Forum dedicated to Scilab developments -> practical concern]

paul.carrico at free.fr paul.carrico at free.fr
Thu Oct 6 12:32:17 CEST 2016


thanks for the information and the link 


Paul 

----- Mail original -----

De: "Dang Ngoc Chan, Christophe" <Christophe.Dang at sidel.com> 
À: "Users mailing list for Scilab" <users at lists.scilab.org> 
Envoyé: Jeudi 6 Octobre 2016 10:26:50 
Objet: [Scilab-users] Peaks and valleys [was: Forum dedicated to Scilab developments -> practical concern] 

Hello, 

> De : paul.carrico at free.fr 
> Envoyé : mercredi 5 octobre 2016 21:56 
> 
> In attachment is typically a project I'm working on : 
> determination of peaks and valley on a noisy signal; 
> Trying to avoid reinventing the wheel, 
> I had a look on information's and algorithms on internet .... 
> not so easy topics I was thinking at the first time. 

I used to work in the X-ray diffraction and fluorescence field, 
where the detection of peaks is a main concern. 
All this depends on the signal-to-noise ratio, but we used the following algorithms, 
Applied one after the other: 

— cutting the signal that is below the background noise: 
in the X-ray field, the noise follows a Poisson statistics, 
so if you know the background level (determined "manually"), 
you can eliminate bands where the signal is below bkg + 3*sigma 

— Savitzky-Golay algorithm for smoothing and determining the first and second derivative: 
the peak summit is a local minimum of the 2nd derivative, 
and the inflection points (i.e. its zeroes) can be used to estimate the peak width and also possibly its location 
(chord middle) 
https://commons.wikimedia.org/wiki/File:Savitzky-golay_pic_gaussien_bruite.svg 

— eliminating the parasites: 
in this field, the peaks have a minimum width, 
so you can remove any detected peak if the first derivative is unexpectedly high. 

We also used "de-summation", 
i.e. from a set of peak position 
(determined automatically or manually), 
we generate a curve as a sum of "perfect peaks" 
(Gaussian, Lorentzian, pseudo-Voigt, Pearson-VII etc.) 
and we adjust the peaks parameters (position, width, shape) 
to minimise the quadratic difference with the signal 
(i.e. non-linear regression). 

I don't know if this is useful in your field, 
but the Savitzky-Golay algorithm is something widely used 
and easy to implement (especially if the points are uniformly spaced in x) 
and if the peak position and width have a physical meaning, 
de-summation can be powerful. 

-- 
Christophe Dang Ngoc Chan 
Mechanical calculation engineer 
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. 
_______________________________________________ 
users mailing list 
users at lists.scilab.org 
http://lists.scilab.org/mailman/listinfo/users 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161006/006c81ab/attachment.htm>


More information about the users mailing list