Re: Peak Finding
- To: mathgroup at smc.vnet.net
- Subject: [mg126288] Re: Peak Finding
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Sun, 29 Apr 2012 02:08:03 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
On 4/28/12 at 5:24 AM, richardgreco at gmail.com (merit_2) wrote: >I am wondering if there are any peak finding notebooks around or >examples. I have been interested in doing some peak finding/peak >detecting in Mathematica for a while, it has been challenging. My >specific area of application is x-ray detection. The simplest method to find a peak in a set of data would be to use the built-in function Ordering. That is: In[4]:= data = RandomReal[1, {10}]; {#, data[[#]]} &[First@Ordering[data, -1]] Out[5]= {4,0.895344} Ordering returns the position of the maximum. However, this simple approach is very sensitive to noise in the data. With noise, the maximum value could be some distance from the peak depending on the magnitude of the noise, magnitude of the peak and sharpness of the peak. To get around this, you will need to filter the data in some manner. There are a number of possible approaches, fitting a known function to the data, using wavelet based methods to filter noise or fitting an orthogonal polynomial series to the data. The choice of which approach to use depends on details of the data.