Skip to content

Commit

Permalink
Added pipeline test for maxSelect in DonutStampSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcrenshaw committed Oct 30, 2024
1 parent 7d5e4dd commit 05b946a
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/task/test_donutStampSelectorTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def setUpClass(cls):
instrument = "lsst.obs.lsst.LsstCam"
cls.cameraName = "LSSTCam"
pipelineYaml = os.path.join(
testPipelineConfigDir, "testCutoutsFamPipeline.yaml"
testPipelineConfigDir, "testDonutStampSelectorPipeline.yaml"
)

pipeCmd = writePipetaskCmd(
Expand Down Expand Up @@ -209,3 +209,11 @@ def testTaskRun(self):
# Test that final selection numbers match
self.assertEqual(len(donutStampsSelect), selected.sum())
self.assertEqual(len(donutStampsSelect), donutsQuality["FINAL_SELECT"].sum())

def testPipelineRun(self):
# Config specifies maxSelect=1, so the Zernike table should only have
# 2 rows (average, and pair 1)
zernikes = self.butler.get(
"zernikes", dataId=self.dataIdExtra, collections=[self.runName]
)
self.assertEqual(len(zernikes), 2)
47 changes: 47 additions & 0 deletions tests/testData/pipelineConfigs/testDonutStampSelectorPipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This yaml file is used to define the tasks and configuration of
# a Gen 3 pipeline used for testing in ts_wep.
description: wep basic processing test pipeline
# Here we specify the corresponding instrument for the data we
# will be using.
instrument: lsst.obs.lsst.LsstCam
# Then we can specify each task in our pipeline by a name
# and then specify the class name corresponding to that task
tasks:
isr:
class: lsst.ip.isr.isrTask.IsrTask
# Below we specify the configuration settings we want to use
# when running the task in this pipeline. Since our data doesn't
# include bias or flats we only want to use doApplyGains and
# doOverscan in our isr task.
config:
connections.outputExposure: "postISRCCD"
doBias: False
doVariance: True
doLinearize: False
doCrosstalk: False
doDefect: False
doNanMasking: False
doInterpolate: False
doBrighterFatter: False
doDark: False
doFlat: False
doApplyGains: True
doFringe: False
doOverscan: True
python: OverscanCorrectionTask.ConfigClass.fitType = 'MEDIAN'
generateDonutCatalogWcsTask:
class: lsst.ts.wep.task.generateDonutCatalogWcsTask.GenerateDonutCatalogWcsTask
config:
donutSelector.unblendedSeparation: 1
cutOutDonutsScienceSensorTask:
class: lsst.ts.wep.task.cutOutDonutsScienceSensorTask.CutOutDonutsScienceSensorTask
config:
# And here we specify the configuration settings originally defined in
# CutOutDonutsScienceSensorTaskConfig.
# Test with default instrument configuration parameters
donutStampSize: 160
initialCutoutPadding: 40
calcZernikesTask:
class: lsst.ts.wep.task.calcZernikesTask.CalcZernikesTask
config:
donutStampSelector.maxSelect: 1

0 comments on commit 05b946a

Please sign in to comment.