I am looking at data like this:
Source data: http://pastebin.com/raw.php?i=L6cd8d5K
The data is quasi-periodic, there is a distinct cycle but it is not an exact repeat, and the period changes considerably. I would like to find accurate peak positions, and period durations, for each cycle. Ideally the peak positions would match the intuitive notion of where the exact peak is.
What makes this hard:
noise: although it may not be entirely noise! the variation is much greater when the values are high, and so the highest spikes tend to occur near where the "real" peak is.
the waveform is not symmetrical: neither left-to-right nor up-down. doing something like a highpass filter will move peaks up and down by an amount that depends on their duration and the shape in between.
What is unlikely to work well:
bandpass filter combined with conventional peak picking: the position of the peaks will shift since values from the (asymmetrical) up and down slopes is added to where the peak is. The really high values will not have a high weight in the result since the lowpass part of the bandpass filter will spread their energy to adjacent values.
autocorrelation: the shape of successive cycles is too different.
period durations measured from the leading (or trailing) edge of one cycle to the next: again shapes are too different.
findpeaks
which has some really nice parameters you can use to pick the peaks. $\endgroup$