def test_io_w():
    """Test IO for w files
    """
    w_fname = op.join(data_path, 'MEG', 'sample',
                      'sample_audvis-meg-oct-6-fwd-sensmap')

    src = SourceEstimate(w_fname)

    src.save('tmp', ftype='w')

    src2 = SourceEstimate('tmp-lh.w')

    assert_array_almost_equal(src.data, src2.data)
    assert_array_almost_equal(src.lh_vertno, src2.lh_vertno)
    assert_array_almost_equal(src.rh_vertno, src2.rh_vertno)
Example #2
0
    # Store a nice visualization of the cluster by summing across time (in ms)
    data = np.sign(data) * np.logical_not(data == 0) * data1.tstep
    data_summary[:, ii + 1] = 0.25e3 * np.sum(data, axis=1)

    # save as stc
for i, cluster_ind in enumerate(good_cluster_inds):
    v_inds = clusters[cluster_ind][1]
    t_inds = clusters[cluster_ind][0]
    data[v_inds, t_inds] = T_obs[t_inds, v_inds]

stc_cluster_vis = SourceEstimate(data,
                                 fsave_vertices,
                                 tmin=dataface.tmin,
                                 tstep=dataface.tstep)
stc_cluster_vis.save(
    '/neurospin/meg/meg_tmp/MTT_MEG_Baptiste/MEG/GROUP/plots/clusters/test_west_par'
)

########################################################################################"

# Implement gave variable
erfAAgave[s] = np.mean(erfAA_trial, axis=0)
erfAVgave[s] = np.mean(erfAV_trial, axis=0)
erfVAgave[s] = np.mean(erfVA_trial, axis=0)
erfVVgave[s] = np.mean(erfVV_trial, axis=0)

# Compute statistic between subjects
#threshold = 6.0
T_obs_Aon_inter, clusters_Aon_inter, cluster_p_values_Aon_inter, H0_Aon_inter = \
                permutation_cluster_test([erfAAgave, erfAVgave],
                            n_permutations=1000, threshold=None, tail=1,
Example #3
0
	data.fill(0)
	v_inds = clusters[cluster_ind][1]
	t_inds = clusters[cluster_ind][0]
	data[v_inds, t_inds] = T_obs[t_inds, v_inds]
	# Store a nice visualization of the cluster by summing across time (in ms)
	data = np.sign(data) * np.logical_not(data == 0) * dataface.tstep
	data_summary[:, ii + 1] = 1e3 * np.sum(data, axis=1)
		
	# save as stc
for i, cluster_ind in enumerate(good_cluster_inds):
	v_inds = clusters[cluster_ind][1]
	t_inds = clusters[cluster_ind][0]
	data[v_inds, t_inds] = T_obs[t_inds, v_inds]
	
stc_cluster_vis = SourceEstimate(data, fsave_vertices, tmin=dataface.tmin, tstep=dataface.tstep)
stc_cluster_vis.save('/neurospin/meg/meg_tmp/ResonanceMeg_Baptiste_2009/MEG/inter_subject/processed/STC_face_vs_house_clust')

########################################################################################"



# Implement gave variable
erfAAgave[s] = np.mean(erfAA_trial,axis=0)
erfAVgave[s] = np.mean(erfAV_trial,axis=0)
erfVAgave[s] = np.mean(erfVA_trial,axis=0)
erfVVgave[s] = np.mean(erfVV_trial,axis=0)

# Compute statistic between subjects
#threshold = 6.0
T_obs_Aon_inter, clusters_Aon_inter, cluster_p_values_Aon_inter, H0_Aon_inter = \
                permutation_cluster_test([erfAAgave, erfAVgave],