Astrometry with the IPP
The following page reviews my process of extracting astrometry information from Megacam images
Image Injection
ipp_serial_inject.pl --telescope CFHT --camera MEGACAM --workdir /data/ipp035.0/beaumont/reduce.sa_98/ --label sa.98 -- dbname beaumont
Pantasks Macro File
I use the following macro file (named input) to control injection, camera, and chip reduction with Pantasks.
macro setup $MODULES:0 = /home/kiawe/eugene/src/panstarrs/ipp/ippTasks module pantasks.pro # $LABEL = prpics.20081216 # $POLLLIMIT = 100 add.database beaumont load.hosts end macro load.hosts controller host add ipp023 -threads 4 <etc etc> end macro check.books book list echo "" end macro register module register.pro end macro registerOn register.on end macro registerOff register.off end macro detrend module detrend.process.pro module detrend.stack.pro module detrend.norm.pro module detrend.resid.pro module detrend.reject.pro end macro chip module chip.pro end macro chipOn chip.on end macro chipOff chip.off end macro camera module camera.pro end macro cameraOn camera.on end macro cameraOff camera.off end
Then, in pantasks:
(ipp035:~/data) beaumont% pantasks inputno file /home/panstarrs/beaumont/.pantasksrc Welcome to pantasks - parallel task scheduler pantasks: input input pantasks: setup starting controller connection Connected HostID: 1 HostID: 2 HostID: 3 HostID: 4 HostID: 5 HostID: 6 HostID: 7 HostID: 8 HostID: 9 HostID: 10 HostID: 11 HostID: 12 HostID: 13 HostID: 14 pantasks: register pantasks: chip pantasks: camera pantasks: run pantasks: add.label sa.98
DVO Creation
The above commands produce the .smf files which can be injected into DVO. Adding images to a DVO database proceeds as follows:
<cd into working directory> set x = `ls */*.smf` # selects all smf files foreach a ($x) addstar -D CATDIR catdir.98 -D CAMERA megacam -update $a end
Running addstar with -update adds new entries to the end of the DVO database. This saves time, since the catalog need not be repeatedly resorted. At the end of this process, running addstar with -resort re-arranges the database so that measurements of common objects appear consecutively
addstar -D CATDIR catdir.98 -D CAMERA megacam -resort
Next, I ran relphot to populate the secfilt DVO table. Note that this probably does not produce very good photometry measurements; this is just a workaround so that relastro can access the information it needs from the secfilt tables.
relphot -D CATDIR catdir.98 -D CAMERA megacam -averages -update -D GRID_TOOFEW 10
Relastro
Relastro has several different modes. I iterated between two of them. Update-objects updates values in the AVERAGE DVO tables by taking the weighted mean of each object's measurements. Update-chips compares, on a chip-by-chip basis, the measured stellar positions to the average positions. It uses this information to update the astrometric solution (in essence, it resolves for the polynomial to map focal plane coordinates to sky coordinates):
relastro -D CATDIR catdir.98 -D CAMERA megacam -region 0 360 -2 2
-D RELASTRO_SIGMA_LIM .1 -update-objects +photflags -update
relastro -D CATDIR catdir.98 -D CAMERA megacam -region 0 360 -2 2
-D RELASTRO_SIGMA_LIM .05 -update-chips +photflags -update -instmag -12 -8
I found that repeating these commands 2-3 times converged on a stable solution.
Some options for relastro are summarized here. These can either be provided on the command line or in your camera's dvo.config file:
- RELASTRO_SIGMA_LIM
- If set and nonzero, than measurements with photometry errors larger than this value are not considered in the analysis
- RELASTRO_SRC_MEAS_TOOFEW
- If an object has this many detections or fewer, do not consider the object during the analysis. This is particularly effective at filtering out spurious measurements.
- +photflags
- During reduction, the IPP sets a number of quality flags. Those flags which correspond to problematic detections (e.g. saturation, cosmic rays, etc) can be excluded during relastro analysis by using this option. The specific bitmask defining which flags are problematic is listed in the Photcodes.dat DVO table as ASTROM_BAD_MASK
- instmag
- Set this to a range of instrumental magnitudes to consider. This can be used to filter out faint or saturated objects
Evaluating the Fit
There are several ways to ascertain whether relastro did a satisfactory job during fitting.
- Textual output from relastro
Relastro outputs lines like this to the terminal during --update-chips
image 3 : Nstars: 591 scatter limit: 0.826633 based on 403 detections; using 377 of 591 for fit scatter limit: 0.290518 based on 403 detections; using 376 of 591 for fit scatter limit: 0.288850 based on 403 detections; using 379 of 591 for fit
This says the following: For the third image (each chip is a separate "image"), there are 591 stars which pass all filtering criteria. By comparing these detections to each object's average position, the 3-sigma scatter is .826633 pixels. 377 detections have scatter less than this, and are being used to update the astrometry solution. This process repeats two more times, and the final 3-sigma scatter appears to be .289 pixels.
- DVO table values
The average (.cpt) dvo table has two fields -- RA_ERR and DEC_ERR -- which lists the positional uncertainty for each object (e.g. the error on the weighted mean of the measurements ~ rms/sqrtN). These values are updated each time relastro --update-objects is run. They are reported in arcseconds. These values can be extracted in DVO via the command
avextract ra dec dra ddec
The help information avextract --help fields seems to mislabel dra and ddec as being in degrees; I believe they are still arcseconds.
