Back to the main page.

Bug 2702 - Too many different types in ft_chantype

Status NEW
Reported 2014-09-24 14:42:00 +0200
Modified 2014-09-24 15:48:26 +0200
Product: FieldTrip
Component: fileio
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Vladimir Litvak - 2014-09-24 14:42:47 +0200

I encountered a problem in SPM that comes down to the fact that for BTI-4D data the reference sensors have the type 'megref' (see line 329 of ft_chantype) which is not recognised by SPM and also not by ft_chanunit. Since we already have: megmag meggrad megplanar refplanar refgrad refmag I suggest all MEG channels should be assigned one of those.


Robert Oostenveld - 2014-09-24 15:16:57 +0200

megref is indeed not clear, since it does not specify which type of channel it is (only that it is used as reference). I would expect besides ft_chantype that bti2grad and ft_senstype would be involved... mac011> grep \'megref\' *.m mac011> grep \'megref\' */*.m fileio/ft_chantype.m: type(configtype==3) = {'megref'}; fileio/ft_chantype.m: type(sel) = {'megref'}; fileio/ft_chantype.m: type(sel) = {'megref'}; fileio/ft_chantype.m: type(sel) = {'megref'}; plotting/ft_plot_sens.m:% 'chantype' = string or cell-array with strings, for example {'meg', 'megref'} (default = 'all') mac011> grep \'megref\' */*/*.m So bti2grad and ft_senstype and not involved. I'll fix the plotting help immediately mac011> svn commit plotting/ft_plot_sens.m Sending plotting/ft_plot_sens.m Transmitting file data . Committed revision 9831. Looking at bti2grad, I see the comment % selMEG = chan_no(type==1); % these are the Axxx channels % selEEG = chan_no(type==2); % these are the Exx channels and might also include ExG % selREF = chan_no(type==3); % these include MLzA, MCzaA, GyyA % selAUX = chan_no(type==4); % these are the Xx channels % selTRG = chan_no(type==5); % these include TRIGGER, RESPONSE % selUA = chan_no(type==6); % these are the UAx and UACurrent channels % selUnknown = chan_no(type==7); % selUnknown = chan_no(type==8); % these include SA1, SA2, SA3 From this it is not clear whether it is reflag or ref grad. It actually might be both. </p>

Robert Oostenveld - 2014-09-24 15:17:45 +0200

(In reply to Robert Oostenveld from comment #1) stupid autocorrect: "reflag or ref grad" should be "refmag of refgrad"


Vladimir Litvak - 2014-09-24 15:23:19 +0200

(In reply to Robert Oostenveld from comment #2) Just calling it 'ref' would also work for us, provided that you also fix ft_chanunit to say that the units of this 'ref' are T.


Robert Oostenveld - 2014-09-24 15:27:14 +0200

(In reply to Vladimir Litvak from comment #3) Can you check that the units for the REF gratiometers is in T and not in T/m?


Vladimir Litvak - 2014-09-24 15:30:28 +0200

(In reply to Robert Oostenveld from comment #4) I don't have any more info on that than you. In the current ft_chanunit (line 169) it says: chanunit(strcmp('refmag', input.chantype)) = {'T'}; chanunit(strcmp('refgrad', input.chantype)) = {'T'}; So in either case the units should be 'T' You can just add there: chanunit(strcmp('ref', input.chantype)) = {'T'};


Robert Oostenveld - 2014-09-24 15:32:26 +0200

could you do it yourself? I have other priorities at the moment.


Vladimir Litvak - 2014-09-24 15:33:59 +0200

(In reply to Vladimir Litvak from comment #5) No problem if you agree to this way of fixing it.


Robert Oostenveld - 2014-09-24 15:48:26 +0200

(In reply to Vladimir Litvak from comment #7) sounds fine to me