I have two timeseries signals. They look like this:
Each signal started out from the same array, but each received different preprocessing treatments. Ultimately, each signal represents the breathing rate of a subject. Each peak constitutes the peak of an inhale, so the number of peaks/time yields the respiratory rate. I want to determine which preprocessing treatments yield a more periodic signal so that I can conduct the most optimal peak detection.
As you can see, both signals are noisy, but it looks like the orange timeseries has more consistent periodicity, making it more suitable for my task. What is an optimal test to determine how periodic each signal is so that I can determine the signal without having to look at them?
Ideally, a solution implemented in python or c++ would be great, but not necessary.
Here is a way to compute average frequency per signal.
Am I correct to assume the higher value is more periodic, or is that too simplistic?
More "periodic" probably isn't the right term. This is what I mean:
The first plot has less noise, so it is cleaner/easier to determine the periods between peaks. Again, I am ultimately trying to solve a peak detection problem.