[FieldTrip] Is it a bug for ft_spike* functions or something wrong with my data?

Jing Wang wljj09 at gmail.com
Mon May 21 13:44:17 CEST 2012

Dear Fieldtrip developers and users,

I have found same error when I using ft_spiketriggeredaverage and
After I run the following script, an error appeared at line 51
cfg=ft_checkconfig. This error also is same when I run
ft_spiketriggeredspectrum.m. But after I use comment to silent a part of
these functions. it could work well. It is same for both the latese and
20120420 version of Fieldtrip. I donnot know whether it is a bug or
something wrong with my data? Would anybody who knows can help me?
That will be really appreciated! Thanks in advance!

I have append spike and LFP into data. The folloing is the script and error
cfg.timwin = [-0.01 0.01];
cfg.spikechannel =data.label{1};
cfg.channel = data.label{2};
cfg.keeptrials ='yes';
[timelock] = ft_spiketriggeredaverage(cfg, data);*
*Error using ft_getopt
the first input should contain key-value pairs*
*Error in ft_checkconfig (line 83)
renamed         = ft_getopt(varargin, 'renamed');*
*Error in ft_spiketriggeredaverage (line 51)
cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ...*

 For ft_spikertriggerespectrum, I silent the line like this, the script can
work well.
*% cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ...
%                                        'outputfile');  % see **

For ft_spiketriggeredaverage, the script can work when I silent these part.
it can work well.
* % cfg.timwin       = ft_getopt(cfg, 'timwin',[-0.1 0.1]);
 % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []);
 % cfg.channel      = ft_getopt(cfg,'channel', 'all');
 % cfg.keeptrials   = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'});
 % cfg.feedback     = ft_checkopt(cfg,'feedback', 'yes');
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120521/e213dacf/attachment-0001.html>

More information about the fieldtrip mailing list