Beispiel #1
0
#time_lbls = ["144_362ms", "144_217ms", "226_362ms"]
#time_intervals = np.array([[145, 362], [145, 217], [226, 362]])

time_lbls = ["144_362ms"]
time_intervals = np.array([[145, 362]])

#time_lbls = ["144_217ms", "226_362ms"]
#time_intervals = np.array([[145, 217], [226, 362]])

### code

stc_test = mne.read_source_estimate(
    data_path.format(subjects[0], "passive1", words[0], integ_ms))

time_intervals_inds = calc_time_indices(
    time_intervals,
    data_path.format(subjects[0], "passive1", words[0], integ_ms), integ_ms)

for t, time_interval in enumerate(time_intervals):

    print('calulations performed in  ', time_lbls[t])

    sub_cos_sw = np.zeros((len(subjects), n_voxels))
    sub_cos_sd = np.zeros((len(subjects), n_voxels))

    for subject_idx, subject in enumerate(subjects):

        print("\n\t({:2}/{:2}) processing {}\n".format(subject_idx + 1,
                                                       len(subjects), subject))

        #		S1, W2, D2 = calc_s1_w2_d2(subject, time_intervals_inds[t])
Beispiel #2
0
#difference = ["dW", "dD"]
difference = ["passive1", "passive2"]


## !! change for only one long interval 0-600
time_lbls = ['144_217ms','226_362ms','144_362ms']# list for 5 ms 
time_intervals = np.array([[145, 217], [226, 362], [145, 362]]) 



###code

# stc initialization
stc_test = mne.read_source_estimate(data_path.format(subjects[0], difference[0], words[0]))

time_intervals_inds = calc_time_indices(time_intervals, data_path.format(subjects[0], difference[0], words[0]), integ_ms)


for t, time_lbl in enumerate(time_lbls):
#print("\n({:2}/{:2}) time_cut {}\n".format(t+1, len(time_lbls), time_lbl))
	
	t_min = int(time_lbl[0:3])	
		
	for d, difference_type in enumerate(difference):	
			
		w_per_sub = np.zeros(shape=(len(subjects), stc_test.data.shape[0]))
		d_per_sub = np.zeros(shape=(len(subjects), stc_test.data.shape[0]))

		for subject_idx, subject in enumerate(subjects):
			print("\n({:2}/{:2}) sub {}\n".format(subject_idx+1, len(subjects), subject))