[FieldTrip] Redoing Brain Vision Analyzer in Field Trip

Gerome Manson gerome.manson at utoronto.ca
Thu Nov 13 19:09:41 CET 2014


Thank you for your help everyone, the solution was fairly simple (although
the datasets still don't quite match up) I adjusted the baseline window and
also the filters as stated in the answers by Andreas, and Jim, and changed
the reference -as stated by tzvetan these changes did the trick.

I do have one more question though that I couldn't quite find enough
information on:

Is it possible to create and eletrode pool (for instance a new channel that
is the average of some channels (eg: PO3, O1 and PO7) and have it added as
a new channel (in a similar way that we can create new channels for eog).

Thanks again,
Gerome




2014-11-13 16:44 GMT+01:00 Andreas Widmann <widmann at uni-leipzig.de>:

> Hi,
>
> besides the already mentioned differences, you cannot easily replicate the
> Brainvision Analyzer Butterworth filters with Fieldtrip. The Analyzer
> internally adjusts filter order *and* cutoff frequency to compensate for
> two-pass filtering. The (onepass) filter order actually applied by Analyzer
> is half the requested order. You can correspondingly reduce filter order in
> Fieldtrip to replicate this behavior. The (onepass) filter cutoff frequency
> actually applied by Analyzer is undocumented. It is adjusted so that the
> requested cutoff has -3dB attenuation after *twopass* filtering. You can
> measure the -6dB cutoff (applicable in Fieldtrip) by feeding an impulse
> into Analyzer and checking the frequency response. This problem is
> discussed here in more detail:
> http://www.ncbi.nlm.nih.gov/pubmed/25128257
>
> Hope this helps,
> Andreas
>
> > Am 13.11.2014 um 10:07 schrieb Gerome Manson <gerome.manson at utoronto.ca
> >:
> >
> > 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
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>


-- 
_____________________
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/18c601c5/attachment.html>


More information about the fieldtrip mailing list