Skip to content

Commit

Permalink
Remove now-defaulted overrides
Browse files Browse the repository at this point in the history
Appropriate overrides have been set in the subtasks, so these pipetask
overrides are now either unnecessary (default is now the value that was here),
or incorrect (default is now the value that had been overridden in obs_lsst
and obs_subaru).
  • Loading branch information
parejkoj committed Sep 19, 2023
1 parent b957171 commit 5a9221c
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 16 deletions.
2 changes: 0 additions & 2 deletions python/lsst/pipe/tasks/calibrate.py
Original file line number Diff line number Diff line change
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: 0 additions & 3 deletions python/lsst/pipe/tasks/dcrAssembleCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ def setDefaults(self):
self.detectPsfSources.minPixels = 25
# Use the variance plane to calculate signal to noise
self.detectPsfSources.thresholdType = "pixel_stdev"
# The signal to noise limit is good enough, while the flux limit is set
# in dimensionless units and may not be appropriate for all data sets.
self.measurePsf.starSelector["objectSize"].doFluxLimit = False
# Ensure psf candidate size is as large as piff psf size.
if (self.doCalculatePsf and self.measurePsf.psfDeterminer.name == "piff"
and self.psfDeterminer["piff"].kernelSize > self.makePsfCandidates.kernelSize):
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 5a9221c

Please sign in to comment.