Skip to content

Instantly share code, notes, and snippets.

View alexrockhill's full-sized avatar

Alex Rockhill alexrockhill

View GitHub Profile
import inspect
import os.path as op
import shutil
import numpy as np
from numpy.testing import (assert_array_almost_equal, assert_array_equal,
assert_allclose, assert_equal)
import pytest
from mne.utils import _TempDir, run_tests_if_main
@alexrockhill
alexrockhill / sample.bvct
Last active October 24, 2018 14:56
Sample BVCT
<?xml version="1.0"?>
<BrainVisionCapTrakFileV1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CapTrakFileVersion>1.10</CapTrakFileVersion>
<RecordingDateTime>2018.01.12 10:48:44</RecordingDateTime>
<CapSize>58</CapSize>
<HeadShapeName>Round</HeadShapeName>
<CapTrakElectrodeList>
<CapTrakElectrode>
<Name>LPA</Name>
<X>-83.887782650513117</X>
@alexrockhill
alexrockhill / MEM
Last active August 1, 2018 02:34
Memory-Mapping Error Example
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')