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

Give ModelPsfMatchTask ablilty to match to all PSF types

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw, ip_diffim
    • Labels:
      None
    • Templates:
    • Story Points:
      8
    • Sprint:
      DRP F17-2
    • Team:
      Data Release Production

      Description

      Ticket named " 'Psf' object has no attribute 'resized'" as filed.

      ModelPsfMatchTask calls Psf.resized, but that method is only defined for certain specialised Psf classes (SingleGaussianPsf and DoubleGaussianPsf). It should have a default implementation, and be defined for CoaddPsf.

       > python modelPsfMatchTask.py --template 'data/SDSSJ0920+0034/calexp-HSC-I-9564-7,3.fits' --science 'data/SDSSJ0920+0034/calexp-HSC-R-9564-7,3.fits'
       
      psfMatch INFO: compute Psf-matching kernel
      psfMatch INFO: Adjusting dimensions of reference PSF model from (43, 43) to (41, 41)
      Traceback (most recent call last):
        File "modelPsfMatchTask.py", line 160, in <module>
          run(args)
        File "modelPsfMatchTask.py", line 130, in run
          result = psfMatchTask.run(templateExp, scienceExp)
        File "modelPsfMatchTask.py", line 45, in run
          return ModelPsfMatchTask.run(self, scienceExp, templateExp.getPsf())
        File "/Users/aisun/anaconda/envs/lsst/opt/lsst/pipe_base/python/lsst/pipe/base/timer.py", line 121, in wrapper
          res = func(self, *args, **keyArgs)
        File "/Users/aisun/anaconda/envs/lsst/opt/lsst/ip_diffim/python/lsst/ip/diffim/modelPsfMatch.py", line 274, in run
          result = self._buildCellSet(exposure, referencePsfModel)
        File "/Users/aisun/anaconda/envs/lsst/opt/lsst/ip_diffim/python/lsst/ip/diffim/modelPsfMatch.py", line 388, in _buildCellSet
          referencePsfModel = referencePsfModel.resized(lenPsfScience, lenPsfScience)
        File "/Users/aisun/anaconda/envs/lsst/opt/lsst/afw/python/lsst/afw/detection/detectionLib.py", line 3745, in <lambda>
          __getattr__ = lambda self, name: _swig_getattr(self, Psf, name)
        File "/Users/aisun/anaconda/envs/lsst/opt/lsst/afw/python/lsst/afw/detection/detectionLib.py", line 89, in _swig_getattr
          raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
      AttributeError: 'Psf' object has no attribute 'resized'
      

      Bug reported by Ai-Lei Sun.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yusra Yusra AlSayyad
                Reporter:
                price Paul Price
                Reviewers:
                Pim Schellart [X] (Inactive)
                Watchers:
                Paul Price, Pim Schellart [X] (Inactive), Yusra AlSayyad
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel