loadCamera

lsst.obs.base.loadCamera(butler: Butler, dataId: DataCoordinate | Mapping[str, Any], *, collections: Any = None) tuple[lsst.afw.cameraGeom.Camera, bool]

Attempt to load versioned camera geometry from a butler, but fall back to obtaining a nominal camera from the Instrument class if that fails.

Parameters:
butlerlsst.daf.butler.Butler

Butler instance to attempt to query for and load a camera dataset from.

dataIddict or DataCoordinate

Data ID that identifies at least the instrument and exposure dimensions.

collectionsAny, optional

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

Returns:
cameralsst.afw.cameraGeom.Camera

Camera object.

versionedbool

If True, the camera was obtained from the butler and should represent a versioned camera from a calibration repository. If False, no camera datasets were found, and the returned camera was produced by instantiating the appropriate Instrument class and calling Instrument.getCamera.

Raises:
LookupError

Raised when dataId does not specify a valid data ID.