<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Gerome,
<div class=""><br class="">
</div>
<div class="">Have a look at ft_apply_montage (<a href="http://fieldtrip.fcdonders.nl/reference/ft_apply_montage" class="">http://fieldtrip.fcdonders.nl/reference/ft_apply_montage</a>), I think it will do what you want.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class=""><br class="">
</div>
<div class="">Jim<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 13 Nov 2014, at 19:09, Gerome Manson <<a href="mailto:gerome.manson@utoronto.ca" class="">gerome.manson@utoronto.ca</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
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 <span style="font-family: arial, sans-serif; font-size: 13px;" class="">tzvetan</span> these
 changes did the trick. 
<div class=""><br class="">
</div>
<div class="">I do have one more question though that I couldn't quite find enough information on: </div>
<div class=""><br class="">
</div>
<div class="">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). </div>
<div class=""><br class="">
</div>
<div class="">Thanks again,</div>
<div class="">Gerome</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
<div class="gmail_extra" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<br class="">
<div class="gmail_quote">2014-11-13 16:44 GMT+01:00 Andreas Widmann<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:widmann@uni-leipzig.de" target="_blank" class="">widmann@uni-leipzig.de</a>></span>:<br class="">
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">
Hi,<br class="">
<br class="">
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:<br class="">
<a href="http://www.ncbi.nlm.nih.gov/pubmed/25128257" target="_blank" class="">http://www.ncbi.nlm.nih.gov/pubmed/25128257</a><br class="">
<br class="">
Hope this helps,<br class="">
Andreas<br class="">
<br class="">
> Am 13.11.2014 um 10:07 schrieb Gerome Manson <<a href="mailto:gerome.manson@utoronto.ca" class="">gerome.manson@utoronto.ca</a>>:<br class="">
<div class="HOEnZb">
<div class="h5">><br class="">
> Hello All,<br class="">
><br class="">
> 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 :-)<br class="">
><br class="">
><br class="">
> Thanks alot,<br class="">
> Gerome<br class="">
><br class="">
> Here is the brain vision sequence I am trying to replicate<br class="">
>   - Read in Data<br class="">
>  - Reference to mastiod<br class="">
>  - 100Hz Band rejection filter - bandwidth 8, slope 2<br class="">
>  - High cuttoff (low pass filter at 45Hz with a slope of 24dB/oct)<br class="">
>  - Low cuttoff (high pass filter at 0.53Hz, time constant 0.3002923, 24db/ oct)<br class="">
>  - Notch Filter at 50Hz<br class="">
>  - Segmentation<br class="">
>  - Baseline Correction -200 ms to - 5 ms<br class="">
>  - Averaging segments<br class="">
><br class="">
><br class="">
><br class="">
> Here is my Field trip code:<br class="">
><br class="">
> %rereference all trials<br class="">
> cfg.reref = 'yes';<br class="">
> cfg.continuous = 'yes';<br class="">
><br class="">
> % reference what channels<br class="">
> cfg.channel = 'all';<br class="">
> %choose the reference channel<br class="">
> cfg.refchannel = {'EXG1' 'EXG2'};<br class="">
><br class="">
> % cfg.dataset = 'CVP1S1.bdf';<br class="">
> cfg.continuous = 'yes';<br class="">
> %<br class="">
><br class="">
> %bandfilter<br class="">
> cfg.bsfilter = 'yes';<br class="">
> cfg.bsfiltord = 2;<br class="">
> % cfg.bsfiltdir = 'onepass-zerophase';<br class="">
> cfg.bsfreq = [92 108];<br class="">
><br class="">
><br class="">
> %<br class="">
> %DFT<br class="">
> cfg.dftfilter = 'yes';<br class="">
><br class="">
> % IIR Filters<br class="">
> cfg.lpfilter = 'yes';<br class="">
> cfg.lpfilttype  = 'but';<br class="">
> % cfg.lpfiltdir = 'onepass-zerophase';<br class="">
> cfg.lpfreq  = 45;<br class="">
><br class="">
> cfg.hpfilter = 'yes';<br class="">
> cfg.hpfilttype  = 'but';<br class="">
> % cfg.hpfiltdir = 'onepass-zerophase';<br class="">
> cfg.hpfreq  = 0.53;<br class="">
><br class="">
> data = ft_preprocessing(cfg);<br class="">
><br class="">
><br class="">
> % Define Trial<br class="">
> cfg = [];<br class="">
> cfg.trialdef.eventtype  = 'STATUS';<br class="">
> cfg.dataset = eeg_file;<br class="">
> cfg.trialdef.eventvalue = 65522;<br class="">
> cfg.trialdef.prestim    = 0.2;<br class="">
> cfg.trialdef.poststim   = 0.3;<br class="">
> cfg = ft_definetrial(cfg);<br class="">
><br class="">
> data_vep = ft_redefinetrial(cfg, data);<br class="">
><br class="">
> % Baseline Correction<br class="">
> cfg = [];<br class="">
> cfg.demean = 'yes';<br class="">
> cfg.baselinewindow = [-0.2 -0.05];<br class="">
> data_vep = ft_preprocessing(cfg, data_vep);<br class="">
><br class="">
> %Averaging<br class="">
> cfg=[];<br class="">
> avg_data = ft_timelockanalysis(cfg, data_vep);<br class="">
><br class="">
><br class="">
> cfg.ylim = [-10 10];<br class="">
> cfg.channel = 'O1';<br class="">
><br class="">
> ft_singleplotER(cfg,avg_data);<br class="">
><br class="">
> --<br class="">
> _____________________<br class="">
> Gerome Manson PhD Student<br class="">
> Laboratoire de Neuroscience Cognitives- Aix Marseille Université<br class="">
> Perceptual Motor Behavior lab- University of Toronto<br class="">
><span class="Apple-converted-space"> </span><a href="mailto:gerome.manson@utoronto.ca" class="">gerome.manson@utoronto.ca</a><br class="">
><span class="Apple-converted-space"> </span><a href="mailto:gerome.manson@univ-amu.fr" class="">gerome.manson@univ-amu.fr</a><br class="">
><span class="Apple-converted-space"> </span><a href="tel:416-978-6109" value="+14169786109" class="">416-978-6109</a><br class="">
><br class="">
</div>
</div>
<div class="HOEnZb">
<div class="h5">> _______________________________________________<br class="">
> fieldtrip mailing list<br class="">
><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
><span class="Apple-converted-space"> </span><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<br clear="all" class="">
<div class=""><br class="">
</div>
--<span class="Apple-converted-space"> </span><br class="">
<div class="gmail_signature">
<div dir="ltr" class="">_____________________
<div class="">Gerome Manson PhD Student</div>
<div class="">Laboratoire de Neuroscience Cognitives- Aix Marseille Université<br class="">
Perceptual Motor Behavior lab- University of Toronto</div>
<div class=""><a href="mailto:gerome.manson@utoronto.ca" target="_blank" class="">gerome.manson@utoronto.ca</a><br class="">
</div>
<div class=""><a href="mailto:gerome.manson@univ-amu.fr" target="_blank" class="">gerome.manson@univ-amu.fr</a><br class="">
</div>
<div class="">416-978-6109</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">fieldtrip
 mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="mailto:fieldtrip@donders.ru.nl" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">fieldtrip@donders.ru.nl</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>