get_visit_image#
- lsst.analysis.ap.get_visit_image(butler, dataset, data_id=None, *, image_type='science', detector=None, **kwargs)#
Read an AP image as an
lsst.imagestype, whatever its storage class.Parameters#
- butler
lsst.daf.butler.Butler Butler to read from.
- dataset
strorlsst.daf.butler.DatasetRef Dataset type name, or a resolved reference.
- data_id
dict, optional Data ID of the image; ignored when
datasetis a reference.- image_type{“science”, “template”, “difference”}, optional
Role of the image; see
as_visit_image.- detector
lsst.afw.cameraGeom.Detectororlsst.images.cameras.Detector, optional Detector for a legacy image that has none; see
as_visit_image.- **kwargs
Additional data ID keys, passed to
lsst.daf.butler.Butler.find_dataset.
Returns#
- image
lsst.images.VisitImage The image, converted with the
exposurerecord of its visit if it is stored as a legacy exposure.
Raises#
- lsst.daf.butler.DatasetNotFoundError
Raised if the butler has no such dataset.
- butler