<div dir="ltr"><div><div><div><div><div><div>Hello Elizabeth,<br><br></div>I have run into this issue before when using ERPLab. It seems that ERPLab removes the 'urevent' field that EEGLab checks for when merging. If you have overlapping event codes a possible work-around is to edit the codes before merging the files, as then binlister will be able to differentiate the two. For example, if you had two runs with two conditions you could change the event codes as such:<br></div>Original Code 1 2<br>Run 1 Code 101 102<br>Run 2 Code 201 202<br><br>I don't know of any easy way to do this from the GUI but it should be fairly simple to program a script for.<br></div><br></div>Best,<br></div>Don Bell-Souder<br></div>University of Colorado Boulder<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 31, 2016 at 3:46 PM, Elizabeth Spencer Norton <span dir="ltr"><<a href="mailto:enorton@northwestern.edu" target="_blank">enorton@northwestern.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" link="blue" vlink="purple" lang="EN-US">
<div class="m_4147061352522625975WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria">Hi Tarik,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria">Thanks for your suggestions.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria">Everything is the same with the two files except the length. I tried merging the data before running any Event List/Bin List procedures as part of ERPLab and that does work successfully,
even with unequal numbers of events per file. However, after generating ERPLab Event Lists, the appending does not work, and I get the same error that I posted originally. After running the Event List, there are a listed number of events in the EEGLab GUI
display. Everything else about the two files (sampling rate, etc.) is the same. It seems then that Event List is doing something to the urevent structure perhaps? I’m not really familiar with the idea of urevent.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria">My overall issue is that the two files (two runs) have the same event codes, but I want to later be able to bin the events by which run they were in so that I can create an ERP difference
wave. I could keep the two runs separate and then append them once they are averaged in ERPLab, but I figured that it would be easier to do artifact detection/rejection as one file rather than two.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria">Thanks for any additional ideas.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria">Elizabeth<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Cambria"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">Tarik S Bel-Bahar <<a href="mailto:tarikbelbahar@gmail.com" target="_blank">tarikbelbahar@gmail.com</a>><br>
<b>Reply-To: </b><<a href="mailto:tarikbelbahar@gmail.com" target="_blank">tarikbelbahar@gmail.com</a>><br>
<b>Date: </b>Thursday, October 27, 2016 at 2:22 PM<br>
<b>To: </b>Elizabeth Spencer Norton <<a href="mailto:enorton@northwestern.edu" target="_blank">enorton@northwestern.edu</a>><br>
<b>Cc: </b>"<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>" <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
<b>Subject: </b>Re: [Eeglablist] Merging two datasets with unequal numbers of events<u></u><u></u></span></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:#333399">Hi Elizabeth, some notes below that might help. this shouldn't be a problem, and if it's repeatable please consider reporting in eeglab bugzilla.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">The error of course suggests that one of your files does not have urevents, which I think are/should-be generated when a file is first loaded and saved in eeglab.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">I recommend making sure that you've done the following, which should lead you past this error.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">importing, epoching, and saving the two files the same way as much as possible, so there is nothing different between them except the number and type of epoch.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">both files should have a "number of epochs" in the eeglab gui<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">both files "should" have an urevents field (unless there were no events in the file used originally?-not sure about this, see online wiki on events and urevents)<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">both files should have an 3-dimensional EEG.data structure<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">both files should have the same-length epochs<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">both files should already be healthily saved and re-openable in eeglab as .set files, prior to attempt at merging<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">both files are actively in memory as Datasets 1 and 2 (or however many datasets you're merfing.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">Other than this, first two a successful mergeset and review the command that was run using eegh. Try it on two files that are copy of each of other.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">You may also attempt to comment out line 275 or near there in the code to attempt to bypass the error, but this is NOT recommended unless you're matlab saavy and can read the full function code.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><u></u> <u></u></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Wed, Oct 26, 2016 at 2:44 PM, Elizabeth Spencer Norton <<a href="mailto:enorton@northwestern.edu" target="_blank">enorton@northwestern.edu</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p style="background:white"><span style="font-family:Cambria;color:black">Hello,<u></u><u></u></span></p>
<p style="background:white"><span style="font-family:Cambria;color:black">I'm trying to merge (concatenate) two datasets with different numbers of events. We run an oddball paradigm with randomly selected number of standards between deviants, and this is done
in two runs that have different stimuli. I'm trying to concatenate the two runs using the GUI which calls pop_mergeset, but getting the error popup "EEGLAB error in function pop_mergeset() at line 275: Reference to non-existent field 'urevent'."<u></u><u></u></span></p>
<p style="background:white"><span style="font-family:Cambria;color:black"><u></u> <u></u></span></p>
<p style="background:white"><span style="font-family:Cambria;color:black">Looking at the pop_mergeset script, it looks like it wants to merge the files and insert a boundary event halfway through (lines 224-228), which may be the problem with using two files
of unequal length. (Using EEGLab version 13.6.5.)<u></u><u></u></span></p>
<p style="background:white"><span style="font-family:Cambria;color:black"><u></u> <u></u></span></p>
<p style="background:white"><span style="font-family:Cambria;color:black">I'd prefer not to just lop off events from the longer dataset to make the sizes match. If anyone has ideas for other solutions, I would appreciate it!<u></u><u></u></span></p>
<p style="background:white"><span style="font-family:Cambria;color:black">Best,<u></u><u></u></span></p>
<p style="background:white"><span style="font-family:Cambria;color:black">Elizabeth Norton<u></u><u></u></span></p>
<p style="background:white"><span style="font-family:Cambria;color:black">Northwestern University<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><br>
______________________________<wbr>_________________<br>
Eeglablist page: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__sccn.ucsd.edu_eeglab_eeglabmail.html&d=CwMFaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=UmQyKtfwPbE90DmIj4MAEHaOnyafNSt_ygutyHV5KhE&m=uZvkS15DoF2Q5HRIooz4xV5Y1bGEBfQ6GChylgWaU1M&s=aASmwswiWiNlAsUY6b3OmBXzw_R_lZcFYunhT2DwGiI&e=" target="_blank">
http://sccn.ucsd.edu/eeglab/<wbr>eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">
eeglablist-unsubscribe@sccn.<wbr>ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">
eeglablist-request@sccn.ucsd.<wbr>edu</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
<br>______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/<wbr>eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.<wbr>ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.<wbr>edu</a><br></blockquote></div><br></div>