Do I need ECG channel to run "artifact_ecg"
Jim Li
megjim1 at GMAIL.COM
Thu Apr 23 18:10:22 CEST 2009
Dear Jan-Mathijs,
I continued ICA cardiac-removal processing using the example codes in
Fieldtrip website. But I encountered this problem:
----------
cfg = [];
cfg.method = 'mtmfft';
cfg.output = 'fourier';
cfg.foilim = [0 100];
cfg.taper = 'hanning';
cfg.pad = 'maxperlen';
freq = freqanalysis(cfg, comp_ecg);
the input is component data with 248 components and 248 original channels
??? Error using ==> checkdata at 377
This function requires raw data as input.
Error in ==> freqanalysis at 165
data = checkdata(data, 'datatype', 'raw', 'feedback', 'yes', 'hasoffset', 'yes');
-----------------
How to deal w/ it?
Thanks,
Jim
On Thu, 23 Apr 2009 09:00:44 +0100, jan-mathijs schoffelen
<j.schoffelen at PSY.GLA.AC.UK> wrote:
>Dear Jim,
>
>The reason for your crash is probably related to the fact that the
>default settings for artifact_ecg have been defined with a ctf-system
>in mind. Artifact_ecg will provide some feedback as to how the QRS-
>complex-locked MEG signals look, by picking a subset of channels as
>defined by cfg.artfctdef.ecg.inspect. By default this is set to all
>channels named 'MLTxx'. Since in your megsystem the sensors are named
>'Axx', fieldtrip cannot make sense out of the default and crashes.
>Just specify your own (subset of) channel(s) to inspect.
>
>Good luck
>
>Jan-Mathijs
>
>
>
>On Apr 22, 2009, at 5:23 PM, Jim Li wrote:
>
>> Dear all,
>>
>>
>> W/ a 041809 Fieldtrip, I tried to run the following lines but got
>> some error (see
>> below). I don't have ECG channel in my data, that's why I use a
>> left-most
>> MEG channel w/ apparent cardiac interferences instead. Any
>> suggestion how
>> to fix the problem?
>>
>> -------------
>> cfg = [];
>> cfg.trl = data.cfg.previous.trl;
>> cfg.dataset = data.cfg.previous.dataset;
>> cfg.continuous = 'yes' ;
>> cfg.artfctdef.ecg.channel = 'A229';
>> cfg.artfctdef.ecg.pretim = 0.25;
>> cfg.artfctdef.ecg.psttim = 0.5;
>> cfg.artfctdef.ecg.method = 'zvalue'; %peak-detection method
>> cfg.artfctdef.ecg.cutoff = 3; %peak-threshold
>> [cfg, artifact] = artifact_ecg(cfg);
>>
>> current zvalue threshold = 3.000
>> keep the current value (y/n) ?
>> y
>> ??? Undefined function or variable "labelmlt".
>>
>> Error in ==> channelselection at 344
>> if findmlt, channel = [channel; labelmlt]; end
>>
>> Error in ==> artifact_ecg at 238
>> sgn = channelselection(artfctdef.inspect, hdr.label);
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users
>> of the FieldTrip toolbox, to share experiences and to discuss new
>> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/
>> archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the
FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and
EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and
http://www.ru.nl/neuroimaging/fieldtrip.
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
More information about the fieldtrip
mailing list