diff --git a/tests/task/test_donutStampSelectorTask.py b/tests/task/test_donutStampSelectorTask.py index 9d9454e3..4c128a36 100644 --- a/tests/task/test_donutStampSelectorTask.py +++ b/tests/task/test_donutStampSelectorTask.py @@ -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( @@ -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) diff --git a/tests/testData/pipelineConfigs/testDonutStampSelectorPipeline.yaml b/tests/testData/pipelineConfigs/testDonutStampSelectorPipeline.yaml new file mode 100644 index 00000000..8dd93f10 --- /dev/null +++ b/tests/testData/pipelineConfigs/testDonutStampSelectorPipeline.yaml @@ -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