當前位置: 首頁>>代碼示例>>Python>>正文


Python WLanalysis.peaks_list方法代碼示例

本文整理匯總了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)
開發者ID:apetri,項目名稱:CFHTLens_analysis,代碼行數:33,代碼來源:test_galaxy_orientation.py

示例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
開發者ID:apetri,項目名稱:CFHTLens_analysis,代碼行數:6,代碼來源:stampede_CMBnonGaussian.py


注:本文中的WLanalysis.peaks_list方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。