sccn / clean_rawdata

Cleaning Raw EEG data
GNU General Public License v3.0
42 stars 17 forks source link

`asr_process` silently skips processing if insufficient memory #12

Closed chriscline closed 2 years ago

chriscline commented 4 years ago

In asr_process.m, the number of splits are calculated with the line:

splits = ceil((C*C*S*8*8 + C*C*8*S/stepsize + C*S*8*2 + S*8*5) / (maxmem*1024*1024 - C*C*P*8*3));

However, the denominator can be negative if maxmem indicates there is insufficient memory. The following for i=1:splits loop is then skipped entirely and no processing is done, without any error or warning being printed.

chkothe commented 4 years ago

That's a good find!

arnodelorme commented 2 years ago

I have added an error if the denominator is negative.