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

Error trying to load subregion of coadd

    Details

    • Type: Bug
    • Status: Won't Fix
    • Priority: Undefined
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Templates:
    • Team:
      Data Release Production

      Description

      I am trying to load a subregion of a coadd exposure (in order to get the coadd info without having to read in all the pixels), and Paul Price suggested I do the following:

      import lsst.afw.geom
      import lsst.afw.image
      from lsst.daf.persistence.butler import Butler
       
      rerun = '/datasets/hsc/repo/rerun/RC/w_2017_42/DM-12212/'
      butler = Butler(rerun)
       
      dataId = dict(tract=9813, filter='HSC-Z', patch='1,1')
      dataId.update(bbox=lsst.afw.geom.Box2I(lsst.afw.geom.Point2I(0, 0), lsst.afw.geom.Extent2I(1, 1)),
                                imageOrigin=lsst.afw.image.LOCAL)
       
      coadd = butler.get('deepCoadd_calexp_sub', **dataId)
      

      However, doing so gives a TypeError:

      CameraMapper INFO: Loading exposure registry from /datasets/hsc/repo/registry.sqlite3
      CameraMapper INFO: Loading calib registry from /datasets/hsc/repo/CALIB/calibRegistry.sqlite3
      CameraMapper INFO: Loading Posix calib registry from /datasets/hsc/repo/rerun/RC/w_2017_42/DM-12212
      Traceback (most recent call last):
        File "test_sub.py", line 12, in <module>
          coadd = butler.get('deepCoadd_calexp_sub', **dataId)
        File "/software/lsstsw/stack/Linux64/daf_persistence/13.0-41-g024c5b6+2/python/lsst/daf/persistence/butler.py", line 1376, in get
          location = self._locate(datasetType, dataId, write=False)
        File "/software/lsstsw/stack/Linux64/daf_persistence/13.0-41-g024c5b6+2/python/lsst/daf/persistence/butler.py", line 1297, in _locate
          location = repoData.repo.map(datasetType, dataId, write=write)
        File "/software/lsstsw/stack/Linux64/daf_persistence/13.0-41-g024c5b6+2/python/lsst/daf/persistence/repository.py", line 246, in map
          loc = self._mapper.map(*args, **kwargs)
        File "/software/lsstsw/stack/Linux64/obs_subaru/13.0-49-gcb35f37b+11/python/lsst/obs/hsc/hscMapper.py", line 184, in map
          location = super(HscMapper, self).map(datasetType, copyId, write=write)
        File "/software/lsstsw/stack/Linux64/daf_persistence/13.0-41-g024c5b6+2/python/lsst/daf/persistence/mapper.py", line 166, in map
          return func(self.validate(dataId), write)
        File "/software/lsstsw/stack/Linux64/obs_base/13.0-55-gb064ced+10/python/lsst/obs/base/cameraMapper.py", line 468, in mapSubClosure
          loc = mapping.map(mapper, subId, write)
        File "/software/lsstsw/stack/Linux64/obs_base/13.0-55-gb064ced+10/python/lsst/obs/base/mapping.py", line 175, in map
          additionalData=additionalData)
        File "/software/lsstsw/stack/Linux64/daf_persistence/13.0-41-g024c5b6+2/python/lsst/daf/persistence/butlerLocation.py", line 217, in __init__
          self.additionalData.set(k, v)
        File "/software/lsstsw/stack/Linux64/daf_base/13.0-5-g99bcfa4+11/python/lsst/daf/base/propertyContainer/propertyContainerContinued.py", line 193, in set
          return _propertyContainerSet(self, name, value, self._typeMenu)
        File "/software/lsstsw/stack/Linux64/daf_base/13.0-5-g99bcfa4+11/python/lsst/daf/base/propertyContainer/propertyContainerContinued.py", line 135, in _propertyContainerSet
          raise lsst.pex.exceptions.TypeError("Unknown value type for %s: %s" % (name, t))
      lsst.pex.exceptions.wrappers.TypeError: Unknown value type for imageOrigin: <class 'lsst.afw.image.image.image.ImageOrigin'>
      

      Is this a residual pybind11 bug?

        Attachments

          Container Issues

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tmorton Tim Morton
                Watchers:
                Jim Bosch, John Swinbank, Paul Price, Pim Schellart [X] (Inactive), Tim Morton, Yusra AlSayyad
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel