Back to the main page.

Bug 2684 - MOMEEG - Mother of all combined MEG-EEG bugs

Status NEW
Reported 2014-09-15 14:10:00 +0200
Modified 2014-09-27 11:35:02 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Jim Herring
URL:
Tags:
Depends on: 26852679
Blocks:
See also:

Jim Herring - 2014-09-15 14:10:22 +0200

This bug is intended for discussion on all bugs related to combined MEG-EEG datasets


Jim Herring - 2014-09-15 14:26:21 +0200

As I've commented in bug2685, where should we best start increasing support of combined MEG-EEG datasets? In the case of the Stockholm workshop we are splitting the data early on into an EEG and a MEG part using ft_preprocessing and cfg.channel = 'EEG' / 'MEG'. (Un-)fortunately traces of the other data remain, such as the grad field when using cfg.channel = 'EEG'. Certain functions, such as ft_scalpcurrentdensity, are only meant to be used on EEG data and will block when they detect presence of MEG data (e.g. a grad field). Should we allow these functions to process data containing traces of the unsupported data and throw a warning instead? The user is after all responsible for supplying the correct data. Or should we make sure that traces of the other data are completely removed when splitting the data?


Robert Oostenveld - 2014-09-15 17:13:56 +0200

a good start would be ft_appenddata: if input becomes channel-concatenated and grad is present in one and elec in the other, the output should have grad and elec.


Jim Herring - 2014-09-17 16:14:19 +0200

I agree, the problem with the current dataset is that the data still contains both elec and grad fields after splitting in MEG and EEG data, this currently causes problems in certain function. If we were to improve the splitting by removing the grad field in case of splitting into EEG, and removing the elec field in case of splitting into MEG ft_appenddata would indeed have to add both the elec and grad field.


Stephen Whitmarsh - 2014-09-25 19:35:09 +0200

So far then we have ft_scalcurrentdensity and ft_prepare_neighbours crash on EEG data with a grad field. For the workshop hands-on I am adding a rmfield, and not it as a bug.


Jim Herring - 2014-09-26 15:25:28 +0200

it works when using cfg.senstype = 'EEG'; Fortunately the error is clear in what you have to do to solve the problem. ft_scalpcurrentdensity should not fail anymore because senstype is always set to 'EEG' as it is not supposed to be run on MEG data. It could be that the version you are using is slightly outdated.


Robert Oostenveld - 2014-09-27 11:21:20 +0200

(In reply to Jim Herring from comment #5) There was confusion due to small/LARGE letters. FieldTrip convention is always small letters. I made it case insensitive. enhancement - allow both EEG/MEG and eeg/meg for senstype, made documentation more consistent mac011> svn commit fileio/ft_read_sens.m private/ft_fetch_sens.m Sending fileio/ft_read_sens.m Sending private/ft_fetch_sens.m Transmitting file data .. Committed revision 9846.


Robert Oostenveld - 2014-09-27 11:35:02 +0200

mac011> svn commit ft_math.m Sending ft_math.m Transmitting file data . Committed revision 9848. keep the elec and/or grad from the input in case it is identical in all input arguments. No hack is needed any more in copying grad or elec around.