<div dir="ltr">Ya, it would definitely help if we could see your code, but I might have another idea.<div><br></div><div>When you say you have a fixation cross trigger, is this trigger being recorded from your EEG recording equipment in such a way that it can be represented as an event value in cfg.trialdef for ft_definetrial? If so, I think you may be right that it can't be changed through ft_redefinetrial (at least, as far as I can tell, no mention of this is made in the help section of the function). That being said, if you run ft_definetrial separately for both event values that should work. </div>
<div><br></div><div>That being said, I may still be slightly confused about what you mean when you say you want to change the trigger. Do you mean you want to create a new trigger for your data off-line? I think it may be possible to create custom triggers off-line through fieldtrip, but it's not something I've tried personally, but if that is what you are trying to do, I could look into it.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 27, 2014 at 2:44 PM, kousik sarathy <span dir="ltr"><<a href="mailto:sarathykousik@gmail.com" target="_blank">sarathykousik@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">Hey Katrin,<div><br></div><div>It seems to me that Max's suggestion would suffice. But you seem to be looking for something else. Could you elaborate a little bit as to what you need? </div>
<div class="gmail_extra">
<br clear="all"><div><div dir="ltr"><div><font color="#000000">--</font></div><div><font color="#000000">Regards,<br></font></div><div><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div style="text-align:left">
<font color="#000000">Kousik Sarathy, S</font></div></span></div><div style="text-align:left"><br></div></div></div><div><div class="h5">
<br><br><div class="gmail_quote">On Tue, May 27, 2014 at 8:30 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 Max, thanks a lot for your prompt answer. Unfortunately this is not what I am looking for (I found an example like this in the tutorial). I would like to change the trigger for one of the two conditions, let it be now the response of the subject, as this is where the stimulus actually starts... Defining two different timewindows is not enough... Can you also help me with that? Thanks a million! Katrin</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-27 18:58 GMT+02:00 Max Cantor <span dir="ltr"><<a href="mailto:mcantor@umich.edu" target="_blank">mcantor@umich.edu</a>></span>:<div><div>
<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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"><div><div>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>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><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></div></div>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">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><span><font color="#888888"><br></font></span></blockquote></div>
<span><font color="#888888"><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>
</font></span></div></div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">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></div></div><br></div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">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></div></div></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>