Skip to content

Commit

Permalink
Merge pull request #826 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 authored Sep 21, 2023
2 parents aab4165 + 7270123 commit 920186a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
6 changes: 2 additions & 4 deletions python/lsst/pipe/tasks/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ class CalibrateConfig(pipeBase.PipelineTaskConfig, pipelineConnections=Calibrate
)
doWriteMatchesDenormalized = pexConfig.Field(
dtype=bool,
default=False,
default=True,
doc=("Write reference matches in denormalized format? "
"This format uses more disk space, but is more convenient to "
"read. Ignored if doWriteMatches=False or doWrite=False."),
"read for debugging. Ignored if doWriteMatches=False or doWrite=False."),
)
doAstrometry = pexConfig.Field(
dtype=bool,
Expand Down Expand Up @@ -303,8 +303,6 @@ class CalibrateConfig(pipeBase.PipelineTaskConfig, pipelineConnections=Calibrate

def setDefaults(self):
super().setDefaults()
self.detection.doTempLocalBackground = False
self.deblend.maxFootprintSize = 2000
self.postCalibrationMeasurement.plugins.names = ["base_LocalPhotoCalib", "base_LocalWcs"]
self.postCalibrationMeasurement.doReplaceWithNoise = False
for key in self.postCalibrationMeasurement.slots:
Expand Down
10 changes: 0 additions & 10 deletions python/lsst/pipe/tasks/calibrateImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ def setDefaults(self):

# Only use high S/N sources for PSF determination.
self.psf_detection.thresholdValue = 50.0
self.psf_detection.thresholdType = "pixel_stdev"
# TODO investigation: Probably want False here, but that may require
# tweaking the background spatial scale, to make it small enough to
# prevent extra peaks in the wings of bright objects.
Expand Down Expand Up @@ -268,9 +267,6 @@ def setDefaults(self):
# https://github.com/lsst/meas_extensions_psfex/blob/main/config/default-lsst.psfex#L14
self.psf_source_measurement.plugins["base_CircularApertureFlux"].radii = [9.0, 12.0]

self.psf_measure_psf.starSelector["objectSize"].doFluxLimit = False
self.psf_measure_psf.starSelector["objectSize"].doSignalToNoiseLimit = True

# No extendeness information available: we need the aperture
# corrections to determine that.
self.measure_aperture_correction.sourceSelector["science"].doUnresolved = False
Expand All @@ -283,7 +279,6 @@ def setDefaults(self):
# Detection for good S/N for astrometry/photometry and other
# downstream tasks.
self.star_detection.thresholdValue = 10.0
self.star_detection.thresholdType = "pixel_stdev"
self.star_measurement.plugins = ["base_PixelFlags",
"base_SdssCentroid",
"ext_shapeHSM_HsmSourceMoments",
Expand All @@ -296,8 +291,6 @@ def setDefaults(self):
self.star_measurement.slots.shape = "ext_shapeHSM_HsmSourceMoments"
# Only measure the apertures we need for star selection.
self.star_measurement.plugins["base_CircularApertureFlux"].radii = [12.0]
# Restrict footprint area to prevent memory blowup on huge footprints.
self.star_deblend.maxFootprintArea = 10000

# Select isolated stars with reliable measurements and no bad flags.
self.star_selector["science"].doFlags = True
Expand All @@ -311,9 +304,6 @@ def setDefaults(self):
# phot_g_mean is the primary Gaia band for all input bands.
self.astrometry_ref_loader.anyFilterMapsToThis = "phot_g_mean"

# Reject magnitude outliers (TODO DM-39796: should be task default)
self.astrometry.doMagnitudeOutlierRejection = True

# Do not subselect during fitting; we already selected good stars.
self.astrometry.sourceSelector = "null"
self.photometry.match.sourceSelection.retarget(sourceSelector.NullSourceSelectorTask)
Expand Down
1 change: 0 additions & 1 deletion python/lsst/pipe/tasks/characterizeImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ def setDefaults(self):
# but these are the values we have been using
self.detection.thresholdValue = 5.0
self.detection.includeThresholdMultiplier = 10.0
self.detection.doTempLocalBackground = False
# do not deblend, as it makes a mess
self.doDeblend = False
# measure and apply aperture correction; note: measuring and applying aperture
Expand Down
3 changes: 3 additions & 0 deletions tests/test_calibrateImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def setUp(self):
# We don't have many test points, so can't match on complicated shapes.
self.config.astrometry.matcher.numPointsForShape = 3

# Something about this test dataset prefers the older fluxRatio here.
self.config.star_catalog_calculation.plugins['base_ClassificationExtendedness'].fluxRatio = 0.925

def test_run(self):
"""Test that run() returns reasonable values to be butler put.
"""
Expand Down

0 comments on commit 920186a

Please sign in to comment.