[FieldTrip] Redoing Brain Vision Analyzer in Field Trip

Gerome Manson gerome.manson at utoronto.ca
Thu Nov 13 10:07:21 CET 2014


Hello All,

I would like some help to  replicate an analysis done in brain vision
analyzer in field trip. Here is the details of the analysis in brain
vision. I have done most of the code but I get almost completely different
results which is puzziling. Maybe some of the filteres are not defined
properly- so if anyone has some time I would appreciate the help :-)


Thanks alot,
Gerome

Here is the brain vision sequence I am trying to replicate
  - Read in Data
 - Reference to mastiod
 - 100Hz Band rejection filter - bandwidth 8, slope 2
 - High cuttoff (low pass filter at 45Hz with a slope of 24dB/oct)
 - Low cuttoff (high pass filter at 0.53Hz, time constant 0.3002923, 24db/
oct)
 - Notch Filter at 50Hz
 - Segmentation
 - Baseline Correction -200 ms to - 5 ms
 - Averaging segments



Here is my Field trip code:

%rereference all trials
cfg.reref = 'yes';
cfg.continuous = 'yes';

% reference what channels
cfg.channel = 'all';
%choose the reference channel
cfg.refchannel = {'EXG1' 'EXG2'};

% cfg.dataset = 'CVP1S1.bdf';
cfg.continuous = 'yes';
%

%bandfilter
cfg.bsfilter = 'yes';
cfg.bsfiltord = 2;
% cfg.bsfiltdir = 'onepass-zerophase';
cfg.bsfreq = [92 108];


%
%DFT
cfg.dftfilter = 'yes';

% IIR Filters
cfg.lpfilter = 'yes';
cfg.lpfilttype  = 'but';
% cfg.lpfiltdir = 'onepass-zerophase';
cfg.lpfreq  = 45;

cfg.hpfilter = 'yes';
cfg.hpfilttype  = 'but';
% cfg.hpfiltdir = 'onepass-zerophase';
cfg.hpfreq  = 0.53;

data = ft_preprocessing(cfg);


% Define Trial
cfg = [];
cfg.trialdef.eventtype  = 'STATUS';
cfg.dataset = eeg_file;
cfg.trialdef.eventvalue = 65522;
cfg.trialdef.prestim    = 0.2;
cfg.trialdef.poststim   = 0.3;
cfg = ft_definetrial(cfg);

data_vep = ft_redefinetrial(cfg, data);

% Baseline Correction
cfg = [];
cfg.demean = 'yes';
cfg.baselinewindow = [-0.2 -0.05];
data_vep = ft_preprocessing(cfg, data_vep);

%Averaging
cfg=[];
avg_data = ft_timelockanalysis(cfg, data_vep);


cfg.ylim = [-10 10];
cfg.channel = 'O1';

ft_singleplotER(cfg,avg_data);

-- 
_____________________
Gerome Manson PhD Student
Laboratoire de Neuroscience Cognitives- Aix Marseille Université
Perceptual Motor Behavior lab- University of Toronto
gerome.manson at utoronto.ca
gerome.manson at univ-amu.fr
416-978-6109
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141113/e05626ec/attachment-0001.html>


More information about the fieldtrip mailing list