[FieldTrip] Problems detecting Artifacts in Neuroscan CNT file
Omoniyi Segun
omoniyi_s at yahoo.com
Wed Oct 12 19:11:35 CEST 2011
Hi Jan-mathijs,
Did you get a chance to look at the problem described about neuroscan CNT file.
Thanks
Omoniyi Segun
________________________________
From: Omoniyi Segun <omoniyi_s at yahoo.com>
To: jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl>; Email discussion list for the FieldTrip project <fieldtrip at donders.ru.nl>
Sent: Wednesday, October 5, 2011 10:46 AM
Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file
Thanks for your response.
I am passing a 'subject' structure which contains the file location and file name to the do_reject_artifacts function which i wrote. Inside the function i have inserted the code I got from the tutorial.
The structure is created in a do_preprocess function, i read all the files in a directory structure and create the subject stucture in this function.
The files are Neuroscan .cnt files
Thanks for your help
Omoniyi Segun
snippet from : do_preprocess
clear subject;
if ( reply == 'Y' || reply == 'y')
%token = strtok(subjectdata.filename{i}, '.');
token = strtok(files(i).name, '.');
subject.datafile = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir filesep files(i).name];
subject.datafilename = token;
subject.datafiledir = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir];
subject.artifactdir = subjectdata.artifactdir;
snippet from : do_reject_artifacts
cfg.dataset = 'subject.datafile; % name of EEG dataset
cfg.trialdef.eventtype = 'trigger';
cfg.trialdef.prestim = 1;
cfg.trialdef.poststim = 2;
cfg.trialdef.eventvalue = [1 2];
cfg = ft_definetrial(cfg);
data= ft_preprocessing(cfg)
trl = cfg.trl;
%
jump
cfg = [];
cfg.trl = trl;
cfg.padding = 0;
cfg.datafile = subject.datafile;
cfg.headerfile = subject.datafile;
cfg.continuous = 'yes';
cfg.memory = 'low';
% channel selection, cutoff and padding
cfg.artfctdef.zvalue.channel = 'EEG';
cfg.artfctdef.zvalue.cutoff = 20;
cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding;
cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding;
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,data);
________________________________
From: jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl>
To: Omoniyi Segun <omoniyi_s at yahoo.com>; Email discussion list for the FieldTrip project <fieldtrip at donders.ru.nl>
Sent: Tuesday, October 4, 2011 8:15 AM
Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file
Hi Omoniyi,
What kind of data are you passing to the function?
BW,
JM
On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote:
Hi,
>
>
>I am new to fieldtrip and have been struggling with it for the past four weeks.
>
>
>
>I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes';
>I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data.
>
>
>Secondly when i click on stop I get the error pasted below.
>
>
>
>
>
>??? Reference to non-existent field 'dimord'.
>
>Error in ==> dimlength at 74
> elseif strcmp(data.(fld), 'rpt_pos')
>
>Error in ==> fixsampleinfo at 31
> ntrial = dimlength(data, 'rpt');
>
>Error in ==> ft_checkdata at 579
> data = fixsampleinfo(data);
>
>Error in ==> ft_rejectartifact at 203
> data = ft_checkdata(data, 'hassampleinfo', 'yes');
>
>Error in ==> do_reject_artifacts at 70
>data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump);
>
>Error in ==> do_preprocess at
45
> do_reject_artifacts(subject);
>
>
>I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data.
>
>
>Thanks
>
>
>Omoniyi Segun
>
>_______________________________________________
>fieldtrip mailing list
>fieldtrip at donders.ru.nl
>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
Jan-Mathijs Schoffelen, MD PhD
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111012/1d7eec6a/attachment-0002.html>
More information about the fieldtrip
mailing list