Skip to content

Commit

Permalink
Added pipeline test for maxSelect in DonutStampSelector (#286)
Browse files Browse the repository at this point in the history
* Added pipeline test for maxSelect in DonutStampSelector
  • Loading branch information
jfcrenshaw authored Oct 30, 2024
1 parent 7d5e4dd commit 2b60311
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
10 changes: 9 additions & 1 deletion doc/versionHistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@
Version History
##################

.. _lsst.ts.wep-12.6.1:

-------------
12.6.1
-------------

* Added a unit test for specifying DonutStampSelector.config.maxSelect in a pipeline config yaml.

.. _lsst.ts.wep-12.6.0:

-------------
12.6.0
-------------

* Added maxSelect config to DonutStampsSelector
* Added maxSelect config to DonutStampSelector

.. _lsst.ts.wep-12.5.0:

Expand Down
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 2b60311

Please sign in to comment.