10-18-2017 04:23 PM
Hi
for my experiment I need to find out multiple peaks and valleys but every time data changes so setting up threshold manually is difficult. Please help me in finding threshold automatically.
Thanks
10-18-2017 04:59 PM
Consult a terrain map to locate multiple peaks and valleys. If this is a LabVIEW question, maybe you could elaborate some and upload any code you are having trouble with.
10-19-2017 03:36 AM
You could try to normalise the data before detecting peaks. For instance, scale the data to 0 to 1 (subtract min, divide by max-min) or -1 to 1 (as before but X2-1). Or scale so the mean is 0 (get mean and subtract it) and divide by spread or stddev.
This might not work, good peak detection is an art. It's very dependant on the exact situation.
10-19-2017 03:56 AM
Or make a histogram. The highest peak in the histogram is often (it depends) the noise level. Base the threshold on that.
10-19-2017 05:45 AM
Read the help on the peak detection vi.
It will fit a square function on your data over point length. So depending on what you are looking for you migth need some interations ..
If you post some example data and a more detailed description of the points you are looking for more detailed help is possible.
10-19-2017 08:53 AM
wiebe@CARYA wrote:
You could try to normalise the data before detecting peaks. For instance, scale the data to 0 to 1 (subtract min, divide by max-min) or -1 to 1 (as before but X2-1). Or scale so the mean is 0 (get mean and subtract it) and divide by spread or stddev.
This might not work, good peak detection is an art. It's very dependant on the exact situation.
I agree. There is no "one size fits all" way to find the peaks in data. It all depends what your data looks like.
Here is some typical data that I run into quite often. I can't think of an "easy" way to detect the 10 peaks that are above the noise floor in this spectrum. By setting the threshold too high, you risk missing the lower peaks. Set it too low and you get a lot of false positives from the noise floor.
As Henrik said, we can't help you unless you post some typical data.
10-19-2017 11:52 AM
A high pass ? 🙂
10-19-2017 12:53 PM
I agree, a highpass filter would work. But I think jamiva was just making a point, not asking a question. Point would be: this needs a high pass filter, other situations need other solutions... So we need details to make specific recommendations.