-
Notifications
You must be signed in to change notification settings - Fork 0
Getting astrometry reference files
An important and sometimes difficult step of the data reduction task (processCcd.py) is the astrometry solving which requires a set of external catalogs. At the moment the most complete catalog available is based on SDSS DR9 and is available on the NCSA cluster in /lsst7/astrometry_net_data/sdss-dr9-fink-v5b. This is 53GB of data in 2823 files. This is also available at IN2P3 in : /sps/lsst/data/astrometry_net_data/sdss-dr9 (1440 files)
Such a large reference catalog may be difficult to handle on a laptop and it may be interesting to get only the subset corresponding to the region of interest. Assuming you know the (RA, DEC) coordinate of the image, you can pass the following command:
get-healpix -N8 214.9 -- 52.7 # "--" is optional in this case but mandatory for a negative declination value
Which will return:
(RA, DEC) = (214.9, 52.7) degrees
Healpix=165 in the XY scheme (bighp=2, x=4, y=5)
healpix=74 in the RING scheme (ringnum=6, longind=14)
healpix=178 in the NESTED scheme.
Healpix center is (217.5, 54.340912) degrees
Healpix is bounded by RA=[210, 225], Dec=[48.1412, 60.4344] degrees.
Healpix scale is 26384.5 arcsec.
The number "165" corresponding to the XY scheme is the id of files in the catalog. For the SDSS DR9 catalog we will have to transfer the following 3 files:
sdss-dr9-fink-v5b_and_165_0.fits
sdss-dr9-fink-v5b_and_165_1.fits
sdss-dr9-fink-v5b_and_165_2.fits
we then need to setup the configuration file andConfig.py in the following way:
cat > andConfig.py
filters = "ugriz"
root.magColumnMap = dict([(f,f) for f in filters])
root.magErrorColumnMap = dict([(f, f + '_err') for f in filters])
root.indexFiles = ["sdss-dr9-fink-v5b_and_165_0.fits",
"sdss-dr9-fink-v5b_and_165_1.fits",
"sdss-dr9-fink-v5b_and_165_2.fits",
]
^D
get-healpix is in the bin directory of the astrometry_net package which is coming with the DM stack distribution.
In order to check if there are reference stars in a catalog file, one can use the search-index utility:
search-index -r 214.9 -d 52.7 -R 0.14 /home/boutigny/CFHT/CFHT-Deep/sdss-dr9-fink-v5b_and_165_0.fits
Reading index "/home/boutigny/CFHT/CFHT-Deep/sdss-dr9-fink-v5b_and_165_0.fits"...
Index /home/boutigny/CFHT/CFHT-Deep/sdss-dr9-fink-v5b_and_165_0.fits: id 1650, healpix 165 (nside 8), 157146 stars, 626674 quads, dimquads=4, scales 2 to 2.8 arcmin.
Tag-along columns: u_err, g, z_err, i, thing_id, i_err, r_err, r, u, z, id, g_err
Searching for stars around RA,Dec (214.9, 52.7), radius 0.14 deg.
Found 185 stars
Once the catalog files are copied and the andConfig.py configured, we should declare this as a eups package. Assuming that we are in the directory where we have put the files:
eups declare -m none -r . astrometry_net_data -t your_userid
where your_userid is your userid on the computer that you are using
Then the package can be setup with:
setup astrometry_net_data -t your_userid