exposureFromImage

lsst.obs.base.exposureFromImage(image, dataId=None, mapper=None, logger=None, setVisitInfo=True, setFilter=False)

Generate an Exposure from an image-like object

If the image is a DecoratedImage then also set its metadata (Image and MaskedImage are missing the necessary metadata and Exposure already has those set)

Parameters:
imageImage-like object

Can be one of lsst.afw.image.DecoratedImage, Image, MaskedImage or Exposure.

dataIddict, optional

The data ID identifying the visit of the image.

mapperlsst.obs.base.CameraMapper, optional

The mapper with which to convert the image.

loggerlsst.log.Log, optional

An existing logger to which to send output.

setVisitInfobool, optional

If True, create and attach a lsst.afw.image.VisitInfo to the result. Ignored if image is an Exposure with an existing VisitInfo.

setFilterbool, optional

If True, create and attach a lsst.afw.image.FilterLabel to the result. Converts non-FilterLabel information provided in image. Ignored if image is an Exposure with existing filter information.

Returns:
lsst.afw.image.Exposure

Exposure containing input image.