Skip to content

Commit

Permalink
Add missing docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
enourbakhsh committed Jun 8, 2023
1 parent cd7e190 commit e54eb86
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions python/lsst/pipe/tasks/snapCombine.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class SnapCombineConfig(pexConfig.Config):
doc="List of float metadata keys to average when combining snaps, e.g. float positions and dates; "
"non-float data must be handled by overriding the fixMetadata method",
optional=True,

)
sumKeys = pexConfig.ListField(
dtype=str,
Expand All @@ -113,12 +112,16 @@ class SnapCombineConfig(pexConfig.Config):
optional=True,
)

repair = pexConfig.ConfigurableField(target=RepairTask, doc="")
repair = pexConfig.ConfigurableField(target=RepairTask, doc="RepairTask configuration")
# Target `SnapPsfMatchTask` removed in DM-38846
# diffim = pexConfig.ConfigurableField(target=SnapPsfMatchTask, doc="")
detection = pexConfig.ConfigurableField(target=SourceDetectionTask, doc="")
initialPsf = pexConfig.ConfigField(dtype=InitialPsfConfig, doc="")
measurement = pexConfig.ConfigurableField(target=SingleFrameMeasurementTask, doc="")
detection = pexConfig.ConfigurableField(
target=SourceDetectionTask, doc="SourceDetectionTask configuration"
)
initialPsf = pexConfig.ConfigField(dtype=InitialPsfConfig, doc="InitialPsfConfig configuration")
measurement = pexConfig.ConfigurableField(
target=SingleFrameMeasurementTask, doc="SingleFrameMeasurementTask configuration"
)

def setDefaults(self):
self.detection.thresholdPolarity = "both"
Expand Down Expand Up @@ -319,8 +322,9 @@ def fixMetadata(self, combinedMetadata, metadata0, metadata1):
if doAvg:
combinedVal /= 2.0
except Exception:
self.log.warning("Could not %s metadata %r: value %r and/or %r not numeric",
opStr, key, val0, val1)
self.log.warning(
"Could not %s metadata %r: value %r and/or %r not numeric", opStr, key, val0, val1
)
continue

combinedMetadata.set(key, combinedVal)
Expand Down Expand Up @@ -352,5 +356,5 @@ def makeInitialPsf(self, exposure, fwhmPix=None):
model = self.config.initialPsf.model
self.log.info("installInitialPsf fwhm=%s pixels; size=%s pixels", fwhmPix, size)
psfCls = getattr(measAlg, model + "Psf")
psf = psfCls(size, size, fwhmPix/(2.0*num.sqrt(2*num.log(2.0))))
psf = psfCls(size, size, fwhmPix / (2.0 * num.sqrt(2 * num.log(2.0))))
return psf

0 comments on commit e54eb86

Please sign in to comment.