Simultaneous astrometry with jointcal - LSSTDESC/ReprocessingTaskForce GitHub Wiki
The jointcal package allows to simultaneously fit an astrometric solution on a set of overlapping images plus an external reference catalog. jointcal is using the WCS from the calibrated exposures (calexp) computed by the processCcd task and is producing a set of updated WCS which can in turn be used as input for image coaddition.
Installing joincal
We need to install jointcal itself and its interface to the sparse matrix algebra package cholmod - jointcal_cholmod
cd some_directory/my_packages
git clone https://github.com/lsst/jointcal.git
git clone https://github.com/lsst/jointcal_cholmod.git
cd jointcal_cholmod
setup -k -r .
scons opt=3
eups declare -r . -t your_username
cd ../jointcal
setup -k -r .
scons opt=3
eups declare -r . -t your_username
setup jointcal -t your_username
Running jointcal
jointcal.py output --output output/coadd_dir @filter.list --config sourceFluxField="base_CircularApertureFlux_17_0"
where the sourceFluxField configuration parameter corresponds to one of the aperture photometry available in the calexp source catalog and filter.list contains the list of visits to be considered for a given filter.
jointcal is automatically running on every visit/ccd entering in a given tract and present in the filter.list file. A different set of updated WCS will be generated for each tract and will be persisted through the butler mechanisms.
Co-adding using the WCS genetrated by jointcal
jointcalCoadd.py output --output output/coadd_dir @patch.list @filter.list --configfile jointcalCoaddConfig.py
where jointcalCoaddConfig.py contains the following configuration parameters:
config.bgSubtracted=True
config.doApplyUberCal=True
filter.list contains the list of visits to be taken into account for a given filter (--id visit=xxxxx) and @patch.list contains the list of patches to be coadded (--id filter=a tract=x patch=y,z)
jointcalCoadd.py has the exact same functionality as makeCoaddTempExp, the only difference is that it is using the WCS computed by jointcal.py