The bigger window
The process will be based on a 'sufficient' increase in the amplitudes over a 20ms window. This 'sufficiency' is indicative of a flare in the waveform. The task is to identify the 20ms flare and get it to the centre of the 100ms window. For the sake of convenience, 100ms window will be referred to as the BigWindow(BW) and 20ms as SmallWindow(SW).