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

making PSF candidates should be simpler

    XMLWordPrintable

Details

    • 2

    Description

      The code to make PSF candidates is too complicated and repeated in too many places (even after DM-5532). Every time lsst.meas.algorithms.makePsfCandidate is called (except in a few tests) it is called as follows:

                  cand = measAlg.makePsfCandidate(source, mi)
                  if cand.getWidth() == 0:
                      cand.setBorderWidth(borderWidth)
                      cand.setWidth(kernelSize + 2*borderWidth)
                      cand.setHeight(kernelSize + 2*borderWidth)
       
                  im = cand.getMaskedImage().getImage()
                  max = afwMath.makeStatistics(im, afwMath.MAX).getValue()
                  if not numpy.isfinite(max):
                      continue
      

      This should to be centralized somewhere. I suggest adding this code to meas.algorithms.makePsfCandidate itself (which could delegate some work to a private function, if desired).

      Attachments

        Issue Links

          Activity

            No builds found.
            rowen Russell Owen created issue -
            rowen Russell Owen made changes -
            Field Original Value New Value
            Link This issue relates to DM-5532 [ DM-5532 ]
            rowen Russell Owen made changes -
            Link This issue relates to DM-5680 [ DM-5680 ]
            Parejkoj John Parejko made changes -
            Link This issue relates to RFC-477 [ RFC-477 ]
            rowen Russell Owen made changes -
            Remote Link This issue links to "Page (Confluence)" [ 17028 ]
            swinbank John Swinbank made changes -
            Link This issue relates to DM-19155 [ DM-19155 ]
            tjenness Tim Jenness made changes -
            Remote Link This issue links to "Page (Confluence)" [ 35335 ]
            jbosch Jim Bosch made changes -
            Link This issue duplicates DM-14102 [ DM-14102 ]
            jbosch Jim Bosch added a comment -

            I'm closing this as a duplicate of DM-14102, which seems to have moved this oft-duplicated code block into a new MakePsfCandidateTask.

            jbosch Jim Bosch added a comment - I'm closing this as a duplicate of DM-14102 , which seems to have moved this oft-duplicated code block into a new MakePsfCandidateTask .
            jbosch Jim Bosch made changes -
            Resolution Done [ 10000 ]
            Status To Do [ 10001 ] Invalid [ 11005 ]

            People

              Unassigned Unassigned
              rowen Russell Owen
              Jim Bosch, Russell Owen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.