Peaks over threshold with a minimum time interval between peaks

6 visualizaciones (últimos 30 días)
Hi there,
I am doing a peaks-over-threshold analysis which is usually straightforward using the [pks,locs] = findpeaks(x,y) function. It is also easy to whittle these peaks down to some minimum value of y by using lindx = find(pks>threshold). My reduced dataset would then be:
[pks,locs] = findpeaks(x,y);
lindx = find(pks>threshold)
Peaksoverthresh = pks(lindx); % identifies peaks over threshold
peaktimes = locs(lindx);
Peaksoverthreshtimes = x(peaktimes); %identifies times for peaks over threshold
However I need to be able to further reduce these peaks so that I find only the independant events in my data. In this instance I use a simple time interval so that if I find a series of peaks that are separated by less than the minimum time interval, I keep only the maximum of those peaks.
Has anybody experience of doing somthing like this?
Thanks,
Ben
  2 comentarios
Daniel Shub
Daniel Shub el 5 de Ag. de 2011
The answer depends on how noisy your data is. The solution will depend on if you have a tight cluster of peaks with time differences less than your time separation threshold, followed by a gap which is longer than you separation threshold or if your peaks are more uniformly distributed. If the peaks are uniformly distributed, the problem is more difficult because whether or not a peak gets counted depends on if all the other peaks are counted. You also need to specify what to do when you have a cluster of peaks (e.g., chose the first peak, middle peak, highest peak).
Image Analyst
Image Analyst el 5 de Ag. de 2011
What about conflicts? Like when the window is in one position you need to exclude a peak and in another position, that excluded peak is the one you want to keep. For example
S = [9 0 5 0 2]
With a window width of 3 elements, the first time it sees [9 0 5] and you want to exclude or "reduce" (as you call it) the 5, but when the window moves over and sees [5 0 2] the 5 peak is to be kept since it's the maximum in the window. So do you keep the 5 or exclude it?

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by