Beispiel #1
0
    'face/famous/long': 7,
    'face/unfamiliar/first': 13,
    'face/unfamiliar/immediate': 14,
    'face/unfamiliar/long': 15,
    'scrambled/first': 17,
    'scrambled/immediate': 18,
    'scrambled/long': 19,
}

###############################################################################
# Templates for filenames
#
# This part of the config file uses the FileNames class. It provides a small
# wrapper around string.format() to keep track of a list of filenames.
# See fnames.py for details on how this class works.
fname = FileNames()

# Some directories
fname.add('study_path', study_path)
fname.add('archive_dir', '{study_path}/archive')
fname.add('meg_dir', '{study_path}/MEG')
fname.add('subjects_dir', '{study_path}/subjects')
fname.add('subject_dir', '{meg_dir}/{subject}')

# URLs and filenames for the original openfmri ds117 files
fname.add('ds117_url', 'http://openfmri.s3.amazonaws.com/tarballs')
fname.add('metadata_url', '{ds117_url}/ds117_R0.1.1_metadata.tgz')
fname.add('metadata_tarball', '{archive_dir}/ds117_R0.1.1_metadata.tgz')
fname.add('metadata_dir', '{study_path}/metadata')
fname.add('subject_url', '{ds117_url}/ds117_R0.1.1_{subject}_raw.tgz')
fname.add('subject_tarball', '{archive_dir}/ds117_R0.1.1_{subject}_raw.tgz')
# Parameters for creating epochs

#########################################################################################
# epochs characteristics

tmin, tmax = -20, 20

baseline = None

###############################################################################
# Templates for filenames
#############################################################################
# This part of the config file uses the FileNames class. It provides a small
# wrapper around string.format() to keep track of a list of filenames.
# See fnames.py for details on how this class works.
fname = FileNames()

# filename for folders
fname.add('bids_root', bids_root)
fname.add('folder_preproc',
          bids_root_der + '/eeg_preprocess/{subject}/{session}/eeg/'
          )  # folder name and path to store pre-processed files

#filenames for files generated during analysis
fname.add(
    'raw',
    '{bids_root}/{subject}/{session}/eeg/{subject}_{session}_{task}_eeg.vhdr')

fname.add(
    'filt',
    '{folder_preproc}/{subject}_{session}_{task}_filt_{fmin}_{fmax}_raw.fif')
# These are all the relevant parameters for the analysis.

sample_rate = 1000  # Hz
fmin = 1.0  # Hz
fmax = 20.0  # Hz

# All subjects
subjects = ['sub01', 'sub02']

###############################################################################
# Templates for filenames
#
# This part of the config file uses the FileNames class. It provides a small
# wrapper around string.format() to keep track of a list of filenames.
# See fnames.py for details on how this class works.
fname = FileNames()

# Some directories
fname.add('raw_data_dir', raw_data_dir)
fname.add('processed_data_dir', './processed')
fname.add('figures_dir', './figures')

# The data files that are used and produced by the analysis steps
fname.add('input', '{raw_data_dir}/input-{subject}.txt')
fname.add('output', '{processed_data_dir}/output-{subject}.txt')
fname.add('grand_average', '{processed_data_dir}/grand_average.txt')

# The figures
fname.add('figure1', '{figures_dir}/figure1.pdf')
fname.add('figure_grand_average', '{figures_dir}/figure_grand_average.pdf')
cut_coords = (-5, -30, 30)

###############################################################################
# True source locations for real datasets
###############################################################################

# FIXME replace with actual value determined by Hanna Renvall
somato_true_pos_ras = [36.9265, 7.85419, 53.4155]  # In RAS space, in mm
somato_true_pos = [0.03279403, 0.00966346, 0.10528801]  # In head space, in m
somato_true_pos = [-0.00445296, -0.0150457, 0.0552662]  # In head space, in m
somato_true_vert_idx = 5419

###############################################################################
# Filenames for various things
###############################################################################
fname = FileNames()

n_noise_dipoles_vol = 150  # number of noise_dipoles in volume source space

# Filenames for various volume source space related things
fname = FileNames()
# Files from MNE-sample dataset
fname.add('data_path', sample.data_path())
fname.add('subjects_dir', '{data_path}/subjects')
fname.add('bem_folder', '{data_path}/subjects/sample/bem')
fname.add('bem', '{bem_folder}/sample-5120-bem-sol.fif')
fname.add('src', '{bem_folder}/volume-7mm-src.fif')
fname.add('sample_folder', '{data_path}/MEG/sample')
fname.add('sample_raw', '{sample_folder}/sample_audvis_raw.fif')
fname.add('ernoise', '{sample_folder}/ernoise_raw.fif')
fname.add('aseg', '{data_path}/subjects/sample/mri/aseg.mgz')
Beispiel #5
0
import mne

from fnames import FileNames

