BestSeeingSelectVisitsTask#

class lsst.pipe.tasks.selectImages.BestSeeingSelectVisitsTask(*, config: PipelineTaskConfig | None = None, log: logging.Logger | LsstLogAdapter | None = None, initInputs: dict[str, Any] | None = None, **kwargs: Any)#

Bases: PipelineTask

Select up to a maximum number of the best-seeing visits.

Don’t exceed the FWHM range specified by configs min(max)PsfFwhm. This Task is a port of the Gen2 image-selector used in the AP pipeline: BestSeeingSelectImagesTask. This Task selects full visits based on the average PSF of the entire visit.

Methods Summary

doesIntersectPolygon(visitSummary, polygon)

Return True if sky polygon overlaps visit.

makePatchPolygon(skyMap, dataId)

Return True if sky polygon overlaps visit.

run(visitSummaries, skyMap, dataId)

Run task.

runQuantum(butlerQC, inputRefs, outputRefs)

Do butler IO and transform to provide in memory objects for tasks run method.

Methods Documentation

doesIntersectPolygon(visitSummary, polygon)#

Return True if sky polygon overlaps visit.

Parameters#

visitSummarylsst.afw.table.ExposureCatalog

Exposure catalog with per-detector geometry.

polygon :` lsst.sphgeom.ConvexPolygon.convexHull`

Polygon to check overlap.

Returns#

doesIntersectbool

True if the visit overlaps the polygon.

makePatchPolygon(skyMap, dataId)#

Return True if sky polygon overlaps visit.

Parameters#

skyMaplsst.afw.table.ExposureCatalog

Exposure catalog with per-detector geometry.

dataIddict of dataId keys

For retrieving patch info.

Returns#

resultlsst.sphgeom.ConvexPolygon.convexHull

Polygon of patch’s outer bbox.

run(visitSummaries, skyMap, dataId)#

Run task.

Parameters#

visitSummarylist [lsst.pipe.base.connections.DeferredDatasetRef]

List of lsst.pipe.base.connections.DeferredDatasetRef of visitSummary tables of type lsst.afw.table.ExposureCatalog.

skyMaplsst.skyMap.SkyMap

SkyMap for checking visits overlap patch.

dataIddict of dataId keys

For retrieving patch info for checking visits overlap patch.

Returns#

resultlsst.pipe.base.Struct

Results as a struct with attributes:

goodVisits

A dict with selected visit ids as keys, so that it can be be saved as a StructuredDataDict. StructuredDataList’s are currently limited.

runQuantum(butlerQC, inputRefs, outputRefs)#

Do butler IO and transform to provide in memory objects for tasks run method.

Parameters#

butlerQCQuantumContext

A butler which is specialized to operate in the context of a lsst.daf.butler.Quantum.

inputRefsInputQuantizedConnection

Datastructure whose attribute names are the names that identify connections defined in corresponding PipelineTaskConnections class. The values of these attributes are the lsst.daf.butler.DatasetRef objects associated with the defined input/prerequisite connections.

outputRefsOutputQuantizedConnection

Datastructure whose attribute names are the names that identify connections defined in corresponding PipelineTaskConnections class. The values of these attributes are the lsst.daf.butler.DatasetRef objects associated with the defined output connections.