The TAN_PIXELS cameraGeom coordinate system is presently defined to match PIXELS at the center of each CCD. This was a mistake on my part and I'd like to correct it. TAN_PIXELS was intended to model the effects of optical distortion, and to do so in a straightforward way TAN_PIXELS should match PIXELS at the optical axis (origin of the PUPIL frame).
Furthermore, TAN_PIXELS does not presently support rectangular pixels correctly (technically this is a misfeature, not a bug; it uses a mean pixel scale, and is documented as such). I propose to fix that, as well. With the proposed new definition of TAN_PIXELS the fix is trivial. Note that we do not yet have any cameras with rectangular pixels, so fixing this will not make any difference to current cameras.
One of the primary uses I intended for TAN_PIXELS was to provide a proper WCS given an initial TAN WCS. However, this is presently broken (
DM-6529) because of the incorrect definition of TAN_PIXELS. There are other ways to fix DM-6529, but changing the definition of TAN_PIXELS as proposed is a clean, simple solution, and the results will be easier to understand.
An implementation is available on afw tickets/
DM-2800 in case you want to try it out to see what difference it makes.