当前位置: 首页>>代码示例>>Python>>正文


Python WLanalysis.peaks_mask_hist方法代码示例

本文整理汇总了Python中WLanalysis.peaks_mask_hist方法的典型用法代码示例。如果您正苦于以下问题:Python WLanalysis.peaks_mask_hist方法的具体用法?Python WLanalysis.peaks_mask_hist怎么用?Python WLanalysis.peaks_mask_hist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WLanalysis的用法示例。


在下文中一共展示了WLanalysis.peaks_mask_hist方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_pk

# 需要导入模块: import WLanalysis [as 别名]
# 或者: from WLanalysis import peaks_mask_hist [as 别名]
def create_pk (iiRcosmoSigma):
	'''grab KSmap, create 1, 1.8, 3.5, 5.7 peaks
	each time create 1000 realizations for specifice i, cosmo, sigmaG
	'''
	i, R, cosmo, sigmaG = iiRcosmoSigma
	kmap = KSmap_single(i, R, cosmo, sigmaG)
	idx = int(where(sigmaG_arr==sigmaG)[0])
	mask_all = mask_all_arr[idx]
	mask_bad = mask_bad_arr[idx]
	pspk_all = WLanalysis.peaks_mask_hist(kmap, mask_all, bins, kmin = kmin, kmax = kmax)
	pspk_bad = WLanalysis.peaks_mask_hist(kmap, mask_bad, bins, kmin = kmin, kmax = kmax)
	return pspk_all, pspk_bad
开发者ID:apetri,项目名称:CFHTLens_analysis,代码行数:14,代码来源:stampede_massSIM_noiseless.py

示例2: ips_pk_single

# 需要导入模块: import WLanalysis [as 别名]
# 或者: from WLanalysis import peaks_mask_hist [as 别名]
	def ips_pk_single (R):#, sigmaG, zg, bins):
		kmap = WLanalysis.readFits(KSsim_fn(i, cosmo, R, sigmaG, zg))
		if pk:#peaks
			mask = WLanalysis.readFits(Mask_fn(i, sigmaG))
			peaks_hist = WLanalysis.peaks_mask_hist(kmap, mask, bins, kmin=kmin, kmax=kmax)
			return peaks_hist
		else:#powspec
			ell_arr, powspec = WLanalysis.PowerSpectrum(kmap, sizedeg=12.0)
			return powspec
开发者ID:apetri,项目名称:CFHTLens_analysis,代码行数:11,代码来源:CosmoAnalysis.py

示例3: kmapPk_1sim

# 需要导入模块: import WLanalysis [as 别名]
# 或者: from WLanalysis import peaks_mask_hist [as 别名]
def kmapPk_1sim (r):
	print r,'1sim'
	k, s1, s2 = kappaGen_1sim(r)[:3]
	A, galn = WLanalysis.coords2grid(x, y, array([s1,s2]))
	Ms1,Ms2 = A
	s1_smooth = WLanalysis.weighted_smooth(Ms1, galn, PPA=PPA512, sigmaG=sigmaG)
	s2_smooth = WLanalysis.weighted_smooth(Ms1, galn, PPA=PPA512, sigmaG=sigmaG)
	kmap = WLanalysis.KSvw(s1_smooth, s2_smooth)
	pk = WLanalysis.peaks_mask_hist(kmap, mask, bins=25, kmin = -0.04, kmax = 0.12)
	return pk
开发者ID:apetri,项目名称:CFHTLens_analysis,代码行数:12,代码来源:stampede_noiseless.py

示例4: Psingle_CFHT

# 需要导入模块: import WLanalysis [as 别名]
# 或者: from WLanalysis import peaks_mask_hist [as 别名]
def Psingle_CFHT (i, sigmaG, bins, ps=0):
	if ps:
		fn = powspec_CFHT_fn(i, sigmaG)
	else:
		fn = peaks_CFHT_fn(i, sigmaG, bins)
	
	if os.path.isfile(fn):
		out = WLanalysis.readFits(fn)
	elif ps:
		kmap = WLanalysis.readFits(KSCFHT_fn(i, sigmaG))
		out = WLanalysis.PowerSpectrum(kmap, sizedeg=12.0)
		WLanalysis.writeFits(out,fn)
	else:
		kmap = WLanalysis.readFits(KSCFHT_fn(i, sigmaG))
		mask = WLanalysis.readFits(Mask_fn(i, sigmaG))
		out = WLanalysis.peaks_mask_hist(kmap, mask, bins, kmin=kmin, kmax=kmax)
		WLanalysis.writeFits(out,fn)
	return out
开发者ID:apetri,项目名称:CFHTLens_analysis,代码行数:20,代码来源:CosmoAnalysis.py

示例5: imshow

# 需要导入模块: import WLanalysis [as 别名]
# 或者: from WLanalysis import peaks_mask_hist [as 别名]
			
			if sigmaG == 0.5:
				imshow(kmap)
				savefig(plot_dir+'CFHT_KS_sigma05_subfield%02d_corrected.jpg'%(i))
				close()
			ps = WLanalysis.PowerSpectrum(kmap, sizedeg=12.0)
			
			ps_fn = CFHT_dir + 'CFHT_powspec_sigma%02d_subfield%02d.fits'%(sigmaG*10,i)
			
			try:
				WLanalysis.writeFits(ps, ps_fn)
			except Exception:
				print ps_fn
				pass
			for bins in (25, 40):
				pk = WLanalysis.peaks_mask_hist(kmap, mask, bins, kmin=kmin, kmax=kmax)
				pk_fn = CFHT_dir + 'CFHT_peaks_sigma%02d_subfield%02d_%03dbins.fits'%(sigmaG*10,i, bins)
				try:
					WLanalysis.writeFits(pk, pk_fn)
				except Exception:
					print pk_fn
					pass
		
	
	#for sf in (11,13):
		#kmap =WLanalysis.readFits( CFHT_dir+'CFHT_KS_sigma05_subfield%02d.fits'%(sf))
		#imshow(kmap)
		#title('subfield %i'%(sf))
		#savefig(plot_dir+'CFHT_KS_sigma05_subfield%02d.jpg'%(sf))
		#close()
	
开发者ID:apetri,项目名称:CFHTLens_analysis,代码行数:32,代码来源:CFHTplot.py


注:本文中的WLanalysis.peaks_mask_hist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。