Can I warp an Exposure if I know the polynomial I want to apply?

The current warp code works nicely, but it assumes that the interface is two Exposures (or (Image, Wcs) tuple) and warps one to the other.

Yasuda-san here at IPMU is looking at dipoles in his SNe difference imaging which uses the LSST ip_diffim code. The astrometry isn’t quite good enough, so he’d like to

  1. Solve for the relative astrometry between two coadds
  2. Warp one onto the other

Is there an easy way to do this? It could clearly be done by transforming the polynomial to a TAN-SIP Wcs, but that’s painful.

Looks like it’s impossible. I thought there was at least a way to warp an image via an XYTransform (though we don’t have a polynomial XYTransform at present), but even that doesn’t exist. It clearly should.

I agree this should be directly supported, but it is not. For now, I suggest the following hack:

  • Create a plain TAN WCS (an instance of TanWcs with no distortion terms)
  • Convert one to a DistortedTanWcs by adding the desired XYTransform
  • You now have a pair of WCS that can be used to provide the desired transform

I filed https://jira.lsstcorp.org/browse/DM-4162