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

Bug fix: convolve science image in image differencing

    Details

    • Templates:
    • Story Points:
      1
    • Sprint:
      AP F19-2
    • Team:
      Alert Production

      Description

      The option convolveTemplate=False in image differencing is broken: it convolves the science image instead of the template as intended, but it then subtracts the convolved science image from the science image instead of from the template. See lines 647-659 of imagePsfMatch.py. Note that in the below code, results.matchedExposure is the convolved template image if convolveTemplate=True and is the convolved science image if convolveTemplate=False.

      subtractedExposure = afwImage.ExposureF(scienceExposure, True)
      if convolveTemplate:
          subtractedMaskedImage = subtractedExposure.getMaskedImage()
          subtractedMaskedImage -= results.matchedExposure.getMaskedImage()
          subtractedMaskedImage -= results.backgroundModel
      else:
          subtractedExposure.setMaskedImage(results.warpedExposure.getMaskedImage())
          subtractedMaskedImage = subtractedExposure.getMaskedImage()
          subtractedMaskedImage -= results.matchedExposure.getMaskedImage()
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sullivan Ian Sullivan
                Reporter:
                sullivan Ian Sullivan
                Watchers:
                Ian Sullivan, John Swinbank
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel