Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Finding local maxima/minima in noisy, pediodic data

by kikuchiyo (Monk)
on Oct 13, 2009 at 09:02 UTC ( #800866=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Finding local maxima/minima in noisy, pediodic data
in thread Finding local maxima/minima in noisy, pediodic data

No, I'm interested in the extrema of the short wavelength pulses.

However, I can use your suggestion about long term averages for that, too.

A possible strategy: In the first pass I generate a smoothed dataset from the original using a moving average of about 200 points (or 2-3 periods of the short pulses). This will smoothen out the short wavelength pulses but retain the long term characteristics. Then I compare the original with this smoothed dataset point by point: if it is below the average I need to look for a minimum, if it is above, I look for a maximum.


Comment on Re^3: Finding local maxima/minima in noisy, pediodic data
Re^4: Finding local maxima/minima in noisy, pediodic data
by mpeg4codec (Pilgrim) on Oct 13, 2009 at 20:20 UTC

    With any sort of filter (moving average or low pass) you will induce a delay on the response. That is to say, if you're at a peak in the filtered data and want to match it with the original data, you will need to look back a fixed period of time.

    For what it's worth, I think the low pass filter will be much more applicable to your goal since the noise is high frequency periodic. The alpha I provided above does a fine job smoothing out the noise but leaving the pulses of the desired frequency.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://800866]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2014-12-19 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (85 votes), past polls