[Eeglablist] pop_rejchan
Makoto Miyakoshi
mmiyakoshi at ucsd.edu
Thu Mar 6 19:08:25 PST 2014
Dear Arno and Derrick,
Here is a report of an EEGLAB error with detailed analysis. Would you mind
checking it?
Tyler, thank you for your effort and contribution to the community.
Makoto
2014-03-04 21:14 GMT-08:00 Tyler Grummett <tyler.grummett at flinders.edu.au>:
> Hello eeglab,
>
>
> Im not sure whether this is a bug or not so I though I should report it
> on here before submitting the bug.
>
>
> On line 131 of pop_rejchan:
>
> measure = pop_spectopo(EEG, 1, [0 EEG.xmax*EEG.srate], 'EEG' ,
> 'freqrange', opt.freqrange, 'plot','off');
>
>
> I was wondering why 0 is chosen as the first input. On line 263 in
> pop_spectopo:
>
>
> posi = round( (timerange(1)/1000-EEG.xmin)*EEG.srate )+1;
>
> 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.
>
>
> It also seems apparent that the units for timerange are in datapoints.
> However, when you come to line 262 in pop_spectopo:
>
>
> if timerange(1)/1000~=EEG.xmin | timerange(2)/1000~=EEG.xmax
>
>
> 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.
>
>
> On line 131 of pop_rejchan:
>
> measure = pop_spectopo(EEG, 1, [EEG.xmin EEG.xmax]*1000, 'EEG' ,
> 'freqrange', opt.freqrange, 'plot','off');
>
>
> 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:
>
>
> measure = pop_spectopo(EEG, 1, [EEG.xmin EEG.xmax]*EEG.srate, 'EEG' ,
> 'freqrange', opt.freqrange, 'plot','off');
>
> The function appears to be working fine if you make these changes.
>
> Regards,
>
> Tyler
>
>
>
> *************************
>
> *Tyler Grummett ( BBSc, BSc(Hons I))*
> *PhD Candidate*
> *Brain Signals Laboratory*
> *Flinders University*
> *Rm 5A301*
> *Ext 66124*
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
--
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140306/174799d4/attachment.html>
More information about the eeglablist
mailing list