[FieldTrip] spectrum interpolation

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Fri Aug 26 11:05:41 CEST 2022

Hi Philip,

The error you run into seems a hard constraint for the ‘dftfilter', with the option ’neighbour’. This means that this type of filtering cannot be done if your trials are of different length.
In this case, I would recommend just using the default value for dftreplace.

Best wishes and good luck,

On 24 Aug 2022, at 16:57, philip Joadavi via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Dear all,

I have a question (which might be very stupid) regarding the line noise removal using spectrum interpolation using DFT method.

currently, I'm applying the notch filter on my data, but I noticed for some of my subjects the 50Hz is not entirely removed.

I have 32-channel EEG data (with a sampling frequency of 2048) with many trials that have different lengths (from 15 seconds to 5 min). If I understood correctly the best method for removing the 50 Hz from this kind of data is spectrum interpolation. Unfortunately, I'm having a hard time making it to work.

here is what I have defined:
cfg.dftfilter       = 'yes';
cfg.dftreplace  = 'neighbour';
cfg.continuous = 'yes';
cfg.padding      =  (2^nextpow2(size(Data{1}.trial,2)))/Data{1}.fsample
cfg.padtype      =  'data'

so, my first trial has a length of 368200, which for the cfg.padding I use 256.
here is where I'm stuck and apparently I'm doing something wrong, which gives me this error:
=> "Padding by data mirroring is not supported for spectrum interpolation"
I also remove the option for continuous data, but it did not solve my problem.

I would appreciate any help!

Thanks a lot!

fieldtrip mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220826/f6db178d/attachment.htm>

More information about the fieldtrip mailing list