#plt.ticklabel_format(style='sci', axis='y', scilimits=(0,0))
plt.xlim(xmin = 100, xmax = 0)
plt.axhline(val_req['bias'], lw = 0.5, ls = 'solid', color = 'black')
plt.ylabel(estim_label['bias'])
plt.ylim(ymin = -val_max['bias'], ymax = val_max['bias'])
plt.yticks(ytick['bias'])
plt.grid()

ax = plt.subplot(gs1[1])
i = 0
for o in od_cut:

	mask = od > o 	

	sig68 = pztls.Sigma68(dz[mask])
	err_sig68 = pztls.errsigma68(dz[mask])
	plt.errorbar(eff[i], 100 * sig68, 100 * err_sig68, c = cmap(tls.cmapind(eff_cut[i], eff_lim, id_lim)), mec = cmap(tls.cmapind(eff_cut[i], eff_lim, id_lim)), markersize = 3, fmt = 'o')
	i += 1

plt.setp( ax.get_xticklabels(), visible=False)
ax.yaxis.set_major_locator(MaxNLocator(prune = 'both'))
plt.ylabel(estim_label['sigma'])
plt.xlim(xmin = 100, xmax = 0)
plt.ylim(ymin = 0., ymax = val_max['sigma'])
plt.yticks(ytick['sigma'])
plt.axhline(val_req['sigma'], lw = 0.5, ls = 'solid', color = 'black')
plt.grid()

ax = plt.subplot(gs1[2])
i = 0
for o in od_cut:
Beispiel #2
0
mycolors = tools.spectral(n_od, 0.2, 1.0)
i_od = 0
for o in od_cut:
	print "\nodds>",o

	cat = {}

	dz_all = cat_all['redshift'] - zt_all
	#dz_all = (cat_all['redshift'] - zt_all) / (1 + cat_all['redshift'])

	mask = od_all > o 	
	dz = dz_all[mask]
	

	sigma68_all = tls.Sigma68(dz)
	errsigma68_all = tls.errsigma68(dz)
	bias_all = tls.Median(dz)
	errbias_all = tls.errmedian(dz)
	comp_all, errcomp1_all, errcomp2_all = tls.Completeness(0,len(dz),len(dz_all))
	out_frac_all, errout_frac1_all, errout_frac2_all = tls.out_fract(dz, sigma68_all, 3)

	print "\nResults using the entire catalog:"
	print "Sigma68 = %.5f +/- %.5f" %(sigma68_all,errsigma68_all)
	print "Bias = %.5f +/- %.5f" %(bias_all,errbias_all)
	print "Completeness = %.5f +%.5f/-%.5f" %(comp_all, errcomp1_all, errcomp2_all)
	print "Outliers fraction = %.5f +%.5f/-%.5f\n" %(out_frac_all, errout_frac1_all, errout_frac2_all)
	print "Generation of plots...\n"

	
	i = 1
	for l in col_list: