At the moment, the hanning function is implemented in such a way that the peak of the hanning window will not be at the user-given peak.
What needs to be changed is this line: return pad_array(signal, -Int(round(offset * sfreq / 2)), 0)
The shifting (zero-padding) also needs to be dependent on the given duration (apart from the offset).
At the moment, the
hanning
function is implemented in such a way that thepeak
of the hanning window will not be at the user-given peak. What needs to be changed is this line:return pad_array(signal, -Int(round(offset * sfreq / 2)), 0)
The shifting (zero-padding) also needs to be dependent on the given duration (apart from the offset).