I have the following time serie data and I need to detect the following pattern: - a 1st spike above a given value - a 2nd spike close to the given value
What defines "a spike" is that its value is x% above the surrounding spikes.
I would like to use python (numpy and pandas modules) to detect these.
As a background, the goal is to trigger an action when the second spike is detected (outlined in red in the attached image).