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
""" | |
====================================================== | |
Corrupt fiff file by saving it using an identitcal fid | |
====================================================== | |
This script shows how to corrupt a fiff file. | |
""" | |
# License: BSD (3-clause) |
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
events = mne.find_events(raw) | |
ica_epochs = mne.Epochs(ica_raw, events, 1, -.2, .5, picks=np.arange(ica.n_components), baseline=None) | |
ica_epochs.average(False).plot() | |
mne.viz.plot_topo_image_epochs(ica_epochs, ica_lout, 0.5) |
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
def _check_resp(stim, resp, l_cor, r_cor): | |
""" Helper function for evaluating responses | |
Parameters | |
""" | |
ret = 0 | |
if resp == 8 and stim in l_cor: | |
ret = 1 | |
elif resp == 64 and stim in r_cor: | |
ret = 1 | |
return ret |
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
% | |
% This standard selection file is for the ICA sources from mne-python (ica.sources_as_raw) | |
% | |
% $Header$ | |
% $Log$ | |
% Revision 0.0 2012/12/28 08:33:18 de | |
% | |
% | |
% | |
% |
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
# Author: Denis A. Engemann <d.engemann@fz-juelich.de> | |
""" Export Magnes3600WH weight tables for your study | |
If you want to include reference channels (might be a good idea), | |
currently, the way to go is to use the following mne command | |
to create the compensation data: | |
$ mne_create_comp_data | |
usage: mne_create_comp_data [options] |
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
""" How to add measurment info to bti files. | |
Warning, this is example code. Trivially, you need to change paths but also | |
this code assumes you already exported the weights to .txt files and your | |
path is organized like this: | |
subjects_dir/subject{here are the weights}/kind{main, resting state, rempty room}/run/files{raw.fif} | |
""" | |
import os | |
import os.path as op |
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
# Author: d.engemann@fz-juelich.de | |
# | |
# License: BSD (3-clause) | |
# XXX clafify licensing | |
import numpy as np | |
from collections import namedtuple | |
from scipy.signal import detrend | |
from scipy import stats |
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 numpy as np | |
import pandas as pd | |
from rpy2 import robjects as rob | |
# test data as found in MNE-Python | |
data = np.random.RandomState(42).randn(20, 8) | |
# prepare categorial factors for R long table format | |
var = data.flatten() | |
aa = ['a1', 'a1', 'a1', 'a1', 'a2', 'a2', 'a2', 'a2'] * 20 |
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
% This standard selection file is for the Magnes WH3600 systems | |
% | |
% put this file in ~./mne/ when using Juelich MAGNES data | |
% in case the selction is not immediately loaded when opening a raw fif file | |
% go to 'File'->'Load channel selections ...' where all user defined channel selections | |
% residing in ~/.mne will be displayed. | |
% | |
% Sequential selections (this assumes that the trigger channel has been renamed to STI 014) | |
% | |
MEG4D 1:MEG 001|MEG 002|MEG 003|MEG 004|MEG 005|MEG 006|MEG 007|MEG 008|MEG 009|MEG 010|MEG 011|MEG 012|MEG 013|MEG 014|MEG 015|MEG 016|MEG 017|MEG 018|MEG 019|MEG 020|MEG 021|MEG 022|MEG 023|MEG 024|MEG 025|MEG 026|MEG 027|MEG 028|MEG 029|MEG 030|MEG 031|ECG 001|EOG 001|EOG 002|STI 013|STI 014 |
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/csh | |
source /localdata/scripts/set_sub.sh | |
mne_do_forward_solution --spacing oct-6 --mindist 5 --overwrite \ | |
--meas $SUBJECTS_DIR/$SUBJECT/main_raw.fif \ | |
--fwd $SUBJECTS_DIR/$SUBJECT/main-fwd.fif --megonly |
OlderNewer