本文整理匯總了Python中WLanalysis.corr_mat方法的典型用法代碼示例。如果您正苦於以下問題:Python WLanalysis.corr_mat方法的具體用法?Python WLanalysis.corr_mat怎麽用?Python WLanalysis.corr_mat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WLanalysis
的用法示例。
在下文中一共展示了WLanalysis.corr_mat方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: cov
# 需要導入模塊: import WLanalysis [as 別名]
# 或者: from WLanalysis import corr_mat [as 別名]
#cov_mat = cov(fidu_stats2,rowvar=0)
#corr_mat = WLanalysis.corr_mat(cov_mat)
#save(CMBNG_dir+'corr_mat.npy',corr_mat)
corr_mat=load(CMBNG_dir+'corr_mat.npy')
else:
filtered=0
fidu_stats77 = load(CMBlensing_dir+'Pkappa_gadget/noisy/%snoisy_z1100_stats77_fidu_kappa.npy'%(['','filtered_'][filtered]))
ps = fidu_stats77[:,:25]
ps = ps[:,~isnan(ps[0])][:,:20]
PDF = sum(fidu_stats77[:,25:125].reshape(-1,50,2),axis=-1)
peaks = fidu_stats77[:,125:]
all_stats = concatenate([ps,PDF,peaks],axis=1)
#fidu_stats77 = fidu_stats77[:,~isnan(fidu_stats77[0])]
cov_mat = cov(all_stats,rowvar=0)
corr_mat = WLanalysis.corr_mat(cov_mat)
from matplotlib.patches import FancyBboxPatch
fig=figure(figsize=(7,6))
ax=fig.add_subplot(111)
im=ax.imshow(corr_mat,origin='lower',interpolation='nearest',cmap='PuOr',vmax=0.1,vmin=-0.1)
cbar = fig.colorbar(im)
cbar.ax.tick_params(labelsize=16)
plt.xticks(fontsize=16)
plt.yticks(fontsize=16)
plt.subplots_adjust(top=0.88,bottom=0.12,right=0.92,left=0.07)
plt.tick_params(
axis='both', # changes apply to the x-axis
which='both', # both major and minor ticks are affected
bottom='off', # ticks along the bottom edge are off
top='off', # ticks along the top edge are off