as_visit_image#
- lsst.analysis.ap.as_visit_image(image, *, image_type='science', exposure_record=None, detector=None)#
Return an AP image as an
lsst.imagestype.Parameters#
- image
lsst.images.VisitImageorlsst.afw.image.Exposure Image to convert. An
lsst.images.VisitImage(which includesDifferenceImage) is returned unchanged.- image_type{“science”, “template”, “difference”}, optional
Role of a legacy image, which sets the type it becomes (a
VisitImagefor a science image, aDifferenceImageotherwise) and the mask planes it keeps.- exposure_record
lsst.daf.butler.DimensionRecord, optional exposuredimension record of a legacy image. Without it the converted observation information lacks the fields the record supplies.- detector
lsst.afw.cameraGeom.Detectororlsst.images.cameras.Detector, optional Detector to attach to a legacy image that has none, such as a legacy template; the science image’s detector is the right one.
Returns#
- image
lsst.images.VisitImage The image in
lsst.imagesform. A converted image shares its image and variance pixels withimage.
Raises#
- TypeError
Raised if
imageis neither anlsst.images.VisitImagenor anlsst.afw.image.Exposure.- ValueError
Raised if a legacy image has no detector and none is given.
- image