Coadding¶
Using corrected wcs and flux scale file, hscPipe warps images to the SkyMap coordinate system (warp), and combines all images together (coadd). It can be done by coaddDriver.py. The warp is carried out with wcs determination files produced in mosaic.py as the initial process in coaddDriver.py. As the second process, the correction of flux scale of each [visit, ccd] using flux scale files and coadd process are progressed. In order to reduce satellite tails, ghosts, and cosmic rays, outliers are clipped and coadd images are computed as a weighted average of each CCD image. Finally, catalog files are produced after sky subtraction (4096 x 4096 pixels mesh). In the coadd processing, the CCD images which failed to fit a PSF model are removed.
To execute coaddDriver.py, the batch system is available.
# Directory for reduction is ~/HSC and rerun name test
# In case of using local system,
coaddDriver.py ~/HSC --rerun test --id filter=HSC-G tract=0 --selectId visit=18214..18220:2^18224..18230:2 ccd=0..103 --batch-type=smp --cores=8
# coaddDriver.py [data reduction directory] --rerun [rerun name] --id filter=[filter] tract=[tract] --selectId [visit, field, filter]
# Options
# --id: Specify the filter and tract name for output data.
# --selecteId: Select visits to coadd. You can also select field and filter name.
The default threshold of detection is set to 5σ. You can change this value with the option –config detectCoaddSources.detection.thresholdValue.
The created images are summarized below;
- warp image: ~/HSC/rerun/[rerun]/deepCoadd/[filter]/[tract]/[patch]/warp-[filter]-[tract]-[patch]-[visit].fits
- coadd image: ~/HSC/rerun/[rerun]/deepCoadd-results/[filter]/[tract]/[patch]/calexp-[filter]-[tract]-[patch].fits
- sky background image: ~/HSC/rerun/[rerun]/deepCoadd-results/[filter]/[tract]/[patch]/det_bkgd-[filter]-[tract]-[patch].fits
Figure 1 shows warp and coadd images at a certain patch. The coadd image includes a mask image as well as CORR files.
When you see all [patch]/calexp data in the one window, use ds9 with -mosaic option (figure 2).
# Display all coadd images in one window with ds9
cd ~/HSC/rerun/[rerun]/deepCoadd-results/[filter]/[tract]/[patch]
ds9 -mosaic wcs */calexp-*.fits
# The ds9 calibrates a scale of coadd images in all field of views with Scale > Scope > Global bottum.
The detected objects are listed in the following catalog;
- Detected object catalog: ~/HSC/rerun/[rerun]/deepCoadd-results/[filter]/[tract]/[patch]/det-[filter]-[tract]-[patch].fits
The measuement of each object has not been done in this step.
Warning
When the warp images already exist, the process of coaddDriver.py does not overwrite. So if you create new coadd images from the same data, you have to move or remove the old data.