<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; } @font-face { font-family: "Cambria Math"; } @font-face { font-family: Calibri; } p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif; } a:link, span.MsoHyperlink { color: rgb(5, 99, 193); text-decoration: underline; } a:visited, span.MsoHyperlinkFollowed { color: rgb(149, 79, 114); text-decoration: underline; } p.msonormal0, li.msonormal0, div.msonormal0 { margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif; } span.E-MailFormatvorlage19 { font-family: Calibri, sans-serif; color: rgb(31, 73, 125); } .MsoChpDefault { font-size: 10pt; } @page WordSection1 { margin: 70.85pt 70.85pt 2cm; } div.WordSection1 { }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Dear Christine,<br>
</p>
<p><br>
</p>
<p>thank you for your quick response!<br>
</p>
<p>In my example <em>data_cue</em> is epoched and pre-processed.<br>
</p>
<p><br>
</p>
<p>Nevertheless, I think the approach you suggested might work also in my case. I also downsample, re-reference and filter the continuous data. After these first steps, I epoch the cue-locked dataset. After epoching, I perform artifact rejection and ICA.<br>
</p>
<p><br>
</p>
<p>I guess I can apply your approach to my data by running this exact same pipeline and saving the "cfg_artifactrejection" and my ICA components. Then I would go back to the filtered continuous data, epoch them target-locked and apply to this target-locked
 dataset the <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">"cfg_artifactrejection</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">"</span>​
 saved before and removing the same ICA components selected before.<br>
</p>
<p><br>
</p>
<p>Do you think this would be an acceptable approach?<br>
</p>
<p>Thanks a lot!<br>
</p>
<p>Silvia<br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of Blume Christine <christine.blume@sbg.ac.at><br>
<b>Sent:</b> 26 November 2018 15:43<br>
<b>To:</b> fieldtrip@science.ru.nl<br>
<b>Subject:</b> Re: [FieldTrip] ft_redefinedata after pre-processing</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Dear Silvia,</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Do I understand correctly that
<i>data_cue</i> is epoched, but not pre-processed?</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">You can apply ft_rejectartifact after ft_redefinetrial. We usually pre-process continuous datasets and save the cfg of this pre-processing (in
 the example below cfg_myartifactrejection). Only then we epoch the data and apply this artifactrejection.</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">cfg=[];</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">cfg.trl=trl;                            # trl contains the trial definition of target-locked epochs</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">data_target = ft_redefinetrial (cfg, data_cue)</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">cfg = [];</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">data_target_clean = ft_rejectartifact(cfg_myartifactrejection, data_target);</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">I hope this helps…</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Best,</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Christine</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="DE" style="font-size:11.0pt; font-family:"Calibri",sans-serif">Von:</span></b><span lang="DE" style="font-size:11.0pt; font-family:"Calibri",sans-serif"> fieldtrip <fieldtrip-bounces@science.ru.nl>
<b>Im Auftrag von </b>Silvia Formica<br>
<b>Gesendet:</b> Montag, 26. November 2018 14:19<br>
<b>An:</b> fieldtrip@science.ru.nl<br>
<b>Betreff:</b> [FieldTrip] ft_redefinedata after pre-processing</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<p><span style="font-family:"Calibri",sans-serif; color:black">​Dear all,</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">I'm in need of suggestions on the correct analyses strategy for my data.</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">I have an experiment with a cue followed (after ~2 seconds) by a target.</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">I epoched the data cue-locked and pre-processed my dataset. In my preprocessing I'm downsampling, re-referencing, rejecting some trials, running ICA, etc etc.</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">My problem is that I would want to also epoch my data target-locked, but I want to do it after pre-processing the cue-locked dataset. This is because I want to exclude the same trials and apply
 exactly the same corrections to the two different datasets.</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">I tried to use the function ft_redefinetrial, creating the new probe-locked trial definition and applying it to the cue-locked dataset.</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">cfg=[];</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">cfg.trl=trl;                            # trl contains the trial definition of target-locked epochs</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">data_target = ft_redefinetrial (cfg, data_cue)</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">But I do not obtain what I wished for, because I get a data_target dataset that doesn't account for the trial rejection I performed while pre-processing the cue-locked dataset.</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">So my questions are:</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">1) is it possible to achieve my goal?</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">2) If yes, what is the right strategy to do it?</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">Thanks for any input and suggestion!</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">Best,</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">Silvia</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
</div>
</div>
</div>
</body>
</html>