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

Ensure WCS (and other Exposure components) are retrieved properly when loaded individually

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: obs_base
    • Labels:
      None

      Description

      It looks like <exposure>_wcs datasets are coming from the header (which may be an approximation) instead of the true WCS in the FITS binary tables.  Fix this, and add support for more components if it's easy to do so.

      Note that using the header was once thought to be necessary to do this efficiently, but in fact there's always been a trick to get anything out of the binary tables efficiently (due originally to Paul Price, I think): load a 1-pixel subimage of the exposure, and pull the component out of that.

      However, since DM-15500 we've had an ExposureFitsReader class that provides direct and efficient access to all of those components without that trick, and that's what we should use here.

        Attachments

          Issue Links

            Activity

            Hide
            Parejkoj John Parejko added a comment - - edited

            Ok, I updated it for Filter and VisitInfo. Calib is going away shortly (and was only ever persisted in the header), and Detector and BBox are more complicated, and can't be done in the trivial manner I used here.

            New Jenkins run: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/29525/pipeline

            Show
            Parejkoj John Parejko added a comment - - edited Ok, I updated it for Filter and VisitInfo . Calib is going away shortly (and was only ever persisted in the header), and Detector and BBox are more complicated, and can't be done in the trivial manner I used here. New Jenkins run: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/29525/pipeline
            Hide
            Parejkoj John Parejko added a comment -

            Nevermind: my vistInfo implementation also results in an error in obs_test (see latest Jenkins) during validation:

             E       TypeError: getVisitInfo() missing 2 required positional arguments: 'location' and 'dataId'
            

            Unless someone has a fix for this, I would rather revert and leave implementing the non-Wcs things to another ticket.

            Show
            Parejkoj John Parejko added a comment - Nevermind: my vistInfo implementation also results in an error in obs_test (see latest Jenkins) during validation: E TypeError: getVisitInfo() missing 2 required positional arguments: 'location' and 'dataId' Unless someone has a fix for this, I would rather revert and leave implementing the non-Wcs things to another ticket.
            Hide
            Parejkoj John Parejko added a comment -
            Show
            Parejkoj John Parejko added a comment - Tim found a fix, which fixes my local obs_test. New Jenkins: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/29526/pipeline
            Hide
            ktl Kian-Tat Lim added a comment -

            Looks fine to me.  It might be possible to factor out the commonality between these functions, but only at the expense of going back to a closure/lambda, I think, which would reduce debuggability.

            Show
            ktl Kian-Tat Lim added a comment - Looks fine to me.  It might be possible to factor out the commonality between these functions, but only at the expense of going back to a closure/lambda, I think, which would reduce debuggability.
            Hide
            Parejkoj John Parejko added a comment -

            Thank you for the review. I agree that it would be nicer to have a common way to handle this, but I don't see an obvious approach.

            Merged and done.

            Show
            Parejkoj John Parejko added a comment - Thank you for the review. I agree that it would be nicer to have a common way to handle this, but I don't see an obvious approach. Merged and done.

              People

              Assignee:
              Parejkoj John Parejko
              Reporter:
              jbosch Jim Bosch
              Reviewers:
              Kian-Tat Lim
              Watchers:
              Hsin-Fang Chiang, Jim Bosch, John Parejko, John Swinbank, Kian-Tat Lim, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.