Created
August 25, 2014 22:46
-
-
Save dengemann/e9b45f2ff3e3380907d3 to your computer and use it in GitHub Desktop.
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
""" | |
======================================== | |
Create a fiff file from arbitrary inputs | |
======================================== | |
This example creates random data and writes them to a fiff file. | |
""" | |
print(__doc__) | |
# Authors: Denis Engemann <denis.engemann@gmail.com> | |
# | |
# License: BSD (3-clause) | |
import mne | |
import numpy as np | |
rng = np.random.RandomState(42) | |
data = rng.random_sample((248, 2000)) | |
sfreq = 1e3 | |
ch_types = ['misc'] * 248 | |
ch_names = ['MISC {:03d}'.format(i + 1) for i in range(len(ch_type))] | |
info = mne.create_info(ch_names=ch_names, sfreq=sfreq, ch_types=ch_types) | |
raw = mne.io.RawArray(data, info) | |
raw.save('misc.fif') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment