[Mne_analysis] removing channels from .fif structure

Ellen Lau ellenlau at nmr.mgh.harvard.edu
Wed Jan 26 09:30:34 EST 2011
Search archives:

Hi all,

For the first few subjects we ran in our MEG-EEG study, we accidentally
acquired 'junk' data for several non-existent EEG channels. When we
realized this we changed our parameters to stop acquiring these channels.
The problem is that now our datafiles have different numbers of channels,
and this causes us problems when we want to do things like compute the
grand-average EEG across subjects since, for example, mne_process_raw
can't average files with different numbers of channels. Obviously it
doesn't solve the problem to just mark the junk channels as 'bad channels'
or rename them as 'MISC' channels, because that doesn't actually remove
them from the data structure--the file still has 400 channels listed
rather than 398.

We can write our own code to hack around this and grand-average in Matlab,
but what we'd really like to do to make all of future processing seamless
for this dataset is to read the average datafiles into Matlab with
fiff_read_evoked, fix the appropriate fields to delete the junk channels,
and then use fiff_write_evoked to write it back to a .fif file that has
the correct number of channels. However it's been a bit challenging to
figure out what all fields need to be changed in the Matlab structure, so
I was wondering if anyone had done this before and had suggestions or code
to share.

Thanks,
Ellen



More information about the Mne_analysis mailing list