def testSnap(self): tMi, sMi, sK, kcs, confake = diffimTools.makeFakeKernelSet(bgValue = self.bgValue) tWcs = self.makeWcs(offset = 0) sWcs = self.makeWcs(offset = 0) tExp = afwImage.ExposureF(tMi, tWcs) sExp = afwImage.ExposureF(sMi, sWcs) sExp.setPsf(self.psf) psfMatchAL = ipDiffim.SnapPsfMatchTask(config=self.configAL) psfMatchDF = ipDiffim.SnapPsfMatchTask(config=self.configDF) psfMatchDFr = ipDiffim.SnapPsfMatchTask(config=self.configDFr) psfMatchAL.subtractMaskedImages(tMi, sMi, psfMatchAL.makeCandidateList(tExp, sExp, self.ksize)) psfMatchDF.subtractMaskedImages(tMi, sMi, psfMatchDF.makeCandidateList(tExp, sExp, self.ksize)) psfMatchDFr.subtractMaskedImages(tMi, sMi, psfMatchDFr.makeCandidateList(tExp, sExp, self.ksize))
def subtractSnaps(snap1, snap2, subconfig, doWarping=False): psfmatch = ipDiffim.SnapPsfMatchTask(subconfig) results = psfmatch.run(snap1, snap2, "subtractExposures", doWarping=doWarping) return results.subtractedImage