If I have a signal as the one below, how would I go about finding the beginning and end of the two "major events" (illustrated by a green arrow where the event begins, and a red arrow where it ends)?
I've tried the method suggested in this answer, but it seems that no matter how much I play around with the lag
, threshold
and influence
variables, it either reacts to the tiny changes in the beginning, middle and end of the graph (where there are no major events), or it doesn't react at all.
I can't simply determine if the signal is above a fixed threshold, as the strength of the signal can vary, thus I need some way of detecting when the signal deviates a lot from the "background noise". Also, the signal can sometimes be in an overall trend, like in the graphs below.
I'm already applying a simple low- and high pass filter to the signal. What I would like to have is something like the orange signal in the chart below (I've drawn it manually just to illustrate).