예제 #1
0
#laptop wd
wd = '/home/sammirc/Desktop/DPhil/wmConfidence'  #workstation wd
os.chdir(wd)

subs = np.array([
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
    22, 23, 24, 25
])
subs = np.array(
    [4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 25])
subs = np.array([24, 25])

for i in subs:
    print('\n\nworking on subject ' + str(i) + '\n\n')
    sub = dict(loc='workstation', id=i)
    param = get_subject_info_wmConfidence(sub)

    if i <= 2:  #these subjects only have one session

        #read in the already ica cleaned data, already been filtered too
        raw = mne.io.read_raw_fif(fname=param['rawcleaned'], preload=True)
        raw.set_montage('easycap-M1')

        #epoching
        #here it's important to specify a dictionary that assigns each trigger to its own integer value
        #mne.events_from_annotations will assign each trigger to an ordered integer,
        #so e.g. trig11 will be 2, but epoching 11 will include another trigger
        #this solves it
        event_id = {
            '1': 1,
            '2': 2,  #array
예제 #2
0
threshold = -10
if threshold == -10:
    glmnum = 6
else:
    glmnum = 5

data = dict()
data_t = dict()
for i in contrasts:
    data[i] = []
    data_t[i] = []
for i in subs:
    print('\n\ngetting subject ' + str(i) + '\n\n')
    sub = dict(loc='workstation', id=i)
    param = get_subject_info_wmConfidence(sub)  #_baselined
    for name in contrasts:
        data[name].append(
            mne.read_evokeds(fname=op.join(
                param['path'], 'glms', 'feedback', 'epochs_glm' +
                str(glmnum), 'wmc_' + param['subid'] + '_feedbacklocked_tl_' +
                name + '_betas-ave.fif'))[0])
        data_t[name].append(
            mne.read_evokeds(fname=op.join(
                param['path'], 'glms', 'feedback', 'epochs_glm' +
                str(glmnum), 'wmc_' + param['subid'] + '_feedbacklocked_tl_' +
                name + '_tstats-ave.fif'))[0])

#drop right mastoid from literally everything here lol its not useful anymore
for cope in data.keys():
    for i in range(subs.size):