Back to the main page.
Bug 2463 - cfg.channel option leads to unexpected results with various functions due to changes in ft_senstype
Status | CLOSED FIXED |
Reported | 2014-01-30 11:00:00 +0100 |
Modified | 2014-05-14 20:08:50 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Philipp Taesler - 2014-01-30 11:00:05 +0100
Created attachment 587 data with our 61 eeg labels, being cut to 21 in the current ft version Since fieldtrip-20140121 functions using the option "cfg.channel = {'EEG'}" give different results from fieldtrip-20130901. Channels that were previously included in the analysis are now stripped from the data. Investigation shows, that the behaviour of ft_channelselection seems to have changed, probably due to changes in ft_senstype. Channels that were previously included in the "EEG" subset are now stripped, probably due to an intersection with a smaller list of candidates returned by ft_senslabel in connection with changed classification by ft_senstype (see example). With attached example data, 61 channel subset of an extended 1020 setup (IFCN 10/10 afaik): data = label: {61x1 cell} - fieldtrip-20130901 ft_senstype(data.label) ans = ext1020 - fieldtrip-20140121 ft_senstype(data.label) ans = eeg1020 This leads to our data being reduced to the 21 channels that intersect with the 1020 system. Maybe related to bug 2028.
Robert Oostenveld - 2014-03-26 17:38:47 +0100
thanks for the report, your analysis so far seems to point in a likely cause for the problem. For reference, I have copied the data to (internal) /home/common/matlab/fieldtrip/data/test/bug2463.mat I implemented a test script and one change. However, the change does not fix the complete problem yet. roboos@mentat001> svn commit Sending fileio/ft_chantype.m Sending ft_channelselection.m Adding test/test_bug2463.m Transmitting file data ... Committed revision 9322.
Robert Oostenveld - 2014-03-26 17:54:52 +0100
(In reply to Robert Oostenveld from comment #1) the problem is at line 341 in ft_senstype elseif (mean(ismember(ft_senslabel('eeg1010'), sens.label)) > 0.8) type = 'eeg1010'; There is only a fraction of 0.7093 in the labels that matches the 1010 set (which has 86 labels in them), i.e. 61/86=0.7093. Here it does not make sense to perform the selection like this. I will change the selection around, i.e. if 80% of your channels are in the 1010 set, it seems that eeg1010 is an appropriate label for the set, even though you only have 61 from the (predefined) 86. roboos@mentat001> svn commit Sending forward/ft_senstype.m Transmitting file data . Committed revision 9323. This should fix it. The test script now runs without error.
Robert Oostenveld - 2014-03-31 11:31:18 +0200
*** Bug 2499 has been marked as a duplicate of this bug. ***