epochs.save()

Hi all,
I'm trying to save epochs data using these two commands:

1- epochs = mne.Epochs(raw,events,event_id,tmin,tmax,picks=picks,

baseline=baseline,reject=reject,preload=True,verbose=True)
2- epochs.save(epo_fname)

the epochs are saved into two files each with size around 600 MB although
the total size of the input raw fif file is only 1.25 GB! as far as I know
this should not happen unless the fif file is larger than 2 GB!?

I would appreciate it if anyone could explain why this would happen and how
to save the epochs in one fif file.

with best regards
Rasha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170410/57e13062/attachment.html

Hi Rasha,

see split_size option of epochs.save
<https://4354-1301584-gh.circle-artifacts.com/0/home/ubuntu/mne-python/doc/_build/html/generated/mne.Epochs.html?highlight=epochs%20save#mne.Epochs.save>
.

-Jaakko

Hi Jaakko,
thanks for your reply. I have already tried that option and ran epoching
after setting split_size to '2GB':
epochs.save(epo_fname, split_size= '2GB')

but still having the same problem, two saved files!
am I doing something wrong here? isn't the default splitting size value
'2GB' or should we set it explicitly when saving?

Rasha

hi Rasha,

can you provide a code snippet to replicate?

thanks
Alex

Hi Alex,
this is what I'm using for epoching:

events = mne.find_events(raw, stim_channel='STI101',
shortest_event=2,min_duration=0.002, verbose=True)

picks = mne.pick_types(raw.info,meg=True, eeg=True, eog=True, stim=False,
exclude='bads')

epochs = mne.Epochs(raw,events,event_id,tmin,tmax,picks=picks,
baseline=baseline,reject=reject,preload=True,verbose=True)
# epochs.save(epo_fname)
epochs.save(eop_fname, split_size='2GB')

However, I'm not sure if you need more specific information but I can send
them to you.

I want to mention that I've noticed that epochs are splitted into two files
whenever the total size is larger that 1GB and I'm not sure why this is the
case!

Many thanks for your help
Rasha

I believe there is a bug in the size calculation. See
https://github.com/mne-tools/mne-python/issues/4180

Many thanks Jaakko, I will check this.

all the best
Rasha