LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Classes | Functions
lsst.daf.butlerUtils.cameraMapper Namespace Reference

Classes

class  CameraMapper
 

Functions

def exposureFromImage
 

Function Documentation

def lsst.daf.butlerUtils.cameraMapper.exposureFromImage (   image)
Generate an exposure from a DecoratedImage or similar
@param[in] image Image of interest
@return (lsst.afw.image.Exposure) Exposure containing input image

Definition at line 848 of file cameraMapper.py.

849 def exposureFromImage(image):
850  """Generate an exposure from a DecoratedImage or similar
851  @param[in] image Image of interest
852  @return (lsst.afw.image.Exposure) Exposure containing input image
853  """
854  if isinstance(image, afwImage.DecoratedImageU) or isinstance(image, afwImage.DecoratedImageI) or \
855  isinstance(image, afwImage.DecoratedImageF) or isinstance(image, afwImage.DecoratedImageD):
856  exposure = afwImage.makeExposure(afwImage.makeMaskedImage(image.getImage()))
857  else:
858  exposure = image
859  md = image.getMetadata()
860  exposure.setMetadata(md)
861  wcs = afwImage.makeWcs(md)
862  exposure.setWcs(wcs)
863  wcsMetadata = wcs.getFitsMetadata()
864  for kw in wcsMetadata.paramNames():
865  md.remove(kw)
866 
867  return exposure
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > * makeMaskedImage(typename Image< ImagePixelT >::Ptr image, typename Mask< MaskPixelT >::Ptr mask=typename Mask< MaskPixelT >::Ptr(), typename Image< VariancePixelT >::Ptr variance=typename Image< VariancePixelT >::Ptr())
Definition: MaskedImage.h:1067
Wcs::Ptr makeWcs(coord::Coord const &crval, geom::Point2D const &crpix, double CD11, double CD12, double CD21, double CD22)
Create a Wcs object from crval, crpix, CD, using CD elements (useful from python) ...
Definition: makeWcs.cc:141
Exposure< ImagePixelT, MaskPixelT, VariancePixelT >::Ptr makeExposure(MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &mimage, boost::shared_ptr< Wcs const > wcs=boost::shared_ptr< Wcs const >())
Definition: Exposure.h:308