Skip to content

Commit

Permalink
Fixing pipeline tests to reflect changes in spatially sampled metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoSanchez committed Jun 19, 2024
1 parent 5083c5e commit 0ae267b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/lsst/ap/verify/testPipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ class MockSpatiallySampledMetricsTask(PipelineTask):
ConfigClass = SpatiallySampledMetricsConfig
_DefaultName = "notSpatiallySampledMetricsTask"

def run(self, science, matchedTemplate, template, difference, diaSources):
def run(self, science, matchedTemplate, template, difference, diaSources, psfMatchingKernel):
"""Produce spatially sampled metrics
Parameters
Expand All @@ -495,6 +495,8 @@ def run(self, science, matchedTemplate, template, difference, diaSources):
Result of subtracting template from the science image.
diaSources : `lsst.afw.table.SourceCatalog`
The catalog of detected sources.
psfMatchingKernel : `~lsst.afw.math.LinearCombinationKernel`
The PSF matching kernel of the subtraction to evaluate.
Returns
-------
Expand Down
3 changes: 3 additions & 0 deletions tests/test_testPipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ def testMockSpatiallySampledMetricsTask(self):
afwImage.ExposureF(),
afwImage.ExposureF(),
afwTable.SourceCatalog(),
afwMath.LinearCombinationKernel(),
)
pipelineTests.assertValidOutput(task, result)

Expand All @@ -285,13 +286,15 @@ def testMockSpatiallySampledMetricsTask(self):
self.butler.put(afwImage.ExposureF(), "deepDiff_templateExp", self.visitId)
self.butler.put(afwImage.ExposureF(), "deepDiff_differenceExp", self.visitId)
self.butler.put(afwTable.SourceCatalog(), "deepDiff_candidateDiaSrc", self.visitId)
self.butler.put(afwMath.LinearCombinationKernel(), "deepDiff_psfMatchKernel", self.visitId)
quantum = pipelineTests.makeQuantum(
task, self.butler, self.visitId,
{"science": self.visitId,
"matchedTemplate": self.visitId,
"template": self.visitId,
"difference": self.visitId,
"diaSources": self.visitId,
"psfMatchingKernel": self.visitId,
"spatiallySampledMetrics": self.visitId,
})
pipelineTests.runTestQuantum(task, self.butler, quantum, mockRun=False)
Expand Down

0 comments on commit 0ae267b

Please sign in to comment.