Back to the main page.

Bug 658 - Neuromag-306 data incompatible with ft_rejectvisual

Status CLOSED FIXED
Reported 2011-05-11 20:44:00 +0200
Modified 2011-05-23 10:36:07 +0200
Product: FieldTrip
Component: preproc
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 normal
Assigned to: Eelke Spaak
URL:
Tags:
Depends on:
Blocks:
See also:

Eliezer Kanal - 2011-05-11 20:44:36 +0200

Created attachment 48 bad scale in channel view Neuromag-306 data contains both magnetometers and gradiometers, each of which should be viewed on a unique scale. Personal experience has shown that to show both side-by-side the gradiometers should be scaled down by a factor of 10-20. As rejectvisual simply plots all channels next to each other, the gradiometer traces are completely out of proportion to the scale of the plot, making them unusable. (See attached images.) The way I've solved this is by including enabling two extra cfg parameters in ft_rejectvisual, "magscale" and "gradscale". I implemented them as follows: if ~isempty(cfg.magscale) scaled = 1; chansel = match_str(tmpdata.label, ft_channelselection('MEG*1', tmpdata.label)); for i=1:length(tmpdata.trial) tmpdata.trial{i}(chansel,:) = tmpdata.trial{i}(chansel,:) .* cfg.magscale; end end if ~isempty(cfg.gradscale) scaled = 1; chansel = match_str(tmpdata.label, ft_channelselection({'MEG*2','MEG*3'}, tmpdata.label)); for i=1:length(tmpdata.trial) tmpdata.trial{i}(chansel,:) = tmpdata.trial{i}(chansel,:) .* cfg.gradscale; end end This simply copies the other channel scaling techniques that start at line 230. I don't know whether this code would interfere with other types of systems, but I figured I'd submit it so you can examine/test it out.


Eliezer Kanal - 2011-05-11 20:45:10 +0200

Created attachment 49 bad channels in Trial view


Eliezer Kanal - 2011-05-13 20:10:11 +0200

Created attachment 52 bad data in time-frequency plot I just noticed today that this issue also affects ft_multiplotTFR, when using the `neuromag306all.lay` file. See attachment.


Eelke Spaak - 2011-05-17 11:23:44 +0200

I have just implemented two new channel selection options to ft_channelselection.m: MEGGRAD and MEGMAG, which should work on Neuromag-306 and Yokogawa systems. Thanks for your proposed fix for the scaling issue; I have changed it a bit to use this new channel selection and added it to ft_rejectvisual. I am not sure the ft_multiplotTFR bug is due to the same scaling issue as the one involved in ft_rejectvisual. I am setting this bug to resolved; I will look into the multiplotTFR thing with the Neuromag-306 test data we have here, and file a new bug if I can reproduce the issue. If I cannot reproduce it, I will get back to you.