Skip to content

Commit

Permalink
Correct call to superclass.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdswinbank committed Jan 13, 2016
1 parent 4f8857f commit e710ae0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/pipe/tasks/assembleCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ class SafeClipAssembleCoaddConfig(AssembleCoaddConfig):
def setDefaults(self):
# The numeric values for these configuration parameters were empirically determined, future work
# may further refine them.
pexConfig.Config.setDefaults(self)
AssembleCoaddConfig.setDefaults(self)
self.clipDetection.reEstimateBackground = False
self.clipDetection.returnOriginalFootprints = False
self.clipDetection.thresholdPolarity = "both"
Expand Down
11 changes: 11 additions & 0 deletions tests/testCoadds.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
print "meas_base could not be imported; skipping this test"
sys.exit(0)

from lsst.pipe.tasks.assembleCoadd import AssembleCoaddConfig, SafeClipAssembleCoaddConfig
from lsst.pipe.tasks.multiBand import (DetectCoaddSourcesTask, MergeDetectionsTask,
MeasureMergedCoaddSourcesTask, MergeMeasurementsTask)

Expand Down Expand Up @@ -316,10 +317,20 @@ def testForcedPhotCcdTask(self):
task = lsst.meas.base.ForcedPhotCcdTask(config=config, butler=self.butler)
self.runTaskOnCcds(task)


class AssembleCoaddTestCase(lsst.utils.tests.TestCase):
def testSafeClipConfig(self):
# Test for DM-4797: ensure that AssembleCoaddConfig.setDefaults() is
# run when SafeClipAssembleCoaddConfig.setDefaults() is run. This
# simply sets the default value for badMaskPlanes.
self.assertEqual(AssembleCoaddConfig().badMaskPlanes, SafeClipAssembleCoaddConfig().badMaskPlanes)


def suite():
lsst.utils.tests.init()
suites = []
suites += unittest.makeSuite(CoaddsTestCase)
suites += unittest.makeSuite(AssembleCoaddTestCase)
suites += unittest.makeSuite(lsst.utils.tests.MemoryTestCase)
return unittest.TestSuite(suites)

Expand Down

0 comments on commit e710ae0

Please sign in to comment.