Applying the mosaic solution to each visit/CCD data

We (unofficially) offer two commands, calibrateExposure.py and calibrateCatalog.py, to apply the wcs and flux scale determined by jointcal.py and fgcm.

Note

In many science cases where only coadd images and catalogs are needed, this process is no longer necessary. Flux and WCS calibrations are applied in the cooadding process, so those who do science with cooaded images can skip this step. Only if you would like to see each CCD image/catalog precisely, do this process after skyCorrection.py or jointcal.py or fgcm. Currently (Nov. 2019), there are some defects in outputs of calibrateExposure.py and calibrateCatalog.py .

Use calibrateExposure.py to apply the solution found with mosaic.py to CORR images.

Because in the default setting this task does ``global sky subtraction’‘, please execute this command after skyCorrection.py. Also, in the default setting, this task uses WCS information from jointcal results and flux information from fgcm.

ex1) Default: WCS from jointcal, flux from fgcm, and w/ global sky subtraction

# Applying the solution to the visit/CCD images
# Directory for reduction is ~/HSC, and rerun name is test
calibrateExposure.py ~/HSC --calib ~HSC/CALIB --rerun test --id field=NGC604 tract=0 ccd=0..8^10..103 --batch-type=smp --cores=8 --clobber-config --clobber-versions

# calibrateExposure.py [data reduction directory] --calib [calib directory]  --rerun [rerun name] --id [field, tract, visit, ccd] --batch-type=[smp or pbs] --cores=[NofThreads]
# Options
#       --id : In the example, the input data is selected as a combination of field, tract and ccd. You can also use the combination of visit and ccd.
#       --cores : in batch-type=smp, specify the number if threads

ex2) Both WCS and flux from jointcal, and w/o global sky subtraction (you can execute before skyCorrection)

# Applying the solution to the visit/CCD images
# Directory for reduction is ~/HSC, and rerun name is test
calibrateExposure.py ~/HSC --calib ~HSC/CALIB --rerun test --id field=NGC604 tract=0 ccd=0..8^10..103 **--config externalPhotoCalibName=jointcal doApplySkyCorr=False** --batch-type=smp --cores=8 --clobber-config --clobber-versions

Then you find calibrated images named 、~/HSC/rerun/[rerun]/calibrated/[tract]/[pointing]/[filter]/CALEXP-[visit]-[ccd].fits.

Use calibrateCatalog.py to apply the mosaic.py’s solution to SRC catalogs.

# Applying the solution to catalogs.
# Directory for reduction is ~/HSC, and rerun name is test
calibrateCatalog.py ~/HSC --calib ~/HSC/CALIB --rerun test --id field=NGC604 tract=0 ccd=0..8^10..103 --batch-type=smp --cores=8 --clobber-config --clobber-versions

# calibrateCatalog.py [data reduction directory] --calib [calib directory] --rerun [rerun name] --id [field, tract, visit, ccd] --batch-type=[smp or pbs] --cores=[NofThreads]
# Options
#       --id : Same as calibrateExposure.py, you can also use the combination of visit and ccd.
#       --cores : in batch-type=smp, specify the number if threads
#      --config externalPhotoCalibName : flux scale from jointcal or fgcm? (default=fgcm)
#      --config doApplySkyCorr : w/ or w/o global sky subtraction (default=True)

The calibrated catalogs are 、~/HSC/rerun/[rerun]/calibrated/[tract]/[pointing]/[filter]/CALSRC-[visit]-[ccd].fits.