<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Dear EEGLab users,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I have a problem in the scripting of a pipeline for semi-automated epoch rejection.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The step I would like to accomplish are:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">1) Importing the dataset</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">2) Performing epoch rejection based on amplitude</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">3) Performing epoch rejection based on linear trends</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">4) Review the epochs visually</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">5) Confirm rejection</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">My attempt is the following:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
<p class="gmail-p1"><span class="gmail-s1">for</span> i = 1:length(filenames)</p>
<p class="gmail-p3"><span class="gmail-s2"> </span>% Import EEG data</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space"> </span>dataset_name = filenames_epochs{i};</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space"> </span>EEG = pop_loadset(<span class="gmail-s3">'filename'</span>, dataset_name, <span class="gmail-s3">'filepath'</span>, dirpath);</p>
<p class="gmail-p3"><span class="gmail-s2"> </span>% Reject on amplitude threshold</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space"> </span>EEG = pop_eegthresh(EEG, 1, [1:32], -100, 100, 0, 2.0391, 1, 0);</p><p class="gmail-p1"> % Reject trends</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space"> </span>EEG = pop_rejtrend(EEG, 1, [1:32], 262, 0.5, 0.3, 1, 0, 0);</p><p class="gmail-p1"> % Review visually the marked epochs and confirm rejection</p><p class="gmail-p1"> ???????????????????????????????????</p>
<p class="gmail-p2"><span class="gmail-s2"> </span>% Store the dataset</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space"> </span>[ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG);</p><p class="gmail-p1">end</p><p class="gmail-p1">I know how to achieve this by GUI but, as you can see, I fail to understand how to review the marked epochs visually within the script.</p><p class="gmail-p1">Thank you for the help,</p><p class="gmail-p1">Antonio</p></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span style="font-family:arial,helvetica,sans-serif">Antonio Maffei, Ph.D. Student<br></span></div><div dir="ltr"><span style="font-family:arial,helvetica,sans-serif"><br>Department of General Psychology (DPG)<br>University of Padova<br>Via Venezia 8 - 35131 <br>Padova, Italy<br><br>email: <a href="mailto:antonio.maffei@phd.unipd.it" target="_blank">antonio.maffei@phd.unipd.it</a><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">office: 049 8277424</span></div></div></div></div></div></div></div></div></div></div>
</div>