Skip to content

Commit

Permalink
Merge pull request #98 from lsst/tickets/DM-39796
Browse files Browse the repository at this point in the history
DM-39796: Update task config defaults to LSST values
  • Loading branch information
parejkoj committed Sep 21, 2023
2 parents 2cc88a2 + c223e17 commit b700894
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
10 changes: 6 additions & 4 deletions python/lsst/meas/deblender/sourceDeblendTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ class SourceDeblendConfig(pexConfig.Config):
maxNumberOfPeaks = pexConfig.Field(dtype=int, default=0,
doc=("Only deblend the brightest maxNumberOfPeaks peaks in the parent"
" (<= 0: unlimited)"))
maxFootprintArea = pexConfig.Field(dtype=int, default=1000000,
maxFootprintArea = pexConfig.Field(dtype=int, default=10000,
doc=("Maximum area for footprints before they are ignored as large; "
"non-positive means no threshold applied"))
"non-positive means no threshold applied."
" Default value is to prevent excessive memory usage."))
maxFootprintSize = pexConfig.Field(dtype=int, default=0,
doc=("Maximum linear dimension for footprints before they are ignored "
"as large; non-positive means no threshold applied"))
Expand All @@ -119,9 +120,10 @@ class SourceDeblendConfig(pexConfig.Config):
maskLimits = pexConfig.DictField(
keytype=str,
itemtype=float,
default={},
default={"NO_DATA": 0.25},
doc=("Mask planes with the corresponding limit on the fraction of masked pixels. "
"Sources violating this limit will not be deblended."),
"Sources violating this limit will not be deblended. "
"Default rejects sources in vignetted regions."),
)
weightTemplates = pexConfig.Field(
dtype=bool, default=False,
Expand Down
5 changes: 4 additions & 1 deletion tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ def testMismatchedSchema(self):
schema = afwTable.SourceTable.makeMinimalSchema()

# Create the detection task and process the data
detectionTask = SourceDetectionTask(schema=schema)
config = SourceDetectionTask.ConfigClass()
# Don't trust the variance plane for this data.
config.thresholdType = "stdev"
detectionTask = SourceDetectionTask(schema=schema, config=config)
table = afwTable.SourceTable.make(schema)
result = detectionTask.run(table, self.calexp)
self.assertEqual(schema, result.sources.getSchema())
Expand Down
2 changes: 2 additions & 0 deletions tests/test_ticket-2871.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def testFailures(self):

config = measDeb.SourceDeblendConfig()
config.catchFailures = True
# We can't use this dict, because this test doesn't set a mask plane.
config.maskLimits = {}
task = measDeb.SourceDeblendTask(schema, config=config)

catalog = afwTable.SourceCatalog(schema)
Expand Down

0 comments on commit b700894

Please sign in to comment.