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

pipe_tasks/examples/calibrateTask.py fails

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: pipe_tasks
    • Labels:
      None

      Description

      The self contained example calibrateTask.py in pipe_tasks/examples/ fails when attempting to set field "coord" in refCat. Exact error message -

      11:04:19-vish~/lsst/pipe_tasks (u/lauren/DM-3693)$ examples/calibrateTask.py --ds9
      calibrate: installInitialPsf fwhm=5.40540540548 pixels; size=15 pixels
      calibrate.repair: Identified 7 cosmic rays.
      calibrate.detection: Detected 4 positive sources to 5 sigma.
      calibrate.detection: Resubtracting the background after object detection
      calibrate.initialMeasurement: Measuring 4 sources (4 parents, 0 children) 
      Traceback (most recent call last):
        File "examples/calibrateTask.py", line 150, in <module>
          run(display=args.ds9)
        File "examples/calibrateTask.py", line 119, in run
          result = calibrateTask.run(exposure)
        File "/home/vish/lsst/lsstsw/stack/Linux64/pipe_base/11.0-2-g8218aaa+5/python/lsst/pipe/base/timer.py", line 118, in wrapper
          res = func(self, *args, **keyArgs)
        File "/home/vish/lsst/pipe_tasks/python/lsst/pipe/tasks/calibrate.py", line 478, in run
          astromRet = self.astrometry.run(exposure, sources1)
        File "examples/calibrateTask.py", line 90, in run
          m.set("coord", wcs.pixelToSky(s.getCentroid()))
        File "/home/vish/lsst/lsstsw/stack/Linux64/afw/11.0-5-g97168e0+1/python/lsst/afw/table/tableLib.py", line 2372, in set
          self.set(self.schema.find(key).key, value)
        File "/home/vish/lsst/lsstsw/stack/Linux64/afw/11.0-5-g97168e0+1/python/lsst/afw/table/tableLib.py", line 1064, in find
          raise KeyError("Field '%s' not found in Schema." % k)
      KeyError: "Field 'coord' not found in Schema."
      

      Note that wcs.pixelToSky(s.getCentroid()) is set to Fk5Coord(15.007663073114244 * afwGeom.degrees, 1.0030133772819259 * afwGeom.degrees, 2000.0)

        Attachments

          Issue Links

            Activity

            Hide
            swinbank John Swinbank added a comment -

            I believe this is resolved in tickets/DM-4125 on pipe_tasks. I fixed a couple of other minor anachronisms in the example at the same time.

            Vishal Kasliwal [X], do you have time for a quick review?

            Show
            swinbank John Swinbank added a comment - I believe this is resolved in tickets/DM-4125 on pipe_tasks . I fixed a couple of other minor anachronisms in the example at the same time. Vishal Kasliwal [X] , do you have time for a quick review?
            Hide
            vpk24 Vishal Kasliwal [X] (Inactive) added a comment -

            Sure - I can get to it right after I finish my review for Lauren.

            Show
            vpk24 Vishal Kasliwal [X] (Inactive) added a comment - Sure - I can get to it right after I finish my review for Lauren.
            Hide
            vpk24 Vishal Kasliwal [X] (Inactive) added a comment -

            Review looks good. Thanks for the changes....

            Show
            vpk24 Vishal Kasliwal [X] (Inactive) added a comment - Review looks good. Thanks for the changes....
            Hide
            swinbank John Swinbank added a comment -

            Thanks; merged.

            Show
            swinbank John Swinbank added a comment - Thanks; merged.

              People

              • Assignee:
                swinbank John Swinbank
                Reporter:
                vpk24 Vishal Kasliwal [X] (Inactive)
                Reviewers:
                Vishal Kasliwal [X] (Inactive)
                Watchers:
                John Swinbank, Vishal Kasliwal [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: