[Eeglablist] Problem with clean_rawdata

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Thu Dec 25 18:40:12 PST 2014


Dear Tyler and Christian,

Thank you for careful investigation and report. I've also recently used the
function heavily but the error did not occur, so I need sample data to
replicate it (unless Christian 'sees' the problem from your good detailed
report). If Christian agrees that we need sample data to replicate the
error, would you be able to send it to us?

Makoto

On Thu, Dec 18, 2014 at 6:38 AM, Tyler Grummett <
tyler.grummett at flinders.edu.au> wrote:

>  Hello eeglabbers,
>
>
>  Recently Ive been using clean_rawdata and it has been working really
> well. However, I just ran it and it gave me the following error:
>
>
>  >> EEG_cleaned = clean_rawdata( EEG, 5, 'off', 0.85, 4, 20, 'off');
> Scanning for bad channels...
> clean_channel:   1/2, 0.0 minutes remaining.
> clean_channel:   2/2, 0.0 minutes remaining.
> Removing 3 channel(s)...
> Finding a clean section of the data...
> Determining time window rejection thresholds...done.
> Keeping 14.1% (2 seconds) of the data.
> eeg_insertbound(): 4 boundary (break) events added.
> eeg_insertbound(): event latencies recomputed and 15 events removed.
> eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1
> = number of frames
> Estimating calibration statistics; this may take a while...
> Determining per-component thresholds...Error using bsxfun
> Non-singleton dimensions of the two input arrays must match each other.
>
>  Error in asr_calibrate>fit_eeg_distribution (line 377)
>         kl = sum(bsxfun(@times,p,bsxfun(@minus,log(p),logq(1:end-1,:)))) +
> log(m);
>
>  Error in asr_calibrate (line 180)
>     [mu(c),sig(c)] =
> fit_eeg_distribution(rms,min_clean_fraction,max_dropout_fraction);
>
>  Error in clean_asr (line 164)
>     state = asr_calibrate(ref_section.data,ref_section.srate,cutoff);
>
>  Error in clean_artifacts (line 219)
>     EEG =
> clean_asr(EEG,burst_crit,[],[],[],burst_crit_refmaxbadchns,burst_crit_reftolerances,[]);
> end
>
>  Error in clean_rawdata (line 83)
> cleanEEG = clean_artifacts(EEG, 'FlatlineCriterion', arg_flatline,...
>
>
>
>  I had a good look inside the functions and found this in
> the fit_eeg_distribution function (inside asr_calibrate):
>
>
>  On line 359 is the following code: X1 = X(1,:); X = bsxfun(@minus,X,X1);
>
>
>  Now i believe that gives a row of 0s.
>
>
>  then in the following line of code:
>
>
>  line 366: H = bsxfun(@times,X(1:m,:),nbins./X(m,:));
>
>
>  H is a line of NaNs, which then crashes the code on line 377.
>
>
>
>  I dont know if this is a bug or whether my data is dodgy in some way,
> but it has worked on other data and so I
>
> dont know what conclusion to draw.
>
>
>  Ill run a few more tests, but I just wanted help from the experts :)
>
>
>  Tyler
>
>
>    *************************
>
>  *Tyler Grummett ( BBSc, BSc(Hons I))*
> *PhD Candidate*
> *Brain Signals Laboratory*
> *Flinders University*
> *Rm 5A301*
> *Ext 66125*
>
> _______________________________________________
> 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/20141225/75c9d0e0/attachment.html>


More information about the eeglablist mailing list