unfoldtoolbox / UnfoldSim.jl

Simulate EEG / ERP data with overlap, non-linear effects, multiple regression
MIT License
7 stars 4 forks source link

Implementation of the `hanning` function does not match its description #122

Open jschepers opened 2 weeks ago

jschepers commented 2 weeks ago

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).

behinger commented 2 weeks ago

I can fix this if you want