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

Bug fix: convolve science image in image differencing

    XMLWordPrintable

    Details

      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

            Hide
            swinbank John Swinbank added a comment -

            Further investigation has revealed this issue to be more complicated than the above suggests. Gabor Kovacs [X] will address it on a separate ticket. (Gabor: please link your ticket from here!)

            Show
            swinbank John Swinbank added a comment - Further investigation has revealed this issue to be more complicated than the above suggests. Gabor Kovacs [X] will address it on a separate ticket. (Gabor: please link your ticket from here!)

              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:

                  Jenkins

                  No builds found.