本文整理汇总了Python中WLanalysis.peaks_list方法的典型用法代码示例。如果您正苦于以下问题:Python WLanalysis.peaks_list方法的具体用法?Python WLanalysis.peaks_list怎么用?Python WLanalysis.peaks_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WLanalysis
的用法示例。
在下文中一共展示了WLanalysis.peaks_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: histogram
# 需要导入模块: import WLanalysis [as 别名]
# 或者: from WLanalysis import peaks_list [as 别名]
WLanalysis.writeFits(KS_45,KS_45_fn)
WLanalysis.writeFits(KS_rand,KS_rand_fn)
kappa_45 = KS_45.flatten()
std_45=std(kappa_45)
#hist_45,binedges45 = histogram(kappa_45,bins=100,range=(-5*std_45,5*std_45))
#savetxt(test_dir+'hist45_%i_%i.ls'%(i,sG),array([hist_45,binedges45[:-1]]).T)
kappa_rand = KS_rand.flatten()
#std_rand=std(kappa_rand)
#hist_rand,binedgesrand = histogram(kappa_rand,bins=100,range=(-5*std_rand,5*std_rand))
#savetxt(test_dir+'histrand_%i_%i.ls'%(i,sG),array([hist_rand,binedgesrand[:-1]]).T)
peaks_45 = WLanalysis.peaks_list(KS_45)
peaks_rand=WLanalysis.peaks_list(KS_rand)
figure(figsize=(6,8))
subplot(211)
hist(kappa_45,bins=20,range=(-3*std_45,3*std_45),histtype='step',label='45 deg')
hist(kappa_rand,bins=20,range=(-3*std_45,3*std_45),histtype='step',label='random')
title('PDF(top)/peaks(bottom) #%i, %.1f\''%(i,sG),fontsize=20)
#xlabel('kappa')
legend()
subplot(212)
hist(peaks_45,bins=20,range=(-3*std_45,3*std_45),histtype='step',label='45 deg')
hist(peaks_rand,bins=20,range=(-3*std_45,3*std_45),histtype='step',label='random')
#title('peaks')
xlabel('kappa',fontsize=20)
示例2: peaksGen
# 需要导入模块: import WLanalysis [as 别名]
# 或者: from WLanalysis import peaks_list [as 别名]
def peaksGen (kmap, peak_bins):
peaks = WLanalysis.peaks_list(kmap)
peaks_hist = histogram(peaks, bins=peak_bins)[0]
return peaks_hist