pro closematch ;Purpose: to determine the visual distribution of galaxies and quasars by ;plotting their "Ra" and "Dec" coordinates and by showing which ;background galaxies are within a certain quasar's radius. ;data must be obtained from an external source ;must use close_match_radec program within this program to run ;redshift determines which galaxies are more distant than its matched quasar ;Calling Sequence: closematch !p.background = !black window,0,xsize=900,ysize=700 quasar='~/Data/QSO25.csv' c=read_csv(quasar) qra=c.field1 qdec=c.field2 qz=c.field3 galaxy='~/Data/Galaxy25.csv' e=read_csv(galaxy) gra=e.field1 gdec=e.field2 gz=e.field7 ra1 = qra ra2 = gra dec1 = qdec dec2 = gdec ep = .1 allow = 1000L close_match_radec,ra1,dec1,ra2,dec2,m1,m2,ep,allow,miss1,silent=silent dist=sphdist(ra1[m1],dec1[m1],ra2[m2],dec2[m2],/deg) w = where(qz[m1] lt gz[m2] and dist gt 4e-9) ;s = where(gz[m2] gt qz[m1]) m1 = m1[w] m2 = m2[w] plot,ra2,dec2,psym=1,color=!white,yr=[1.12,1.32],xtit='Right Ascension',ytit='Declination',xr=[200.8,201],/xst,/yst oplot,ra1[m1],dec1[m1],psym=7,color=!blue oplot,ra2[m2],dec2[m2],psym=3,color=!red rad = .1 tvcircle,rad,qra,qdec,color=!orange,/data tvcircle,.001,ra2[m2],dec2[m2],color=!red,/data,fill=1 ;tvcircle,.001,ra2,dec2,color=!white,/data,/fill return end