I'm working on a project where I have quasi-sinusoidal bio-signal data collected from a sensor that's attached to an athlete's arm. I have to determine where each rep of the exercise the athlete performs starts and where it ends. For example, given the signal in the figure below, the output should be something like
Ex1: Timestamp1 - Timestamp2
Ex2: Timestamp2 - Timestamp3
...
I should leave out the rest periods, which are marked in red. Is there any Python library that offers such a method? If not, are there any published methods that I can look up and implement myself?
I have thought about utilizing the fact that each rep usually starts or ends when the signal crosses zero. However, crossings happen often during the rest period, and they might occur more than once during the exercise. (See the crossing next to the Timestamp2 crossing). So, I'm not sure if this fact could be utilized or not.
If you have a suggestion or a method in mind, I would be grateful if you could also mention whether this method is suitable for signals from multiple sensors, i.e., whether it could determine where the beginning and the end of each exercise is based on signals collected from multiple sensors attached to the athlete, not just the arm one.
My idea is such:
scipy.signal.find_peaks
or some self-written code