fname = FileNames()
fname.add('bids_root', mne.datasets.somato.data_path())
fname.add('prefix', 'sub-01_task-somato')
fname.add('derivatives', '{bids_root}/derivatives/sub-01')
fname.add('subjects_dir', '{bids_root}/derivatives/freesurfer/subjects')
fname.add('raw', '{bids_root}/sub-01/meg/sub-01_task-somato_meg.fif')
fname.add('trans', '{derivatives}/sub-01_task-somato_trans.fif')
fname.add('bem', '{derivatives}/sub-01_task-somato_vol-bem-sol.fif')
fname.add('src', '{derivatives}/sub-01_task-somato_vol-src.fif')
fname.add('src_surf', '{derivatives}/sub-01_task-somato-src.fif')
fname.add('fwd', '{derivatives}/sub-01_task-somato_vol-fwd.fif')
fname.add('fwd_surf', '{derivatives}/sub-01_task-somato-fwd.fif')
fname.add('ica', '{derivatives}/sub-01_task-somato_ica.fif')
fname.add('epochs', '{derivatives}/sub-01_task-somato_epo.fif')
fname.add('epochs_long', '{derivatives}/sub-01_task-somato_long_epo.fif')
fname.add('evoked', '{derivatives}/sub-01_task-somato_ave.fif')
fname.add('stc_mne', '{derivatives}/sub-01_task-somato_mne')
fname.add('stc_lcmv', '{derivatives}/sub-01_task-somato_lcmv')
fname.add('stc_dics', '{derivatives}/sub-01_task-somato_dics')
fname.add('ecd', '{derivatives}/sub-01_task-somato_ecd.dip')
fname.add('nii_mne', '{derivatives}/sub-01_task-somato_mne.nii.gz')
fname.add('nii_lcmv', '{derivatives}/sub-01_task-somato_lcmv.nii.gz')
fname.add('nii_dics', '{derivatives}/sub-01_task-somato_dics.nii.gz')
fname.add('mri', '{bids_root}/derivatives/freesurfer/subjects/01/mri/orig.mgz')
fname.add('report', 'somato.h5')
fname.add('report_html', 'somato.html')
fname.add('dip_vs_lcmv_results', 'dip_vs_lcmv_results.csv')
Beispiel #6
0
trial_length = 2.0  # Length of a trial in seconds
# We have 109 seconds of empty room data
n_trials = int(109 / trial_length)  # Number of trials to simulate
signal_freq = 10  # Frequency at which to simulate the signal timecourse
noise_lowpass = 40  # Low-pass frequency for generating noise timecourses
noise = args.noise  # Multiplyer for the noise dipoles

# Position of the signal
vertex = args.vertex
signal_hemi = 1

random = np.random.RandomState(42)  # Random seed for everything

# Filenames for various things
fname = FileNames()

# Files from MNE-sample dataset
fname.add('data_path', sample.data_path())
fname.add('subjects_dir', '{data_path}/subjects')
fname.add('bem_folder', '{data_path}/subjects/sample/bem')
fname.add('sample_folder', '{data_path}/MEG/sample')
fname.add('sample_raw', '{sample_folder}/sample_audvis_raw.fif')
fname.add('ernoise', '{sample_folder}/ernoise_raw.fif')
fname.add('bem', '{bem_folder}/sample-5120-5120-5120-bem-sol.fif')
fname.add('src', '{bem_folder}/sample-oct-6-orig-src.fif')
fname.add('fwd', '{sample_folder}/sample_audvis-meg-eeg-oct-6-fwd.fif')
fname.add('trans', '{sample_folder}/sample_audvis_raw-trans.fif')

# Files produced by the simulation code
fname.add('target_path', target_path)  # Where to put everything
Beispiel #7
0
    6: (7, 15),  # Typical ERD response
    7: (9, 14),  # Bit narrow band ERD response
}

# Amount of regularization needed for the beamformers. Varies between subjects.
reg = {
    1: dict(lcmv=0.05, dics=0.05),
    2: dict(lcmv=0.05, dics=2.00),  # Crazy DICS regularization needed
    4: dict(lcmv=0.05, dics=0.05),
    5: dict(lcmv=0.05, dics=0.05),
    6: dict(lcmv=0.05, dics=0.05),
    7: dict(lcmv=0.05, dics=0.05),
}

# All filenames consumed and produced in this study
fname = FileNames()
fname.add('target_path', target_path)
fname.add('target_dir', '{target_path}/megset/sub{subject:02d}')
fname.add('subjects_dir', '{target_path}/megset/mri')
fname.add('subject_id', 'k{subject:d}_T1')
fname.add('raw', '{target_dir}/sub{subject:02d}-raw.fif')
fname.add('raw_tsss', '{target_dir}/sub{subject:02d}-tsss-raw.fif')
fname.add('raw_filt', '{target_dir}/sub{subject:02d}-filtered-raw.fif')
fname.add('raw_detrend', '{target_dir}/sub{subject:02d}-detrended-raw.fif')
fname.add('annotations', '{target_dir}/sub{subject:02d}-annotations.txt')
fname.add('trans', '{target_dir}/sub{subject:02d}-trans.fif')
fname.add('bem', '{target_dir}/sub{subject:02d}-vol-bem-sol.fif')
fname.add('src', '{target_dir}/sub{subject:02d}-vol-src.fif')
fname.add('fwd', '{target_dir}/sub{subject:02d}-vol-fwd.fif')
fname.add('ica', '{target_dir}/sub{subject:02d}-ica.fif')
fname.add('epochs', '{target_dir}/sub{subject:02d}-epo.fif')