fit_eeg_distribution in asr_calibrate crash
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start in fit_eeg_distribution, called from asr_calibrate through clean_asr and clean_artifacts. Reproduce the reported failure with the X 3x6, m=1, n=6 case and inspect the bsxfun expression around line 377, along with the m=0 path. Done means calibration no longer crashes on these edge cases and produces valid results.
Written by the indexing model from the issue text.
Description
Transfered from https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=13115
The line: H = bsxfun(@times,X(1:m,:),nbins./X(m,:)); also crashes when m = 0;
[reply] [−]DescriptionTyler Grummett 2017-07-18 17:55:02 PDT
In the clean_rawdata0.32 toolbox, I am having an issue with the fit_eeg_distribution function, which is a function within the asr_calibration function. The error is as follows:
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,...
Looking into it a little further, it appear as though logq only has one row of numbers, so it crashes when it tries to grab logq(1:end-1,:). This occurs when m = 1, n = 6 (X is a 3x6 matrix of numbers), and therefore H is a row of NaNs.
Please note that this is one set of data which didnt work out of a large number of tasks and subjects, so it is working for the vast majority of the time.
Regards,
Tyler
- Dominant language
- MATLAB
- Stars
- 55
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sccn/clean_rawdata
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
sccn/clean_rawdata#45 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
sccn/clean_rawdata#43 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
sccn/clean_rawdata#38 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
sccn/clean_rawdata#37 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
sccn/clean_rawdata#33 · 3 comments ·
All issues in sccn/clean_rawdata
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
VH-Lab/NDIcalc-vis-matlab#107 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
gnu-octave/statistics#498 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
HenrikBengtsson/R.matlab#59 · 3 comments ·
-
enhancement question unconfirmed
Difficulty 2/5 1-2 days Newbie friendliness 83/100