Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-13564

astshim fails to write SIP terms to FITS metadata for rotated TAN-SIP WCS

    Details

      Description

      The SkyWcs version of lsst.meas.astrom.rotateWcsPixelsBy90 on DM-10765 works by inserting a pixel transform at the start of the transform chain. That is simple and robust. However, it means that AST does not know how to write the result out to FITS metadata as a TAN-SIP WCS.

      One obvious alternative is to rotate the WCS the same way the old code did: by extracting the SIP terms, rotating them and creating a new WCS. The problem with that approach is that it is specific to TAN-SIP WCS and it relies on AST's ability to reliably write out TAN-SIP. If AST fails to do that for some reason (e.g. DM-13539) then the rotated WCS will not operate as expected.

      I think the long-range alternative (if we still need to rotate WCS after fitting them with meas_mosaic or jointcal) is to rotate the WCS as mentioned at the beginning, then fit a SIP to that when writing FITS metadata, as enabled by DM-13065. However, I hope we can deal with that after merging DM-10765.

      For now I am not sure what to do. I have asked David Berry if he has an suggestion, but I think it is a stretch to expect AST to be able to recognize the rotated WCS as TAN-SIP for purpose of writing FITS-WCS header cards.

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment -

            We have decided not to try to fix this. There are no good clean fixes and the need is short term. jointcal will not rotate TAN-SIP WCS and if RFC-450 is adopted then even meas_mosaic will no longer need this.

            Show
            rowen Russell Owen added a comment - We have decided not to try to fix this. There are no good clean fixes and the need is short term. jointcal will not rotate TAN-SIP WCS and if RFC-450 is adopted then even meas_mosaic will no longer need this.

              People

              • Assignee:
                rowen Russell Owen
                Reporter:
                rowen Russell Owen
                Watchers:
                Jim Bosch, Lauren MacArthur, Russell Owen, Yusra AlSayyad
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel