[FieldTrip] Dealing with warning message "data contians NaN values"

Jeremy Pulmano jpulmano at princeton.edu
Thu Jul 18 11:15:24 CEST 2019


Hi,

I've realized that the warning message often comes right after epoching
(using ft_definetrial and then ft_redefinetrial). It seems like it
successfully breaks the data into segments but still contains NaNs for
whatever reason. Here are more details about the pipeline so far:

   1. High pass filtering (0.1 Hz / FIR / order = 100)
   2. Downsampling (1024 to 128 Hz)
   3. Epoching (prestim 0.1, poststim 0.4)
   4. Base-line correction [ -0.1 0 ]
   5. Re-referencing (common avg.)
   6. ICA / component rejection
   7. Visual artifact removal
   8. Low pass filter (30 Hz)

Any further help would be greatly appreciated.

Thanks,
Jeremy

On Wed, Jul 17, 2019 at 4:57 PM Jeremy Pulmano <jpulmano at princeton.edu>
wrote:

> Hi Erika,
>
> The original sampling rate is 1024 Hz and the new sampling rate is 128 Hz.
>
> Thanks,
> J
>
> On Wed, Jul 17, 2019 at 4:49 PM Erika Puiutta <
> erika.puiutta at uni-oldenburg.de> wrote:
>
>> Hey J,
>>
>> this is just an educated guess since I don't really know how fieldtrip
>> does the downsampling, but what is your sampling frequency and the sampling
>> frequency you sample down to? Is it possible that your downsampling
>> frequency is not a harmonic of your original sampling frequency (say 1000Hz
>> to 300Hz)? Maybe there are NaNs for the new samples where fieldtrip can't
>> find a corresponding one from the old sampling frequency?
>>
>> Best of luck,
>> Erika
>>
>> Am 17.07.2019 um 17:26 schrieb Jeremy Pulmano <jpulmano at princeton.edu>:
>>
>> Hi all,
>>
>> I am new to both neuroscience and FieldTrip and am trying to debug my
>> preprocessing pipeline of EEG data (biosemi .bdf files). These are the
>> current steps:
>>
>>    1. High pass filtering
>>    2. Downsampling
>>    3. Epoching
>>    4. Base-line correction
>>    5. Re-referencing
>>    6. ICA / component rejection
>>    7. Visual artifact removal
>>    8. Low pass filter (I save the low pass filter for the end so that
>>    ICA yields better time course plots).
>>
>> However, after the first three steps (high pass, downsample, epoch), I
>> continue to get the warning message: "Warning: data contains NaN values, no
>> filtering or preprocessing applied," starting at baseline correction. It
>> repeats itself over and over again. If I ignore these errors, the data
>> looks incorrect in the end. Why does this happen, and how can I resolve
>> this?
>>
>> Any tips would be appreciated.
>>
>> Thanks,
>> J
>>
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> https://doi.org/10.1371/journal.pcbi.1002202
>>
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> https://doi.org/10.1371/journal.pcbi.1002202
>>
> --
>
> *Jeremy Pulmano*
> *Princeton University Class of 2021*
> B.S.E. Computer Science
> e: jpulmano at princeton.edu | c: (862) 220-5903
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190718/e996b24d/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list