You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
output of tfr_array_multitaper is incorrect? #8724
I did some more tests, and actually the output seems correct. It occurs because the tapers don't go to 0 on the edges, so when there is discontinuity in the signal, there is also some discontinuity/oscillations in the output.
I think one enhancement that would be helpful, is to be able to specify the number of tapers and not only the time_bandwidth. Currently the number of tapers is imposed as floor(time_bandwidth - 1). However, the last tapers are always nonzero on the edges, so it could be good to choose a smaller number of tapers to have no discontinuity/oscillations. It should be pretty easy to add that option. I could look into it.
So I think this is not an issue. The only potential enhancement would be to specify manually the number of tapers instead of it being set automatically. Although it would be nice, I don't personally need it right now, so I'll close this issue.
Activity
agramfort commentedon Jan 9, 2021
indeed there is something weird going on.
using fieldtrip I tried:
it gives me:
agramfort commentedon Jan 16, 2021
chapochn commentedon Jan 18, 2021
I did some more tests, and actually the output seems correct. It occurs because the tapers don't go to 0 on the edges, so when there is discontinuity in the signal, there is also some discontinuity/oscillations in the output.
I think one enhancement that would be helpful, is to be able to specify the number of tapers and not only the time_bandwidth. Currently the number of tapers is imposed as floor(time_bandwidth - 1). However, the last tapers are always nonzero on the edges, so it could be good to choose a smaller number of tapers to have no discontinuity/oscillations. It should be pretty easy to add that option. I could look into it.
agramfort commentedon Jan 24, 2021
but if you set time_bandwidth to 2 than you have only 1 taper and it does not look at all like fieldtrip.
can you give a code snippet that produces similar results as fieldtrip?
chapochn commentedon Jan 27, 2021
Hi,
This is my fieldtrip code:
It gives the same result as mne (modulo some scaling and boundary conditions).
chapochn commentedon Nov 21, 2021
So I think this is not an issue. The only potential enhancement would be to specify manually the number of tapers instead of it being set automatically. Although it would be nice, I don't personally need it right now, so I'll close this issue.