[Eeglablist] Why does pop_saveset force data to single precision?

Niko Busch mail at nikobusch.net
Tue Apr 12 08:07:12 PDT 2011


An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110412/1ba9fbe2/attachment.html>
-------------- next part --------------
Hi everyone,

I recently had trouble using signal processing functions because my EEG data are in single precision, whereas these functions expect double precision. On my machine, RAM is not really an issue, so I unchecked the EEGLAB option to use single precision to save RAM.

After digging through a number of EEGLAB functions, which were used for pre-processing the data, I found that most functions do read the eeg_options file and use single/double precision accordingly. However, pop_saveset seems to force the data to single precision when the data are stored to the hard drive no matter which options are set in the eeg_options file:

if ~strcmpi(class(EEG.data), 'memmapdata') & ~strcmpi(class(EEG.data), 'single')
        tmpdata       = single(reshape(EEG.data, EEG.nbchan,  EEG.pnts*EEG.trials));

Of course I could delete these lines or use double(EEG.data) whenever I need double precision. However, I would like to understand why pop_saveset forces single precision and why it does not use the eeg_options.

Any ideas, anyone?

Best
Niko


More information about the eeglablist mailing list