ComputeVisitRegionsTask#

class lsst.obs.base.ComputeVisitRegionsTask(config: ComputeVisitRegionsConfig, *, butler: Butler, **kwargs: Any)#

Bases: Task

Abstract base class for the subtask of DefineVisitsTask that is responsible for extracting spatial regions for visits and visit+detector combinations.

Subclasses should be registered with ComputeVisitRegionsTask.registry to enable use by DefineVisitsTask.

Parameters#

configComputeVisitRegionsConfig

Configuration information.

butlerlsst.daf.butler.Butler

The butler to use.

**kwargs

Additional keyword arguments forwarded to the Task constructor.

Attributes Summary

Methods Summary

compute(visit, *[, collections])

Compute regions for the given visit and all detectors in that visit.

getInstrument(instrumentName)

Retrieve an Instrument associated with this instrument name.

Attributes Documentation

registry = <abc.Registry object>#

Methods Documentation

abstract compute(visit: VisitDefinitionData, *, collections: Sequence[str] | str | None = None) tuple[Region, dict[int, Region]]#

Compute regions for the given visit and all detectors in that visit.

Parameters#

visitVisitDefinitionData

Struct describing the visit and the exposures associated with it.

collectionscollections.abc.Sequence [ str ] or str or None

Collections to be searched for camera geometry, overriding self.butler.collections.defaults. Can be any of the types supported by the collections argument to butler construction.

Returns#

visitRegionlsst.sphgeom.Region

Region for the full visit.

visitDetectorRegionsdict [ int, lsst.sphgeom.Region ]

Dictionary mapping detector ID to the region for that detector. Should include all detectors in the visit.

getInstrument(instrumentName: str) Instrument#

Retrieve an Instrument associated with this instrument name.

Parameters#

instrumentNamestr

The name of the instrument.

Returns#

instrumentInstrument

The associated instrument object.

Notes#

The result is cached.