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

makeWcs() chokes on decam images in 10.1

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw, obs_decam
    • Labels:
      None

      Description

      In 10.0, processCcdDecam.py could process decam images to completion (whether the WCS was read correctly is a different question). Now it fails on makeWcs() (see traceback below), and I suspect this change in behavior is related to DM-2883 and DM-2967.

      Repository with both data and code to reproduce:
      http://www.astro.washington.edu/users/yusra/reproduce/reproduceMakeWcsErr.tar.gz
      (apologies for the size)

      The attachment is a document describing the WCS representation in the images from the community pipeline, courtesy of Francisco Forster.

      Please advise. This ticket captures any changes made to afw.

      D-108-179-166-118:decam yusra$ processCcdDecam.py newTestRepo/ --id visit=0232847 ccdnum=10 --config calibrate.doPhotoCal=False calibrate.doAstrometry=False calibrate.measurePsf.starSelector.name="secondMoment" doWriteCalibrateMatches=False --clobber-config
      : Loading config overrride file '/Users/yusra/lsst_devel/LSST/repos/obs_decam_ya/config/processCcdDecam.py'
      : Config override file does not exist: '/Users/yusra/lsst_devel/LSST/repos/obs_decam_ya/config/decam/processCcdDecam.py'
      : input=/Users/yusra/decam/newTestRepo
      : calib=None
      : output=None
      CameraMapper: Loading registry registry from /Users/yusra/decam/newTestRepo/registry.sqlite3
      processCcdDecam: Processing {'visit': 232847, 'ccdnum': 10}
      makeWcs WARNING: Stripping PVi_j keys from projection RA---TPV/DEC--TPV
      processCcdDecam FATAL: Failed on dataId={'visit': 232847, 'ccdnum': 10}: 
        File "src/image/Wcs.cc", line 130, in void lsst::afw::image::Wcs::_initWcs()
          Failed to setup wcs structure with wcsset. Status 5: Invalid parameter value {0}
      lsst::pex::exceptions::RuntimeError: 'Failed to setup wcs structure with wcsset. Status 5: Invalid parameter value'
       
      Traceback (most recent call last):
        File "/Users/yusra/lsst_devel/LSST/DMS5/DarwinX86/pipe_base/10.1-3-g18c2ba7+49/python/lsst/pipe/base/cmdLineTask.py", line 320, in __call__
          result = task.run(dataRef, **kwargs)
        File "/Users/yusra/lsst_devel/LSST/DMS5/DarwinX86/pipe_base/10.1-3-g18c2ba7+49/python/lsst/pipe/base/timer.py", line 118, in wrapper
          res = func(self, *args, **keyArgs)
        File "/Users/yusra/lsst_devel/LSST/repos/obs_decam_ya/python/lsst/obs/decam/processCcdDecam.py", line 77, in run
          mi = exp.getMaskedImage()
        File "/Users/yusra/lsst_devel/LSST/DMS5/DarwinX86/daf_persistence/10.1-1-g6edbc00+28/python/lsst/daf/persistence/readProxy.py", line 41, in __getattribute__
          subject = oga(self, '__subject__')
        File "/Users/yusra/lsst_devel/LSST/DMS5/DarwinX86/daf_persistence/10.1-1-g6edbc00+28/python/lsst/daf/persistence/readProxy.py", line 136, in __subject__
          set_cache(self, get_callback(self)())
        File "/Users/yusra/lsst_devel/LSST/DMS5/DarwinX86/daf_persistence/10.1-1-g6edbc00+28/python/lsst/daf/persistence/butler.py", line 242, in <lambda>
          innerCallback(), dataId)
        File "/Users/yusra/lsst_devel/LSST/DMS5/DarwinX86/daf_persistence/10.1-1-g6edbc00+28/python/lsst/daf/persistence/butler.py", line 236, in <lambda>
          location, dataId)
        File "/Users/yusra/lsst_devel/LSST/repos/obs_decam_ya/python/lsst/obs/decam/decamMapper.py", line 118, in bypass_instcal
          wcs         = afwImage.makeWcs(md)
        File "/Users/yusra/lsst_devel/LSST/DMS5/DarwinX86/afw/10.1-26-g9124caf+1/python/lsst/afw/image/imageLib.py", line 8706, in makeWcs
          return _imageLib.makeWcs(*args)
      RuntimeError: 
        File "src/image/Wcs.cc", line 130, in void lsst::afw::image::Wcs::_initWcs()
          Failed to setup wcs structure with wcsset. Status 5: Invalid parameter value {0}
      lsst::pex::exceptions::RuntimeError: 'Failed to setup wcs structure with wcsset. Status 5: Invalid parameter value'
      

        Attachments

          Issue Links

            Activity

            Hide
            rhl Robert Lupton added a comment -

            I pushed a fix to tickets/DM-3196

            The cleanup to the TPV headers was over-zealous and caused problems for PTF as well as DECam. I've verified that this branch works with PTF and am pulling the DECam example from this ticket, but if someone would like to check at UW that would be OK with me...

            Show
            rhl Robert Lupton added a comment - I pushed a fix to tickets/ DM-3196 The cleanup to the TPV headers was over-zealous and caused problems for PTF as well as DECam. I've verified that this branch works with PTF and am pulling the DECam example from this ticket, but if someone would like to check at UW that would be OK with me...
            Hide
            rhl Robert Lupton added a comment -

            OK, I have that tarball downloaded and I still see the problem. I take back the review request...

            Show
            rhl Robert Lupton added a comment - OK, I have that tarball downloaded and I still see the problem. I take back the review request...
            Hide
            rhl Robert Lupton added a comment -

            Let's try again. I have pushed a patch that successfully processes PTF data and works with the tarball that you attached to this ticket.

            $ git push
            [...]
            To git@github.com:lsst/afw
               2cc2aaf..7ccd5fb  tickets/DM-3196 -> tickets/DM-3196
            $ git diff --stat origin/master
             src/image/makeWcs.cc | 18 ++++++++----------
             1 file changed, 8 insertions(+), 10 deletions(-)
            

            Show
            rhl Robert Lupton added a comment - Let's try again. I have pushed a patch that successfully processes PTF data and works with the tarball that you attached to this ticket. $ git push [...] To git@github.com:lsst/afw 2cc2aaf..7ccd5fb tickets/DM-3196 -> tickets/DM-3196 $ git diff --stat origin/master src/image/makeWcs.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
            Hide
            yusra Yusra AlSayyad added a comment -

            OK to merge.

            Show
            yusra Yusra AlSayyad added a comment - OK to merge.
            Hide
            rhl Robert Lupton added a comment - - edited

            Merged to master and pushed

            (that took too many edits!)

            Show
            rhl Robert Lupton added a comment - - edited Merged to master and pushed (that took too many edits!)

              People

              • Assignee:
                rhl Robert Lupton
                Reporter:
                yusra Yusra AlSayyad
                Reviewers:
                Yusra AlSayyad
                Watchers:
                Colin Slater, David Nidever [X] (Inactive), Hsin-Fang Chiang, John Swinbank, Kian-Tat Lim, Robert Lupton, Russell Owen, Simon Krughoff, Tim Jenness, Yusra AlSayyad
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel