Following on DM-31417, we can make proper HPX grid wcs projections to do the warping. As a proof-of-concept I have written a short script hips_test_warping_script.py
that combines the wcs objects from DM-31417 with the multi-tract template machinery from DM-29310 (specifically the run task in https://github.com/lsst/ip_diffim/blob/master/python/lsst/ip/diffim/getTemplate.py#L603 ). To make a proper task requires DM-13483 and adding healpix dimensions into the butler.
Note that the output of the test script are afw exposures and not proper HiPS images. However, the image plane from these afw exposures can be written to the proper path with a couple of extra header keywords and the correct filename to make a proper HiPS image without any further pixel modifications.
In the test script I take two neighboring i-band HSC RC2 patches and make one HPX exposure that completely overlaps one of the patches, and one HPX exposure that overlaps two neighboring patches. I then displayed these side-by-side in ds9 and matched scale and WCS. Note that due to the different projections (tangent and HPX) "blinking" does not work well. I drew circles at a few object locations and pasted these at matching positions to show that the mapping is correct.
Coadd and HPX image that is fully contained:
Coadd and HPX that falls over the edge (note that you can't obviously see the patch transition in the background of the HPX image, which is good):
Following on
that combines the wcs objects from
DM-31417, we can make proper HPX grid wcs projections to do the warping. As a proof-of-concept I have written a short script hips_test_warping_script.pyDM-31417with the multi-tract template machinery fromDM-29310(specifically the run task in https://github.com/lsst/ip_diffim/blob/master/python/lsst/ip/diffim/getTemplate.py#L603 ). To make a proper task requires DM-13483 and adding healpix dimensions into the butler.Note that the output of the test script are afw exposures and not proper HiPS images. However, the image plane from these afw exposures can be written to the proper path with a couple of extra header keywords and the correct filename to make a proper HiPS image without any further pixel modifications.
In the test script I take two neighboring i-band HSC RC2 patches and make one HPX exposure that completely overlaps one of the patches, and one HPX exposure that overlaps two neighboring patches. I then displayed these side-by-side in ds9 and matched scale and WCS. Note that due to the different projections (tangent and HPX) "blinking" does not work well. I drew circles at a few object locations and pasted these at matching positions to show that the mapping is correct.
Coadd and HPX image that is fully contained:
Coadd and HPX that falls over the edge (note that you can't obviously see the patch transition in the background of the HPX image, which is good):