<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks Tyler,<div><br></div><div>we have made the change. Actually we changed the code line 131 so that the whole time range would be considered.</div><div><br></div><div>measure = pop_spectopo(EEG, 1, [], 'EEG' , 'freqrange', opt.freqrange, 'plot','off');</div><div><br></div><div>Thanks again,</div><div><br></div><div>Arno</div><div><br><div><div>On Mar 6, 2014, at 7:08 PM, Makoto Miyakoshi <<a href="mailto:mmiyakoshi@ucsd.edu">mmiyakoshi@ucsd.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><div dir="ltr">Dear Arno and Derrick,<div><br></div><div>Here is a report of an EEGLAB error with detailed analysis. Would you mind checking it?</div><div><br></div><div>Tyler, thank you for your effort and contribution to the community.</div>
<div><br></div><div>Makoto</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-03-04 21:14 GMT-08:00 Tyler Grummett <span dir="ltr"><<a href="mailto:tyler.grummett@flinders.edu.au" target="_blank">tyler.grummett@flinders.edu.au</a>></span>:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
<div>
<div style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif"><p>Hello eeglab,<br>
</p><p><br>
</p><p>Im not sure whether this is a bug or not so I though I should report it on here before submitting the bug.<br>
</p><p><br>
</p><p>On line 131 of pop_rejchan:<br>
</p><p>measure = pop_spectopo(EEG, 1, [0 EEG.xmax*EEG.srate], 'EEG' , 'freqrange', opt.freqrange, 'plot','off');<br>
</p><p><br>
</p><p>I was wondering why 0 is chosen as the first input. On line 263 in pop_spectopo:<br>
</p><p><br>
</p>
<div><span style="white-space:pre-wrap"></span>posi = round( (timerange(1)/1000-EEG.xmin)*EEG.srate )+1;<br>
<br>
</div>
<div>If timerange(1) = 0 and you subtract EEG.xmin from it then it will generate a negative number, which will end up being a negative index. I think this is the cause for later crashes.<br>
</div><p><br>
</p><p>It also seems apparent that the units for timerange are in datapoints. However, when you come to line 262 in pop_spectopo:</p><p><br>
</p><p>if timerange(1)/1000~=EEG.xmin | timerange(2)/1000~=EEG.xmax<br>
</p><p><br>
</p><p>It would seem that timerange should be in milliseconds rather than datapoints. Which would mean you would need to make the following change at line 131 of pop_rejchan.<br>
</p><p><br>
</p><p><span style="font-size:16px;font-family:calibri,arial,helvetica,sans-serif">On line 131 of pop_rej</span><span style="font-size:16px;font-family:calibri,arial,helvetica,sans-serif">chan:</span><br>
</p><p><span style="font-size:16px;font-family:calibri,arial,helvetica,sans-serif">measure =</span><span style="font-size:16px;font-family:calibri,arial,helvetica,sans-serif"> pop_spectopo(EEG,
1, [EEG.xmin EEG.xmax]*1000, 'EEG' , 'freqrange', opt.freqrange, 'plot','off');</span></p><p><br>
</p><p>However if 'time range' should be in datapoints, I was wondering whether dividing it by the EEG.srate rather than 1000 is more appropriate at line 262 in pop_spectopo and doing the following at line 131 in pop_rejchan:<br>
</p><p><br>
</p><p>measure = pop_spectopo(EEG, 1, [EEG.xmin EEG.xmax]*EEG.srate, 'EEG' , 'freqrange', opt.freqrange, 'plot','off');<br>
</p>
<div><br>
The function appears to be working fine if you make these changes.<br>
</div>
<div><br>
</div>
<div>Regards,<br>
</div>
<div><br>
</div>
<div>Tyler<br>
</div><p><br>
</p>
<div><p><br>
</p>
<div name="divtagdefaultwrapper" style="font-family:calibri,arial,helvetica,sans-serif;margin:0px">
<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 66124</i></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.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.edu</a><br></blockquote></div><br><br clear="all"><div><br></div>
-- <br><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div>
</div></div>
</blockquote></div><br></div></body></html>