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

Eelke Spaak eelke.spaak at donders.ru.nl
Mon May 21 13:57:10 CEST 2012


Dear Jing Wang,

This is a bug in the functions you mention. ft_checkconfig should be
called like this:

cfg = ft_checkconfig(cfg, 'forbidden', {'inputfile', 'outputfile'});

so with the forbidden options grouped in a cell array, rather than as
it was done in the code snippet you posted. There also seem to be a
few other minor bugs in the ft_getopt/checkopt calls.

Could you file a bug on this on our Bugzilla tracking system?
http://bugzilla.fcdonders.nl/ Thank you for reporting this!

Best,
Eelke

On 21 May 2012 13:44, Jing Wang <wljj09 at gmail.com> wrote:
> Dear Fieldtrip developers and users,
>
> I have found same error when I using ft_spiketriggeredaverage and
> ft_spiketriggeredspectrum.m.
> 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!
> Jing
>
> I have append spike and LFP into data. The folloing is the script and error
> information.
> cfg=[];
> cfg.timwin = [-0.01 0.01];
> cfg.spikechannel =data.label{1};
> cfg.channel = data.label{2};
> cfg.keeptrials ='yes';
> cfg.feedback='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
> http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056
>
> 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');
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list