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
import mne | |
raw=mne.io.Raw('/aux/Lau/timingChris/PROJ0156_SUBJ0001_SER001_FILESNO001.fif',preload=False) | |
pick_misc = mne.pick_channels(raw.info['ch_names'], include='MISC001') | |
events = mne.find_events(raw, stim_channel='STI101', min_duration=0.002, consecutive=True) | |
# hvis 232 skal fjernes, kan det goeres saaledes | |
incl_range = range(100,300) | |
incl_range.remove(232) |
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
# if python from brew, otherwise might not work | |
brew install portaudio portmidi libsndfile liblo jack | |
brew link portaudio portmidi libsndfile liblo | |
cd ~/Sites/tmp | |
svn checkout http://pyo.googlecode.com/svn/trunk/ pyo-read-only | |
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
# -*- coding: utf-8 -*- | |
""" | |
Examine if a 2x window length is appropriate for savgol filtering. | |
""" | |
from scipy.signal import savgol_filter | |
from scipy import fftpack | |
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.ion() |
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
# copy from http://stackoverflow.com/questions/22408237/named-colors-in-matplotlib | |
# credits to BoshWash | |
import matplotlib.pyplot as plt | |
import matplotlib.patches as patches | |
import matplotlib.colors as colors | |
import math | |
fig = plt.figure() | |
ax = fig.add_subplot(111) |
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
#!/bin/bash -x | |
# | |
# This script tests the use of the fsaverage brain with MEG | |
# subjects lacking an individual MRI. In particular, I have | |
# been unable to change the number of vertices on the resulting | |
# surface using the --spacing option (mne_setup_source_space, | |
# mne_do_forward_solution). | |
# | |
# The steps here are mainly based on a document created by Matti Hamalainen, |
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 os import path as op | |
from os import rmdir | |
import mne | |
from mne.datasets import testing | |
from mne.utils import _TempDir | |
sample_path = op.join(testing.data_path(download=False), 'MEG', 'sample') | |
raw_fname = op.join(sample_path, 'sample_audvis_trunc_raw.fif') | |
trans_fname = op.join(sample_path, 'sample_audvis_trunc-trans.fif') |
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 os import path as op | |
import mne | |
from mne.datasets import testing | |
import numpy as np | |
import matplotlib.pyplot as plt | |
sample_path = op.join(testing.data_path(download=False), 'MEG', 'sample') | |
raw_fname = op.join(sample_path, 'sample_audvis_trunc_raw.fif') | |
trans_fname = op.join(sample_path, 'sample_audvis_trunc-trans.fif') |
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
# Passing a mutable object to a function is like passing a C-pointer to | |
# the memory location of the object -> mutating memory inside the function | |
# will be "visible" outside the function too. | |
# Since each function has its own _namespace_, mangling the variable | |
# is equivalent to moving the pointer away from the passed-in location | |
# so any changes to the parameter variable remain within the scope of | |
# the function. | |
outer_list = [1,2,3,4] |
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 os import path as op | |
import numpy as np | |
# from scipy import linalg | |
import mne | |
data_path = mne.datasets.sample.data_path() | |
subjects_dir = op.join(data_path, 'subjects') | |
fname_ave = op.join(data_path, 'MEG', 'sample', 'sample_audvis-ave.fif') | |
fname_cov = op.join(data_path, 'MEG', 'sample', 'sample_audvis-cov.fif') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer