<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Matt,<div><br></div><div>Yes, it's possible. The only thing you should change in your approach is step 3: use ft_redefinetrial, rather than ft_preprocessing</div><div><br></div><div>So:</div><div><br></div><div><div bgcolor="#FFFFFF" text="#000000">1. Preprocessing step on continuous data with filtering.<br><i>cfg=[];</i><i><br></i><i>cfg.dataset  = 'raw_data.fif';</i><i><br></i><i>cfg.bpfilter  = 'yes';</i><i><br></i><i>cfg.bpfreq    = [a b];</i><i><br></i><i>data = ft_preprocessing(cfg);</i><br><br>2. Define trial.<br><i><br></i></div><div bgcolor="#FFFFFF" text="#000000"><i>cfg = [];</i></div><div bgcolor="#FFFFFF" text="#000000"><i>cfg.dataset = 'blabla';</i></div><div bgcolor="#FFFFFF" text="#000000"><i>cfg.trialdef.xxx etc some settings here.</i></div><div bgcolor="#FFFFFF" text="#000000"><i>cfg   =</i><i>  ft_definetrial(cfg);</i><br>  </div><div bgcolor="#FFFFFF" text="#000000">trl = cfg.trl;</div><div bgcolor="#FFFFFF" text="#000000"><br>3. Preprocessing step for epoching data on filtered data.<br><i><br></i></div><div bgcolor="#FFFFFF" text="#000000"><i>cfg = [];</i></div><div bgcolor="#FFFFFF" text="#000000"><i>cfg.trl = trl;</i></div><div bgcolor="#FFFFFF" text="#000000"><i>final_data = ft_redefinetrial(cfg,data);</i><br><br></div></div><div><br></div><div>Best,</div><div>JM</div><div><br><div><div>On Dec 9, 2013, at 6:31 PM, Matthieu Rolland wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi everybody,<br>
    <br>
    Is it possible to filter data prior to epoching? And more generally
    is it possible to epoch data that has already been preprocessed?<br>
    <br>
    I have tried without success many variations of this:<br>
    <br>
    1. Preprocessing step on continuous data with filtering.<br>
    <i>cfg=[];</i><i><br>
    </i><i>cfg.dataset  = 'raw_data.fif';</i><i><br>
    </i><i>cfg.bpfilter  = 'yes';</i><i><br>
    </i><i>cfg.bpfreq    = [a b];</i><i><br>
    </i><i>data = ft_preprocessing(cfg);</i><br>
    <br>
    2. Define trial.<br>
    <i>cfg   =</i><i>  ft_definetrial(cfg);</i><br>
      <br>
    3. Preprocessing step for epoching data on filtered data.<br>
    <i>final_data = ft_preprocessing(cfg,data);</i><br>
    <br>
    <br>
    Thank you for your help.<br>
    Matt<br>
    <br>
  </div>

_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div><div><br></div><div><a href="http://www.hettaligebrein.nl">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></body></html>