[FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline'

Vitória Piai v.piai.research at gmail.com
Mon Mar 9 04:58:41 CET 2015


Hi all,

I'm interested in using Laplacian transformation prior to computing TFRs.
I still haven't read anything about the three methods implemented in 
FieldTrip, I must confess, but I think my question is independent of 
that. I'm using FT version: fieldtrip-20140801 on Matlab2014a.

If I use the method 'spline', I can subsequently run ft_freqanalysis (or 
ft_timelockanalysis for that matter). However, with either 'hjorth' or 
'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis:
My cfg:

   cfgn.method       = 'template';
   cfgn.layout       = 'biosemi64.lay';
   cfg.neighbours      = ft_prepare_neighbours(cfgn, dat);

   cfg.method = 'hjorth'; %'finite', 'spline'
   cfg.elec            = ft_read_sens('standard_1005.elc');
   lpc = ft_scalpcurrentdensity(cfg, dat);
% Then after that, a commonly used cfg for ft_freqanalysis

Error using ft_datatype_sens (line 375)
inconsistent number of channels in sensor description

Error in ft_datatype_raw (line 138)
       data.elec = ft_datatype_sens(data.elec);

Error in ft_checkdata (line 219)
   data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo);

Error in ft_freqanalysis (line 211)
data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 
'feedback', cfg.feedback, 'hassampleinfo', 'yes');

I understand that the "inconsistent number of channels in sensor 
description" is coming from these two other implementations, but should 
that be the case? The help on ft_scalpcurrentdensity says " The output 
data has the same format as the input and can be used in combination 
with most other FieldTrip functions". So I'm wondering whether there's 
something special intrinsic to these implementations, I'm using a too 
old FT version, my config isn't right, or this is an issue that has gone 
unnoticed because those implementations are not used often.

Thanks a lot!
Cheers from Berkeley,
Vitoria






More information about the fieldtrip mailing list