overlap_lh = scan1_lh[:] * scan2_lh[:]
overlap_rh = scan1_rh[:] * scan2_rh[:]

###

###
# Plot overlap

import code

sw0 = SurfWrap()
sw0.set_underlay()
sw0.set_options()
sw0.min = 0
sw0.max = 2
sw0.sign = "pos"
oprefix = path.join(odir, "E_global_easythresh_surface_overlap")
sw0.set_output(oprefix)

scan1_surfs = {"lh": scan1_lh, "rh": scan1_rh}
scan2_surfs = {"lh": scan2_lh, "rh": scan2_rh}
overlap_surfs = {"lh": overlap_lh, "rh": overlap_rh}

#code.interact(local=locals())

for hemi in sw0.hemis:
    print "visualize %s" % hemi

    # Bring up the beauty (the underlay)
    brain = Brain(sw0.subject_id, hemi, sw0.surf, \
                  config_opts=sw0.config_opts, \
    # Overlap top 15% between mdmr and glm
    lh_overlap = (lh_cwas_perc>0)*1 + (lh_glm_perc>0)*2
    rh_overlap = (rh_cwas_perc>0)*1 + (rh_glm_perc>0)*2

    ###


    ###
    # Plot top percentiles

    print "plot percentiles"

    sw0 = SurfWrap(hemis=['lh'])
    sw0.set_underlay()
    sw0.set_options()
    sw0.min = 1; sw0.max = 3; sw0.sign = "pos"
    oprefix = op.join(figdir, "B_surface_percentiles")
    sw0.set_output(oprefix)

    cwas_perc_surfs = {"lh": lh_cwas_perc}
    glm_perc_surfs  = {"lh": lh_glm_perc}
    overlap_surfs   = {"lh": lh_overlap}

    for hemi in sw0.hemis:
        print "visualize %s" % hemi
    
        ## MDMR
        #oprefix = op.join(figdir, "B_%s_percentiles_mdmr" % scans[i])
        #sw0.set_output(oprefix)
        #
        #brain = Brain(sw0.subject_id, hemi, sw0.surf, \
示例#3
0
scan2_lh[scan2_lh>dmin] = 2
scan2_rh[scan2_rh>dmin] = 2

# Overlap
overlap_lh = scan1_lh[:] * scan2_lh[:]
overlap_rh = scan1_rh[:] * scan2_rh[:]

###

###
# Plot overlap

sw0 = SurfWrap()
sw0.set_underlay()
sw0.set_options()
sw0.min = 1; sw0.max = 2; sw0.sign = "pos"
oprefix = path.join(odir, "D_perms_surface_overlap")
sw0.set_output(oprefix)

scan1_surfs     = {"lh": scan1_lh, "rh": scan1_rh}
scan2_surfs     = {"lh": scan2_lh, "rh": scan2_rh}
overlap_surfs   = {"lh": overlap_lh, "rh": overlap_rh}

for hemi in sw0.hemis:
    print "visualize %s" % hemi
    
    # Bring up the beauty (the underlay)
    brain = Brain(sw0.subject_id, hemi, sw0.surf, \
                  config_opts=sw0.config_opts, \
                  subjects_dir=sw0.subjects_dir)
    
overlap_lh = scan1_lh[:] * scan2_lh[:]
overlap_rh = scan1_rh[:] * scan2_rh[:]

###

###
# Plot overlap

import code

sw0 = SurfWrap()
sw0.set_underlay()
sw0.set_options()
sw0.min = 0
sw0.max = 2
sw0.sign = "pos"
oprefix = path.join(odir, "E_global_easythresh_surface_overlap")
sw0.set_output(oprefix)

scan1_surfs = {"lh": scan1_lh, "rh": scan1_rh}
scan2_surfs = {"lh": scan2_lh, "rh": scan2_rh}
overlap_surfs = {"lh": overlap_lh, "rh": overlap_rh}

# code.interact(local=locals())

for hemi in sw0.hemis:
    print "visualize %s" % hemi

    # Bring up the beauty (the underlay)
    brain = Brain(sw0.subject_id, hemi, sw0.surf, config_opts=sw0.config_opts, subjects_dir=sw0.subjects_dir)