Skip to content

Commit

Permalink
Update imageDifferenceTask defaults
Browse files Browse the repository at this point in the history
doSelectSources now defaults False, doDecorrelation now defaults True,
and detection.thresholdValue now defaults to 5.0.

Also move some other configs from setDefaults to the Task config definitions, and remove
doDecorrelation, thresholdValue, doSelectSources, doScaleDiffimVariance from DRP.yaml
since they are now in the task defaults.
  • Loading branch information
kherner committed Jun 2, 2021
1 parent 2495c57 commit 417b7a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
4 changes: 0 additions & 4 deletions pipelines/DRP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ tasks:
imageDifference:
class: lsst.pipe.tasks.imageDifference.ImageDifferenceTask
config:
doDecorrelation: True
detection.thresholdValue: 5.0
doSelectSources: False
doScaleDiffimVariance: True
coaddName: goodSeeing
getTemplate.coaddName: goodSeeing
getTemplate.warpType: direct
Expand Down
18 changes: 7 additions & 11 deletions python/lsst/pipe/tasks/imageDifference.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,20 @@ class ImageDifferenceConfig(pipeBase.PipelineTaskConfig,
doAddCalexpBackground = pexConfig.Field(dtype=bool, default=False,
doc="Add background to calexp before processing it. "
"Useful as ipDiffim does background matching.")
doUseRegister = pexConfig.Field(dtype=bool, default=True,
doUseRegister = pexConfig.Field(dtype=bool, default=False,
doc="Use image-to-image registration to align template with "
"science image")
doDebugRegister = pexConfig.Field(dtype=bool, default=False,
doc="Writing debugging data for doUseRegister")
doSelectSources = pexConfig.Field(dtype=bool, default=True,
doSelectSources = pexConfig.Field(dtype=bool, default=False,
doc="Select stars to use for kernel fitting")
doSelectDcrCatalog = pexConfig.Field(dtype=bool, default=False,
doc="Select stars of extreme color as part of the control sample")
doSelectVariableCatalog = pexConfig.Field(dtype=bool, default=False,
doc="Select stars that are variable to be part "
"of the control sample")
doSubtract = pexConfig.Field(dtype=bool, default=True, doc="Compute subtracted exposure?")
doPreConvolve = pexConfig.Field(dtype=bool, default=True,
doPreConvolve = pexConfig.Field(dtype=bool, default=False,
doc="Convolve science image by its PSF before PSF-matching?")
doScaleTemplateVariance = pexConfig.Field(dtype=bool, default=False,
doc="Scale variance of the template before PSF matching")
Expand All @@ -162,13 +162,13 @@ class ImageDifferenceConfig(pipeBase.PipelineTaskConfig,
doc="Use a simple gaussian PSF model for pre-convolution "
"(else use fit PSF)? Ignored if doPreConvolve false.")
doDetection = pexConfig.Field(dtype=bool, default=True, doc="Detect sources?")
doDecorrelation = pexConfig.Field(dtype=bool, default=False,
doDecorrelation = pexConfig.Field(dtype=bool, default=True,
doc="Perform diffim decorrelation to undo pixel correlation due to A&L "
"kernel convolution? If True, also update the diffim PSF.")
doMerge = pexConfig.Field(dtype=bool, default=True,
doc="Merge positive and negative diaSources with grow radius "
"set by growFootprint")
doMatchSources = pexConfig.Field(dtype=bool, default=True,
doMatchSources = pexConfig.Field(dtype=bool, default=False,
doc="Match diaSources with input calexp sources and ref catalog sources")
doMeasurement = pexConfig.Field(dtype=bool, default=True, doc="Measure diaSources?")
doDipoleFitting = pexConfig.Field(dtype=bool, default=True, doc="Measure dipoles using new algorithm?")
Expand All @@ -182,7 +182,7 @@ class ImageDifferenceConfig(pipeBase.PipelineTaskConfig,
doWriteMatchedExp = pexConfig.Field(dtype=bool, default=False,
doc="Write warped and PSF-matched template coadd exposure?")
doWriteSources = pexConfig.Field(dtype=bool, default=True, doc="Write sources?")
doAddMetrics = pexConfig.Field(dtype=bool, default=True,
doAddMetrics = pexConfig.Field(dtype=bool, default=False,
doc="Add columns to the source table to hold analysis metrics?")

coaddName = pexConfig.Field(
Expand Down Expand Up @@ -290,14 +290,10 @@ def setDefaults(self):
self.subtract['al'].kernel.active.fitForBackground = True
self.subtract['al'].kernel.active.spatialKernelOrder = 1
self.subtract['al'].kernel.active.spatialBgOrder = 2
self.doPreConvolve = False
self.doMatchSources = False
self.doAddMetrics = False
self.doUseRegister = False

# DiaSource Detection
self.detection.thresholdPolarity = "both"
self.detection.thresholdValue = 5.5
self.detection.thresholdValue = 5.0
self.detection.reEstimateBackground = False
self.detection.thresholdType = "pixel_stdev"

Expand Down

0 comments on commit 417b7a5

Please sign in to comment.