<div dir="ltr">Hi Katrin,<div><br></div><div>It may help to see your code, but hopefully this will help. It should be as simple as taking your epoched data from ft_definetrial and ft_preprocessing, then creating two configurations for your timewindows and running ft_redefinetrial.</div>
<div><br></div><div>For example (from the fieldtrip tutorial, slightly simplified by me for explanatory purposes):</div><div><br></div><div>***</div><div><br></div><div><div>% find the interesting segments of data</div><div>
<br></div><div>cfg = []; % empty configuration</div><div>cfg.dataset = 'Subject01.ds'; % name of CTF dataset </div>
<div>cfg.trialdef.eventtype = 'backpanel trigger';</div><div>cfg.trialdef.prestim = 1;</div><div>cfg.trialdef.poststim = 2;</div><div>cfg.trialdef.eventvalue = 3; % event value of FIC</div>
<div>cfg = ft_definetrial(cfg); </div><div> </div><div>% preprocess the data</div><div><br></div><div>cfg.channel = {'MEG'}; </div><div>dataFIC = ft_preprocessing(cfg);<br>
</div><div><br></div><div>% define time window</div><div><br></div><div>cfg = []; </div><div>cfg.toilim = [-0.5 0]; </div>
<div>dataPre = ft_redefinetrial(cfg, dataFIC);</div><div> </div><div>cfg.toilim = [0.8 1.3]; </div><div>dataPost = ft_redefinetrial(cfg, dataFIC);</div>
</div><div><br></div><div>***</div><div><br></div><div>So if your code resembles this, you are defining in cfg.trialdef.prestim and cfg.trialdef.poststim a timewindow that encompasses both your baseline period and stimulus period, then for cfg.toilim in the ft_redefinetrial section you are setting one to your baseline period and the other to your stimulus period, and outputting them into separate variables.</div>
<div><br></div><div>Hopefully this helps. Also, if you haven't done so already, I would strongly recommend you run through the tutorial, as it may help answer questions like this in the future (assuming I've properly identified the issue).</div>
<div><br></div><div>Good luck,</div><div><br></div><div>Max</div><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 27, 2014 at 12:10 PM, KatrinH Heimann <span dir="ltr"><<a href="mailto:katrinheimann@gmail.com" target="_blank">katrinheimann@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear all,<div><br></div><div>my name is Katrin Heimann, I am phd student at the University of Parma. New to Fieldtrip.</div>
<div>I am doing an EEG analysis, still in the preprocessing phase. </div>
<div>It is a within trials design. I would like to compare a baseline period with an experimental condition (visual stimulus).</div><div><br></div><div> I have a trigger after a fixation cross, then a baseline period (approx 1 sec) , then the period of my stimulus (1 sec- starting with a bottom press (trigger)).</div>
<div><br></div><div> As I would like to apply the same baseline correction for both (the fixationcross period) I planned to first define my trials as long trials including the timewindows of baseline and the stimulus period, applying filter and baselinecorrection on those long pieces. However, as I do not wanna do the artifact detection on the whole pieces (but seperately for baseline and stimulus, to avoid that I have to throw away too many trials) I would like to redefine my trials then, cutting out only baseline period and only stimulus period (starting with another trigger (triggervalue=resp).. </div>
<div><br></div><div><b>Unfortunately I do not understand how I can change the trigger used with ft redefine trial. </b></div><div><br></div><div>Anybody who could give me an example how that is done?</div>
<div>Thanks a million</div><div>Katrin</div></div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">
Max Cantor<div>Research Assistant</div><div>Computational Neurolinguistics Lab</div><div>University of Michigan</div></div>
</div></div>