[Eeglablist] Saving an EEGLAB dataset in a single file
Delorme, Arnaud
adelorme at ucsd.edu
Fri Dec 25 16:00:52 PST 2020
In EEGLAB 2021 to be released next year, we propose to change the default behavior for saving data files.
The reason for saving two files (a .set and a .fdt file) in EEGLAB is mostly historical. Although there has always been an option to save a single .set file, this was not the default behavior. In the old days, reading one channel was advantageous for group analysis and avoided reading the whole file. However, EEGLAB handles group analysis files differently now, and there is no advantage to have two files. The other advantage of having two files is to be able to quickly read metadata when working with an EEGLAB STUDY. However, there is a workaround as explained below.
So we propose to save as a single .set file by default that will contain both the data and the metadata. We will keep the option to save datasets as two files (but it will not be the default).
It is simpler and less confusing to have one file than to have two files. This also facilitates compatibility and cross-talk with other software and languages.
Another backward compatible change we want to implement is to save the EEG structure's content instead of the EEG structure itself.
Pseudo code for current implementation
save -mat myfile.set EEG
Pseudo code for new implementation
save -mat myfile.set -struct EEG
Even old versions of EEGLAB support reading both file formats. The advantage of the second implementation is that it is then possible to import EEGLAB .set file while omitting the data field (for quickly loading an EEGLAB STUDY) using commands such as
EEG = load('-mat', ‘myfile.set', '-regexp', '^((?!data).)*$’);
Let us know your thoughts and comments,
Arno
More information about the eeglablist
mailing list