Status: Won't Fix
Fix Version/s: None
The tan-sip fitter in meas_astrom (lsst.meas.astrom.sip.makeCreateWcsWithSip) seems to fit poorly with significant distortion and for high order SIP.
Perhaps the simplest way to see this is to modify the existing test testCreateWcsWithSip.py to use higher orders and/or more distortion.
However, I have also attached sample code (partly based on that test) that shows the problem in more detail. The points it fits are uniformly distributed over a grid in the effective bbox, and so can be as dense as desired in order to provide enough information to fit to high order.
- The sample code requires the current master of afw, since it uses DistortedTanWcs.
- I observe that fitting a pure TAN WCS succeeds with order 3 and 4, but fails with order 5
- I observe that fitting an offset radial distortion fails mildly at order 3 and spectacularly at orders 5 and 6
- The code continues even after a test fails, in order to show how badly the higher-order SIP polynomials fail. Hence it claims to succeed at the end, even though tests failed.
- The sample code uses crpix=15000, 4000 to emulate a CCD that is far from the center of the field. The fit bbox is centered on that crpix. Nonetheless, one issue may be that TAN-SIP WCS (or at least our fitter) cannot handle such a large crpix.