Friday, May 27, 2011

Randoms for CFHT Galaxies

Spent the last couple days making the randoms for the CFHT galaxies. Here is how it's done:
; 1) Go to Analysis directory:
/home/jessica/repository/ccpzcalib/Jessica/qsobias/Analysis/

; 2) Make randoms for each pointing:
listfile = '/clusterfs/riemann/data/jessica/alexieData/se_cats/se_list.txt'
mask_dir='/clusterfs/riemann/data/jessica/alexieData/masks/'
infile = '/clusterfs/riemann/data/jessica/alexieData/Catalogs/cs82_all_cat1.fits'
random_dir = '/clusterfs/riemann/data/jessica/alexieData/randoms/'
make_randoms,infile,outfile,mask_dir,random_dir,listfile

; 3) Remove randoms not in mask, combine to single file
dir = '/clusterfs/riemann/data/jessica/alexieData/randoms/'
listfile = '/clusterfs/riemann/data/jessica/alexieData/se_cats/se_list.txt'
outfile = '/clusterfs/riemann/data/jessica/alexieData/Catalogs/random_catalog.fits'
fix_randoms,dir,listfile,outfile

; 4) Remove overlaping regions
infile = '/clusterfs/riemann/data/jessica/alexieData/Catalogs/random_catalog.fits'
outfile = '/clusterfs/riemann/data/jessica/alexieData/Catalogs/random_catalog_no_overlaps.fits'
ra_list = '/home/jessica/repository/ccpzcalib/Jessica/qsobias/Analysis/S82.ra_cuts'
se_list_file = '/clusterfs/riemann/data/jessica/alexieData/se_cats/se_list.txt'
remove_overlaps,infile,outfile,se_list_file,ra_list

Here are some plots from DS9, blue circles are randoms that are kept, and red circles are randoms that are masked out. The green and yellow regions are masked regions:



The randoms are made at a density of 7.5*10D^5 per square degree. This is approximately 10X the density of the data.

No comments:

Post a Comment