GroupExposuresTask#

class lsst.obs.base.GroupExposuresTask(config: GroupExposuresConfig, **kwargs: Any)#

Bases: Task

Abstract base class for the subtask of DefineVisitsTask that is responsible for grouping exposures into visits.

Subclasses should be registered with GroupExposuresTask.registry to enable use by DefineVisitsTask, and should generally correspond to a particular ‘visit_system’ dimension value. They are also responsible for defining visit IDs and names that are unique across all visit systems in use by an instrument.

Parameters#

configGroupExposuresConfig

Configuration information.

**kwargs

Additional keyword arguments forwarded to the Task constructor.

Attributes Summary

Methods Summary

find_missing(exposures, registry)

Determine, if possible, which exposures might be missing.

getVisitSystems()

Return identifiers for the 'visit_system' dimension this algorithm implements.

group(exposures, instrument)

Group the given exposures into visits.

group_exposures(exposures)

Group the exposures in a way most natural for this visit definition.

Attributes Documentation

registry = <abc.Registry object>#

Methods Documentation

abstract find_missing(exposures: list[DimensionRecord], registry: Registry) list[DimensionRecord]#

Determine, if possible, which exposures might be missing.

Parameters#

exposureslist of lsst.daf.butler.DimensionRecord

The exposure records to analyze.

registrylsst.daf.butler.Registry

A butler registry that contains these exposure records.

Returns#

missinglist of lsst.daf.butler.DimensionRecord

Any exposure records present in registry that were related to the given exposures but were missing from that list and deemed to be relevant.

Notes#

Only some grouping schemes are able to find missing exposures. It is acceptable to return an empty list.

getVisitSystems() set[VisitSystem]#

Return identifiers for the ‘visit_system’ dimension this algorithm implements.

Returns#

visit_systemsSet [VisitSystem]

The visit systems used by this algorithm.

abstract group(exposures: list[DimensionRecord], instrument: Instrument) Iterable[VisitDefinitionData]#

Group the given exposures into visits.

Parameters#

exposureslist [ DimensionRecord ]

DimensionRecords (for the ‘exposure’ dimension) describing the exposures to group.

instrumentInstrument

Instrument specification that can be used to optionally support some visit ID definitions.

Returns#

visitsIterable [ VisitDefinitionData ]

Structs identifying the visits and the exposures associated with them. This may be an iterator or a container.

abstract group_exposures(exposures: list[DimensionRecord]) dict[Any, list[DimensionRecord]]#

Group the exposures in a way most natural for this visit definition.

Parameters#

exposureslist of lsst.daf.butler.DimensionRecord

The exposure records to group.

Returns#

groupsdict [Any, list of DimensionRecord]

Groupings of exposure records. The key type is relevant to the specific visit definition and could be a string or a tuple.