Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions python/lsst/pipe/tasks/selectImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,14 @@ class PsfWcsSelectImagesConnections(pipeBase.PipelineTaskConnections,

class PsfWcsSelectImagesConfig(pipeBase.PipelineTaskConfig,
pipelineConnections=PsfWcsSelectImagesConnections):
maxPsfFwhm = pexConfig.Field(
doc="Maximum PSF FWHM (in arcseconds) to select. This can be used in conjunction with the "
"per-visit maxPsfFwhm in BestSeeingSelectVisitsTask to ensure that no outlier CCD has a "
"PSF FWHM larger than this value.",
dtype=float,
default=1.8,
optional=True,
)
maxEllipResidual = pexConfig.Field(
doc="Maximum median ellipticity residual",
dtype=float,
Expand Down Expand Up @@ -501,6 +509,14 @@ def isValid(self, visitSummary, detectorId):
row["visit"], detectorId, nPsfStar, minNPsfStar
)
valid = False
elif self.config.maxPsfFwhm:
pixelScale = row['pixelScale']
psfSigma = row['psfSigma']
fwhm = psfSigma * pixelScale * np.sqrt(8.*np.log(2.))
if not (fwhm <= self.config.maxPsfFwhm):
self.log.info("Removing visit %d detector %d because FWHM too large: %f vs %f",
row["visit"], detectorId, fwhm, self.config.maxPsfFwhm)
valid = False

return valid

Expand Down