-
-
Save alexrockhill/f2ddbae467e8e5728db48834f2601e0d to your computer and use it in GitHub Desktop.
Memory-Mapping Error Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mne import create_info | |
from mne.io import Raw,RawArray | |
import numpy as np | |
for i in range(100): | |
raw_info = create_info([str(i) for i in range(100)],25000,['eeg' for _ in range(100)]) | |
raw = RawArray(np.ones((100,int(1e7))),raw_info) | |
raw.save('test%i-raw.fif' %(i)) | |
raw = Raw('test0-raw.fif',preload='test_workfile') | |
for i in range(100): | |
raw2 = Raw('test%i-raw.fif' %(i),preload='test%i_workfile' %(i)) | |
raw.append(raw2,preload='test%i_workfile' %(i)) | |
new_ch_info = create_info(['Cz'],25000,['eeg']) | |
ch = RawArray(np.ones((1,int(1e7))),new_ch_info) | |
raw.add_channels([ch]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment