[Eeglablist] How to high-pass filter eeg data containing NaNs?

leo budinich leo.budinich at edu.unito.it
Wed May 11 06:38:12 PDT 2016


Hi Eeglablist,

I'm writing here because I'm a new user of EEGLAB and I am facing a problem
with high-pass filtering some data.

I am trying to apply on a freely downloadable dataset some of the same
processing steps that have been used by the researchers that provided the
data (see http://www.stefanfrank.info/pubs/BL2015.pdf).
The set I want to filter has 32 channels and has already been been
band-pass filtered at 0.05Hz - 25Hz, recalibrated and re-referenced to the
mastoids.

An important detail is that the EEG recordings concern the reading of two
hundred english sentences; the data recorded between the presentations of
two sentences have been "set to NaN" by the researchers who provided the
dataset, so the channel data of, e.g. subject01, presents this aspect when
you inspect it:

<-------------sentence_1-------------><---------wait----------><---------sentence_2--------->

signal-signal-signal-signal-signal-NaN-NaN-NaN-NaN-signal-signal-signal-signal



What I would like to do is high-pass filter the entire set to 0.50Hz, as a
way to "mitigate the baseline problem by reducing the correlation between
the baselines and amplitudes by applying an additional high-pass filter
with a sufficiently high cut-off frequency" (see the reference, pp.4).

Unfortunately, when I apply a FIR filter with a 0.50Hz lower-edge I obtain
a lot of NaNs on the areas that previously were 'signal', but not
everywhere (and, curiously, the processing is really fast), so that it gets
this kind of aspect:


<-------------sentence_1-------------><---------wait----------><---------sentence_2--------->

NaN-NaN-NaN-NaN-NaN-NaN-NaN-NaN-NaN-NaN-NaN-NaN-NaN-signal-NaN-NaN


Here's the eeglab output:

pop_eegfiltnew() - performing 1651 point highpass filtering.
pop_eegfiltnew() - transition band width: 0.5 Hz
pop_eegfiltnew() - passband edge(s): 0.5 Hz
pop_eegfiltnew() - cutoff frequency(ies) (-6 dB): 0.25 Hz
pop_eegfiltnew() - filtering the data (zero-phase)
firfilt(): |====================| 100%, ETE 00:00
Done.


I imagined that the filter function doesn't produce the right output
because of the NaNs present between the sentences, but as my comprehension
of the functioning of filters and of eeglab in general is extremely limited
at the moment, it turns out to be just a speculation.

Could you help me understanding what's wrong with my filtering?

And, if my hypothesis is correct, i.e. the filter cannot be applied to data
containing NaNs, how would you apply a high-pass filter to data structured
as I indicated above (i.e., containing NaNs in some parts)?

Thank you!
Leo

-- 
------------------------

Indirizzo istituzionale di posta elettronica degli studenti e dei laureati 
dell'Università degli Studi di Torino
Official University of Turin email address for students and graduates 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20160511/1d02ce73/attachment.html>


More information about the eeglablist mailing list