print " %s" % c

	i = 0
	for f in filt_list:
		print "\n Filt set:",f
		
		file = folder_name + file_name + f + '_' + sample + flag + '.bpz' 

		zt, zp, od = np.loadtxt(file,usecols= (zt_col, zp_col, od_col), unpack = True)
		dz = (zp - zt) / (1 + zt)
		dz_all = np.copy(dz)
		
		_, X = np.loadtxt(file, usecols= (0, col_list[c]), unpack = True)
		X_all = np.copy(X)

		od = tls.od_renorm(od)
		od = tls.od2eff(od)

		mask = (od > 0.5)
		dz = dz[mask]
		X = X[mask]
		print 'Completness=', 100*float(len(X))/float(len(X_all))
		
		print len(dz), len(dz_all)

		dz_bin = pztls.binsplit(dz, X, binning[c])
		dz_bin_all = pztls.binsplit(dz_all, X_all, binning[c])
		k = 0
		for e in estim_list:
			print "    %s" % e
			
예제 #2
0
	N_mpix = len(mpix2hpix)
	print "N_mpix =", N_mpix

	#Generating jacknife map conversion..............
	jk_hmap = hp.ud_grade(mask_hmap, nside_jk)
	jkhpix2jkmpix = idmaskmap(jk_hmap)
	jkmpix2jkhpix = np.nonzero(jk_hmap)[0]
	N_jkmpix = len(jkmpix2jkhpix)
	print "N_jkpix =", len(jk_hmap)
	print "N_jkmpix =", N_jkmpix

	cat['p']['val']['mpix'] = hpix2mpix[cat['p']['val']['hpix']]

for i in cat: 
	#cat[i]['val']['od'] = odrescal(cat[i]['val']['od'], od_range)
	cat[i]['val']['od'] = tls.od_renorm(cat[i]['val']['od'], od_min = od_range[0])

od_cut = tls.od_cut(cat['s']['val']['od'], eff_cut)

if(cat_list['s'] == True): 

	#Generating Nz....................................
	#if not os.path.exists('./Nz'):
	#	os.makedirs('./Nz')
	
	mycolors = tls.spectral(n_od, 0.2,1.)
	for bin in zbin:
		c = 0
		for od in od_cut:
			mask = cut(bin, od, cat['s']['val']['zp'], cat['s']['val']['od'])		
예제 #3
0
#Template rescaling.........
#cat_all['type'] -= 1 
#cat_all['type'] *= 10 

print "Catalog information:\n"

for i in col_list:
	print "\n" + i + " min =", cat_all[i].min()
	print i + " max =", cat_all[i].max()

zt_all, zp_all, od_all = np.loadtxt(file_path,usecols= (zt_col, zp_col, od_col), unpack = True)

if (error == 'True'): od_all = pztls.err2od(od_all)

od_all = tls.od_renorm(od_all)
od_all = tls.od2eff(od_all)

od_cut = eff_cut
#od_cut = tls.od_cut(od_all, eff_cut)

print "\nCatalog analysis:"

n_od = len(od_cut)
#mycolors = tls.spectral(n_od, 0.0, 1.0)
cmap = plt.cm.get_cmap(name='jet')
i_od = 0
for o in od_cut:
	print "\nodds>",o

	cat = {}