[Eeglablist] Problem with clean_rawdata
tyler.grummett at flinders.edu.au
Thu Dec 18 06:38:48 PST 2014
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 Grummett ( BBSc, BSc(Hons I))
Brain Signals Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the eeglablist