[FieldTrip] "not enough input" probelm in ft_artifact_zvalue tutorial code
Andrew Chang
changa5 at mcmaster.ca
Mon Mar 7 23:28:04 CET 2016
Dear all,
Sorry for asking another naive question.
I am following the tutorial code of this:
http://www.fieldtriptoolbox.org/tutorial/automatic_artifact_rejection
I used the ArtifactMEG.ds data, which is used in tutorial, and used the
exact same code. However, I am unable to run the ft_artifact_zvalue
function. I am running this code on MATLAB2015b with fieldtrip
version 20160304. I got the same problem even I changed the MATLAB version
into 2013a.
I am really confused since I am running the exact same code as tutorial,
but I got many warnings and MATLAB returned error too.
Here is the script:
cfg = [];
cfg.dataset = 'ArtifactMEG.ds';
cfg.headerformat = 'ctf_ds';
cfg.dataformat = 'ctf_ds';
cfg.trialdef.eventtype = 'trial';
cfg = ft_definetrial(cfg);
trl = cfg.trl(1:50,:);
%% jump
cfg = [];
cfg.trl = trl;
cfg.datafile = 'ArtifactMEG.ds';
cfg.headerfile = 'ArtifactMEG.ds';
cfg.continuous = 'yes';
% channel selection, cutoff and padding
cfg.artfctdef.zvalue.channel = 'MEG';
cfg.artfctdef.zvalue.cutoff = 20;
cfg.artfctdef.zvalue.trlpadding = 0;
cfg.artfctdef.zvalue.artpadding = 0;
cfg.artfctdef.zvalue.fltpadding = 0;
% algorithmic parameters
cfg.artfctdef.zvalue.cumulative = 'yes';
cfg.artfctdef.zvalue.medianfilter = 'yes';
cfg.artfctdef.zvalue.medianfiltord = 9;
cfg.artfctdef.zvalue.absdiff = 'yes';
% make the process interactive
cfg.artfctdef.zvalue.interactive = 'yes';
[cfg, artifact_jump] = ft_artifact_zvalue(cfg);
Here are what MATLAB return to me:
Warning: no trialfun was specified, using ft_trialfun_general
> In ft_definetrial (line 138)
evaluating trialfunction 'ft_trialfun_general'
getRawCTFBalanceCoefs : Sensor Q11 appears in ds.res4.scrr, but not in
ds.res4.chanNames
Warning: cannot read balancing coefficients for G3BR
> In ft_read_header (line 569)
In ft_trialfun_general (line 78)
In ft_definetrial (line 177)
reading the events from 'ArtifactMEG.ds\ArtifactMEG.res4'
getRawCTFBalanceCoefs : Sensor Q11 appears in ds.res4.scrr, but not in
ds.res4.chanNames
Warning: cannot read balancing coefficients for G3BR
> In ft_read_header (line 569)
In ft_read_event (line 511)
In ft_trialfun_general (line 86)
In ft_definetrial (line 177)
found 76 events
created 76 trials
the call to "ft_definetrial" took 1 seconds
ans =
[]
getRawCTFBalanceCoefs : Sensor Q11 appears in ds.res4.scrr, but not in
ds.res4.chanNames
Warning: cannot read balancing coefficients for G3BR
> In ft_read_header (line 569)
In ft_artifact_zvalue (line 195)
searching for artifacts in 139 channels
searching in trial 50 from 50
Not enough input arguments.
Error in ft_artifact_zvalue (line 481)
opt.data = data;
Any comments are appreciated! Thank you all!
Best,
Andrew
--
Andrew Chang
Ph.D. Candidate
Auditory Development Lab
Department of Psychology, Neuroscience & Behaviour
McMaster University
http://changa5.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160307/2a76c898/attachment-0001.html>
More information about the fieldtrip
mailing list