r_objSel=[4, 5, 6] l_earlyVent=[14, 15, 16] l_earlyDors=[19, 20, 21] l_parietal=[ 22, 23, 24] l_objSel=[ 17, 18] print 'Early Ventral rois: '+ str(roiNames[r_earlyVent]) + str(roiNames[l_earlyVent]) print 'Early Dorsal rois: ' + str(roiNames[r_earlyDors])+ str(roiNames[l_earlyDors]) print 'Parietal rois: '+ str(roiNames[r_parietal]) +str(roiNames[l_parietal]) print 'Object rois: '+ str(roiNames[r_objSel])+ str(roiNames[l_objSel]) networkAvg= corrAll_t# Correlation (corrAll_t) or coherence (coherAll_t) analType='Correlation' # Get network averages r_earlyVentCoher=getNetworkWithin(networkAvg, r_earlyVent) r_earlyDorsCoher=getNetworkWithin(networkAvg, r_earlyDors) r_parietalCoher=getNetworkWithin(networkAvg, r_parietal) r_objSelCoher=getNetworkWithin(networkAvg, r_objSel) l_earlyVentCoher=getNetworkWithin(networkAvg, l_earlyVent) l_earlyDorsCoher=getNetworkWithin(networkAvg, l_earlyDors) l_parietalCoher=getNetworkWithin(networkAvg, l_parietal) l_objSelCoher=getNetworkWithin(networkAvg, l_objSel) #Average over last two dimensions.... r_earlyVentCoher_mean=stats.nanmean(r_earlyVentCoher.reshape([numRuns,len(r_earlyVent)*len(r_earlyVent)]), axis=1) r_earlyDorsCoher_mean=stats.nanmean(r_earlyDorsCoher.reshape([numRuns,len(r_earlyDors)*len(r_earlyDors)]), axis=1) r_parietalCoher_mean=stats.nanmean(r_parietalCoher.reshape([numRuns,len(r_parietal)*len(r_parietal)]), axis=1) r_objSelCoher_mean=stats.nanmean(r_objSelCoher.reshape([numRuns,len(r_objSel)*len(r_objSel)]), axis=1) l_earlyVentCoher_mean=stats.nanmean(l_earlyVentCoher.reshape([numRuns,len(l_earlyVent)*len(l_earlyVent)]), axis=1) l_earlyDorsCoher_mean=stats.nanmean(l_earlyDorsCoher.reshape([numRuns,len(l_earlyDors)*len(l_earlyDors)]), axis=1)
#dorsal=[ 'L_V3A_0.25', 'L_MT_al_.5_0.25', 'L_IPS0_0.25', 'L_IPS1_0.25', 'L_IPS2_0.25', 'L_IPS3_0.25', 'L_IPS4_0.25', 'L_IPS5_0.25'] #dorsal=['R_V3A_0.25', 'R_MT_al_.5_0.25', 'R_IPS0_0.25', 'R_IPS1_0.25', 'R_IPS2_0.25', 'R_IPS3_0.25', 'R_IPS4_0.25', 'R_IPS5_0.25', # 'L_V3A_0.25', 'L_MT_al_.5_0.25', 'L_IPS0_0.25', 'L_IPS1_0.25', 'L_IPS2_0.25', 'L_IPS3_0.25', 'L_IPS4_0.25', 'L_IPS5_0.25'] ventralIndx=np.where(np.in1d(roiNames, ventral))[0] dorsalIndx=np.where(np.in1d(roiNames, dorsal))[0] print 'Ventral rois: '+ str(roiNames[ventralIndx]) print 'Dorsal rois: ' + str(roiNames[dorsalIndx]) # Do Network analysis networkAvg= corrAll_t # Correlation (corrAll_t) or coherence (coherAll_t) analType='Correlation' # Get network averages ventCoher=getNetworkWithin(networkAvg, ventralIndx) dorsCoher=getNetworkWithin(networkAvg, dorsalIndx) #Average over last two dimensions.... ventCoher_mean=stats.nanmean(ventCoher.reshape([numRuns,len(ventralIndx)*len(ventralIndx)]), axis=1) dorsCoher_mean=stats.nanmean(dorsCoher.reshape([numRuns,len(dorsalIndx)*len(dorsalIndx)]), axis=1) #Correlation means and STDs across all RUNs correlation/coherence values. allMeansWithin= (stats.nanmean(ventCoher_mean), stats.nanmean(dorsCoher_mean)) allSTDWithin=(stats.nanstd(ventCoher_mean), stats.nanstd(dorsCoher_mean)) ###### # Get network btw #Early Visual EVbtwAllavg, EVbtwAllstd=getNetworkMeansBtw(networkAvg, ventralIndx, [dorsalIndx], numRuns)
ventralLHIndx=np.where(np.in1d(roiNames, ventralLH))[0] dorsalRHIndx=np.where(np.in1d(roiNames, dorsalRH))[0] dorsalLHIndx=np.where(np.in1d(roiNames, dorsalLH))[0] print 'Ventral RH rois: '+ str(roiNames[ventralRHIndx]) print 'Ventral LH rois: '+ str(roiNames[ventralLHIndx]) print 'Dorsal RH rois: ' + str(roiNames[dorsalRHIndx]) print 'Dorsal LH rois: ' + str(roiNames[dorsalLHIndx]) # Do Network analysis networkAvg= corrAll_t # Correlation (corrAll_t) or coherence (coherAll_t) allNetworkAvg[condition[ii]]=networkAvg analType='Correlation' # Get network averages ventCoherRH=getNetworkWithin(networkAvg, ventralRHIndx) ventCoherLH=getNetworkWithin(networkAvg, ventralLHIndx) dorsCoherRH=getNetworkWithin(networkAvg, dorsalRHIndx) dorsCoherLH=getNetworkWithin(networkAvg, dorsalLHIndx) #Average over last two dimensions.... ventCoherRH_mean=stats.nanmean(ventCoherRH.reshape([numRuns,len(ventralRHIndx)*len(ventralRHIndx)]), axis=1) dorsCoherRH_mean=stats.nanmean(dorsCoherRH.reshape([numRuns,len(dorsalRHIndx)*len(dorsalRHIndx)]), axis=1) ventCoherLH_mean=stats.nanmean(ventCoherLH.reshape([numRuns,len(ventralLHIndx)*len(ventralLHIndx)]), axis=1) dorsCoherLH_mean=stats.nanmean(dorsCoherLH.reshape([numRuns,len(dorsalLHIndx)*len(dorsalLHIndx)]), axis=1) #Correlation means and STDs across all RUNs correlation/coherence values. allMeansWithin= (stats.nanmean(ventCoherRH_mean), stats.nanmean(ventCoherLH_mean), stats.nanmean(dorsCoherRH_mean), stats.nanmean(dorsCoherLH_mean)) allSTDWithin=(stats.nanstd(ventCoherRH_mean), stats.nanstd(ventCoherLH_mean), stats.nanstd(dorsCoherRH_mean), stats.nanstd(dorsCoherLH_mean)) ######
#Define the streams earlyVent=[1, 2, 3, 14, 15, 16] earlyDors=[7, 8, 9, 19, 20, 21] parietal=[10, 11, 12, 22, 23, 24] objSel=[4, 5, 6, 17, 18] print 'Early Ventral rois: '+ str(roiNames[earlyVent]) print 'Early Dorsal rois: ' + str(roiNames[earlyDors]) print 'Parietal rois: '+ str(roiNames[parietal]) print 'Object rois: '+ str(roiNames[objSel]) networkAvg= coherAll_t# Correlation (corrAll_t) or coherence (coherAll_t) analType='Coherence' # Get network averages earlyVentCoher=getNetworkWithin(networkAvg, earlyVent) earlyDorsCoher=getNetworkWithin(networkAvg, earlyDors) parietalCoher=getNetworkWithin(networkAvg, parietal) objSelCoher=getNetworkWithin(networkAvg, objSel) #Average over last two dimensions.... earlyVentCoher_mean=stats.nanmean(earlyVentCoher.reshape([numRuns,len(earlyVent)*len(earlyVent)]), axis=1) earlyDorsCoher_mean=stats.nanmean(earlyDorsCoher.reshape([numRuns,len(earlyDors)*len(earlyDors)]), axis=1) parietalCoher_mean=stats.nanmean(parietalCoher.reshape([numRuns,len(parietal)*len(parietal)]), axis=1) objSelCoher_mean=stats.nanmean(objSelCoher.reshape([numRuns,len(objSel)*len(objSel)]), axis=1) #Correlation means and STDs across all RUNs correlation/coherence values. allMeansWithin= (stats.nanmean(earlyVentCoher_mean), stats.nanmean(earlyDorsCoher_mean), stats.nanmean(parietalCoher_mean), stats.nanmean(objSelCoher_mean)) allSTDWithin=(stats.nanstd(earlyVentCoher_mean), stats.nanstd(earlyDorsCoher_mean), stats.nanstd(parietalCoher_mean), stats.nanstd(objSelCoher_mean))