<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Dear EEGLAB</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Im having a great time using the clean_rawdata toolbox, however, I ran into a bug recently which is preventing me from using the function vis_artifacts. The bug occurs after Ive used clean_windows and try to compare the
 output data to the input data. The following error occurs:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div><span style="color: rgb(255, 0, 0);">Subscripted assignment dimension mismatch.</span></div>
<div><br>
</div>
<div><span style="color: rgb(255, 0, 0);">Error in vis_artifacts/expand_rejections (line 334)</span></div>
<div><span style="color: rgb(255, 0, 0);">        tmpdata(EEG.etc.clean_channel_mask,EEG.etc.clean_sample_mask)</span></div>
<div><span style="color: rgb(255, 0, 0);">        = EEG.data;</span></div>
<div><br>
</div>
<div><span style="color: rgb(255, 0, 0);">Error in vis_artifacts (line 101)</span></div>
<div><span style="color: rgb(255, 0, 0);">    new = expand_rejections(to_continuous(new));</span></div>
<br>
<p></p>
<p style="margin-top:0;margin-bottom:0">Digging into the code I find out that the number of true logicals in EEG.etc.clean_sample_mask is equal to 2449098, whereas the number of data points in my 'cleaned' data is 2449096. Returning to the clean_windows function,
 I get the following warning:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div><span style="color: rgb(226, 197, 1);">Warning: eeg_lat2point(): Points out of range detected.</span></div>
<div><span style="color: rgb(226, 197, 1);">Points replaced with maximum value </span></div>
<div><span style="color: rgb(226, 197, 1);">> In eeg_lat2point (line 101)</span></div>
<div><span style="color: rgb(226, 197, 1);">  In pop_select (line 534)</span></div>
<div><span style="color: rgb(226, 197, 1);">  In clean_windows (line 136)</span></div>
<div><span style="color: rgb(226, 197, 1);">  In clean_artifacts (line 226)</span></div>
<div><span style="color: rgb(226, 197, 1);">  In clean_rawdata (line 83)</span></div>
<div><span style="color: rgb(226, 197, 1);">  In mcgurk_clean_data (line 187) </span></div>
<br>
<p></p>
<p style="margin-top:0;margin-bottom:0">This suggests to me that eeg_lat2point may have removed some data points? Or do you think that clean_windows should accommodate for changes made my eeg_lat2point? Like the subject of this email suggests, I dont know where
 the bug is.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I can confirm that I am using clean_rawdata version 0.32</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Tyler</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-size:13px">*************************
<div style="font-family:Tahoma"><br>
</div>
<div><font face="Arial"><i>Tyler Grummett ( BBSc, BSc(Hons I))</i></font></div>
<div><font face="Arial"><i>PhD Candidate</i></font></div>
<div><font face="Arial"><i>Brain Signals Laboratory</i></font></div>
<div><font face="Arial"><i>Flinders University</i></font></div>
<div><font face="Arial"><i>Rm 5A301</i></font></div>
<div><font face="Arial"><i>Ext 66125</i></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>