Good test for periodicity between signals 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.
Edit
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?
Edit 2
More &quot;periodic&quot; 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.
Something you could do is calculate the FFT of both signals and define some criterion for periodicity. For example, you pick the highest component of each FFT and compare the two (one from each signal) and thus determine which is more &quot;periodic&quot;. You could consider an average of all the FFT components and compare. This would be a rather robust solution, since the FFT calculates the frequency decomposition of a signal.