[FieldTrip] Running the ICA method to remove EOG/ECG artifact on Neuromag(*.fif) data

Alexandre Gramfort alexandre.gramfort at inria.fr
Fri Apr 13 09:22:53 CEST 2012


hi Jan-Mathijs,

thanks for the quick answer.

> It depends a bit on the exact algorithm that is used, but for example the
> runica implementation (we use the EEGlab code for this) performs a whitening
> of the data prior to the decomposition. This would address the difference in
> magnitude issue, wouldn't it?

it does yes. My question is then how do you compute the withering matrix?

> Also can Fieldtrip write data back into fif files keeping intact
> all the measurement info?
>
> Not really; I have some code of Lauri's (which is not yet in FT), which can
> write epoched data to a fif-file. However, most of the measurement info is
> lost along the way.

that's what I feared.

> Also, since we're not fif-experts, it's not trivial for
> us to find out how the measurement info should be formatted. Of course it is
> possible to reverse engineer this from the mne-code, but this is heavily
> geared towards elekta hardware. Yet, I could imagine that this functionality
> could be valuable, because it would enable two-way traffic of data between
> FT and MNE-suite.

that would be very valuable indeed.

> Do you happen to have any code that writes meaningful
> measurement info?

not in one function or at least not in matlab.

one should have a fiff_write_meas_info.m that does the opposite to:

https://github.com/mne-tools/mne-matlab/blob/master/matlab/fiff_read_meas_info.m

part of the answer is in:

https://github.com/mne-tools/mne-matlab/blob/master/matlab/fiff_write_evoked.m

a python example is in :

https://github.com/mne-tools/mne-python/blob/master/mne/fiff/meas_info.py#L235

but I agree you need a fairly good understanding of the fif format…

we might have to sit down together to do this.

Alex




More information about the fieldtrip mailing list