Exemplo n.º 1
0
        rmi=gal.field('mag_r') - gal.field('mag_i')
        rmiErr=np.sqrt(gal.field('magerr_r')**2+gal.field('magerr_i')**2)
        imz=gal.field('mag_i') - gal.field('mag_z')
        imzErr=np.sqrt(gal.field('magerr_i')**2+gal.field('magerr_z')**2)

    #----g - r color -----
    pl.figure(figsize=(15,5))
    pl.subplot(1,3,1)
    idx_gr = z < 0.4
    resGR = ecgmmRidgeZbin(z=z,color=gmr,colorErr=gmrErr,mag=mag)
    color = resGR[2]
    redshift = resGR[9]
    sgm0 = resGR[4]
    sgm1 = resGR[6]
    zz = np.arange(0.05,0.5,0.1)
    bp.bin_scatter(redshift,color,binsize=0.05,fmt='bo',label='measurement')
    pl.plot(zz,zgmr(zz),'r-',label='color model')
    if galtype == 'truth':
        pl.title('DES Mock '+version+' : Truth')
    else:
        pl.title('DES Mock'+version+': Obs Catalog')
    pl.legend(loc='best')
    pl.xlabel('redshift')
    pl.ylabel('Ridgeline Color: g-r')

    # --- r - i color -------
    pl.subplot(1,3,2)
    idx_ri = (photoz_c >= 0.4)*(photoz_c < 0.75 )
    resRI= ecgmmRidge(ra_c=ra_c, dec_c=dec_c,photoz_c=photoz_c,r200_c=r200_c,ra=ra, dec=dec,color=rmi,colorErr=rmiErr,mag=mag,candidateIdx=idx_ri)
    color = resRI[2]
    redshift = resRI[9]
Exemplo n.º 2
0
        rmi=gal.field('mag_model_r') - gal.field('mag_model_i')
        rmiErr=np.sqrt(gal.field('magerr_model_r')**2+gal.field('magerr_model_i')**2)
        imz=gal.field('mag_model_i') - gal.field('mag_model_z')
        imzErr=np.sqrt(gal.field('magerr_model_i')**2+gal.field('magerr_model_z')**2)

#----g - r color -----
    pl.figure(figsize=(15,5))
    pl.subplot(1,3,1)
    idx_gr = photoz_c < 0.4
    resGR= ecgmmRidge(ra_c=ra_c, dec_c=dec_c,photoz_c=photoz_c,r200_c=r200_c,ra=ra, dec=dec,color=gmr,colorErr=gmrErr,mag=mag,candidateIdx=idx_gr)
    color = resGR[2]
    redshift = resGR[9]
    sgm0 = resGR[4]
    sgm1 = resGR[6]
    zz = np.arange(0.05,0.5,0.1)
    bp.bin_scatter(redshift,color,binsize=0.05,fmt='bo',label='measurement')
    pl.plot(zz,zgmr(zz),'r-',label='color model')
    if galtype == 'input':
        pl.title('DC6B: Input catalog')
    else:
        pl.title('DC6B: Output catalog')
    pl.legend(loc='best')
    pl.xlabel('redshift')
    pl.ylabel('Ridgeline Color: g-r')

# --- r - i color -------
    pl.subplot(1,3,2)
    idx_ri = (photoz_c >= 0.4)*(photoz_c < 0.75 )
    resRI= ecgmmRidge(ra_c=ra_c, dec_c=dec_c,photoz_c=photoz_c,r200_c=r200_c,ra=ra, dec=dec,color=rmi,colorErr=rmiErr,mag=mag,candidateIdx=idx_ri)
    color = resRI[2]
    redshift = resRI[9]
Exemplo n.º 3
0
    return 0



b=np.genfromtxt('r50_whk_whkrms_phi_fwhm_nonwindowed.txt')
ok = b[:,1] != -999.
b = b[ok,:]
r50 = b[:,0]
fwhm = b[:,4]

pl.figure(figsize=(18,6))
pl.subplot(1,3,1)
pl.plot(fwhm,r50,'b.')
pl.xlabel('FWHM [arcsec]')
pl.ylabel('R50 [arcsec]')
bp.bin_scatter(fwhm,r50,nbins=15,fmt='ro')
res = linefit(fwhm,r50)
pl.plot(np.array([0.6,2.5]),res[0]+res[1]*np.array([0.6,2.5]),'r-')
pl.grid()
pl.xlim(0.6,2.5)
pl.ylim(0.4,1.4)
pl.title('R50 ='+str(round(res[1],4))+'*FWHM + ' + str(round(res[0],4)))

low = fwhm <= 0.9
high = fwhm >= 1

pl.subplot(1,3,2)
pl.plot(fwhm[low],r50[low],'b.')
pl.xlabel('FWHM [arcsec]')
pl.ylabel('R50 [arcsec]')
bp.bin_scatter(fwhm[low],r50[low],nbins=8,fmt='ro')
Exemplo n.º 4
0
imz = np.concatenate((bg0.field('omag')[:,2]-bg0.field('omag')[:,3],bg1.field('omag')[:,2]-bg1.field('omag')[:,3],bg2.field('omag')[:,2]-bg2.field('omag')[:,3],bg3.field('omag')[:,2]-bg3.field('omag')[:,3]))

zmy = np.concatenate((bg0.field('omag')[:,3]-bg0.field('omag')[:,4],bg1.field('omag')[:,3]-bg1.field('omag')[:,4],bg2.field('omag')[:,3]-bg2.field('omag')[:,4],bg3.field('omag')[:,3]-bg3.field('omag')[:,4]))

z = np.concatenate((bg0.field('z'), bg1.field('z'),bg2.field('z'),bg3.field('z')))

idxgr = z < 0.4
idxri = (z >=0.4) * (z <0.75)
idxiz = (z >= 0.75) * (z< 1.15)
idxzy = z >= 1.15

pl.figure(figsize=(14,10))
pl.subplot(2,2,1)
resgmr = np.polyfit(z[idxgr],gmr[idxgr],1)
pl.plot(z[idxgr],gmr[idxgr],'b.',alpha=0.5)
bp.bin_scatter(z[idxgr],gmr[idxgr],binsize = 0.05,fmt = 'ro',scatter=True)
pl.plot(z[idxgr],np.polyval(resgmr,z[idxgr]),'r,')
pl.xlabel('z')
pl.ylabel('g - r')
pl.title('slope, intercept:'+str(resgmr))

pl.subplot(2,2,2)
resrmi = np.polyfit(z[idxri],rmi[idxri],1)
pl.plot(z[idxri],rmi[idxri],'b.',alpha=0.5)
bp.bin_scatter(z[idxri],rmi[idxri],binsize = 0.05,fmt = 'ro',scatter=True)
pl.plot(z[idxri],np.polyval(resrmi,z[idxri]),'r,')
pl.xlabel('z')
pl.ylabel('r - i')
pl.title('slope, intercept:'+str(resrmi))

pl.subplot(2,2,3)