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

Update meas_mosaic's wcs/fcr output files to reflect LSST coordinate system

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_mosaic
    • Labels:
      None
    • Story Points:
      3
    • Epic Link:
    • Sprint:
      DRP S17-4, DRP S17-5
    • Team:
      Data Release Production

      Description

      When importing meas_mosaic, the coordinate system for writing out the wcs/fcr files was not adapted to that expected from LSST (which always associates the detector origin with the electronics, whereas HSC's is such that a given detector's origin, pixel (0, 0) is associated with its LLC w.r.t. to the focal plane), but rather the tasks in meas_mosaic's updateExposure.py were adapted to account for the rotated CCDs. It was assumed that this was the only place those corrections were every used. This turns out not to be the case since the wcs used to create the coadd gets attached to it in coaddInputs. If meas_mosaic was run and doApplyUberCal=True (which are both the case for our HSC data processing), the wcs’s that are getting attached to the coaddInputs are not in the coordinate system appropriate for LSST for any nQuarter != 0 ccds.

      Since this is already causing an issue in pipe_tasks's propogateVisitFlags.py, see issue highlighted in DM-9383, (and could very well be causing issues elsewhere as yet undiscovered), we have decided these outputs need to be written out in the coordinate system expected by LSST.

        Attachments

          Issue Links

            Activity

            Hide
            jbosch Jim Bosch added a comment -

            As we discussed yesterday, my plan is to put code to properly rotate a TanWcs with SIP terms in meas_astrom (since some of the machinery to do the work is already present there). I'll let you test that and plug it into meas_mosaic, and we can figure out how to refactor that code and deprecate the incomplete rotation code in afw on a future issue.

            Show
            jbosch Jim Bosch added a comment - As we discussed yesterday, my plan is to put code to properly rotate a TanWcs with SIP terms in meas_astrom (since some of the machinery to do the work is already present there). I'll let you test that and plug it into meas_mosaic, and we can figure out how to refactor that code and deprecate the incomplete rotation code in afw on a future issue.
            Hide
            lauren Lauren MacArthur added a comment -

            Sounds good. Let me know when you have something ready for testing & we can iterate if necessary.

            Show
            lauren Lauren MacArthur added a comment - Sounds good. Let me know when you have something ready for testing & we can iterate if necessary.
            Hide
            jbosch Jim Bosch added a comment -

            Lauren MacArthur, I think this is ready for you to try in meas_mosaic. You'll need u/jbosch/DM-9862 of afw and meas_astrom; those should build against w.2017.10 and you should only need to rebuild those two, not any other afw dependencies, as this shouldn't be ABI-breaking.

            The function you care about is lsst.meas.astrom.rotateWcsPixels(wcs, bbox, angle). It'll require a TanWcs, so you may need to use lsst.afw.image.TanWcs.cast(...) if you just have a regular Wcs.

            Show
            jbosch Jim Bosch added a comment - Lauren MacArthur , I think this is ready for you to try in meas_mosaic. You'll need u/jbosch/ DM-9862 of afw and meas_astrom; those should build against w.2017.10 and you should only need to rebuild those two, not any other afw dependencies, as this shouldn't be ABI-breaking. The function you care about is lsst.meas.astrom.rotateWcsPixels(wcs, bbox, angle) . It'll require a TanWcs , so you may need to use lsst.afw.image.TanWcs.cast(...) if you just have a regular Wcs .
            Hide
            jbosch Jim Bosch added a comment -

            Okay, this is once again (hopefully for the final time) ready for use in meas_mosaic, on u/jbosch/DM-9862 for w.2017.10 and tickets/DM-9862 for master. Once you've adapted meas_mosaic to use that, I'd like to launch jobs to test both now.

            Show
            jbosch Jim Bosch added a comment - Okay, this is once again (hopefully for the final time) ready for use in meas_mosaic, on u/jbosch/ DM-9862 for w.2017.10 and tickets/ DM-9862 for master. Once you've adapted meas_mosaic to use that, I'd like to launch jobs to test both now.
            Hide
            lauren Lauren MacArthur added a comment -

            Ok, I will do my initial test to check that it's working as expected and then will start the new runs of the RC dataset.

            Show
            lauren Lauren MacArthur added a comment - Ok, I will do my initial test to check that it's working as expected and then will start the new runs of the RC dataset.
            Hide
            jbosch Jim Bosch added a comment -

            This should probably have been reviewed and merged a while ago, but dual ownership, distractions, and the fact that it still leaves us in a broken state (fixed on DM-10236) got in the way.

            Branches to review are tickets/DM-9862 on each of afw, meas_astrom, and meas_mosaic. I'll make PRs and launch a Jenkins run shortly.

            Show
            jbosch Jim Bosch added a comment - This should probably have been reviewed and merged a while ago, but dual ownership, distractions, and the fact that it still leaves us in a broken state (fixed on DM-10236 ) got in the way. Branches to review are tickets/ DM-9862 on each of afw, meas_astrom, and meas_mosaic. I'll make PRs and launch a Jenkins run shortly.
            Hide
            rearmstr Bob Armstrong added a comment -

            Looks good. No comments.

            Show
            rearmstr Bob Armstrong added a comment - Looks good. No comments.
            Hide
            jbosch Jim Bosch added a comment -

            Merged to master.

            Show
            jbosch Jim Bosch added a comment - Merged to master.

              People

              Assignee:
              lauren Lauren MacArthur
              Reporter:
              lauren Lauren MacArthur
              Reviewers:
              Bob Armstrong
              Watchers:
              Bob Armstrong, Jim Bosch, John Swinbank, Lauren MacArthur, Paul Price
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.