lsst.afw  22.0.0-22-gf1d71818e+0d6c1a9e28
Public Member Functions | Public Attributes | List of all members
lsst.afw.cameraGeom.utils.ButlerImage Class Reference
Inheritance diagram for lsst.afw.cameraGeom.utils.ButlerImage:
lsst.afw.cameraGeom.utils.FakeImageDataSource

Public Member Functions

def __init__ (self, butler=None, type="raw", isTrimmed=True, verbose=False, background=numpy.nan, callback=None, *args, **kwargs)
 
def getCcdImage (self, ccd, imageFactory=afwImage.ImageF, binSize=1, asMaskedImage=False)
 
def getCcdImage (self, det, imageFactory, binSize)
 
def getAmpImage (self, amp, imageFactory)
 

Public Attributes

 isTrimmed
 
 type
 
 butler
 
 kwargs
 
 isRaw
 
 background
 
 verbose
 
 callback
 
 showAmpGain
 
 markSize
 
 markValue
 
 ampImValue
 
 scaleGain
 

Detailed Description

A class to return an Image of a given Ccd using the butler.

Parameters
----------
butler : `lsst.daf.persistence.Butler` or `None`
    The butler to use. If `None`, an empty image is returned.
type : `str`
    The type of image to read (e.g. raw, bias, flat, calexp).
isTrimmed : `bool`
    If true, the showCamera command expects to be given trimmed images.
verbose : `bool`
    Be chatty (in particular, log any error messages from the butler)?
background : `float`
    The value of any pixels that lie outside the CCDs.
callback : callable
    A function called with (image, ccd, butler) for every image, which
    returns the image to be displayed (e.g. rawCallback). The image must
    be of the correct size, allowing for the value of isTrimmed.
*args : `list`
    Passed to the butler.
**kwargs : `dict`
    Passed to the butler.

Notes
-----
You can define a short named function as a callback::

    def callback(im, ccd, imageSource):
        return cameraGeom.utils.rawCallback(im, ccd, imageSource, correctGain=True)

Definition at line 397 of file utils.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.afw.cameraGeom.utils.ButlerImage.__init__ (   self,
  butler = None,
  type = "raw",
  isTrimmed = True,
  verbose = False,
  background = numpy.nan,
  callback = None,
args,
**  kwargs 
)

Definition at line 428 of file utils.py.

Member Function Documentation

◆ getAmpImage()

def lsst.afw.cameraGeom.utils.FakeImageDataSource.getAmpImage (   self,
  amp,
  imageFactory 
)
inherited
Return an amp segment image.

Parameters
----------
amp : `lsst.afw.table.AmpInfoTable`
    AmpInfoTable for this amp.
imageFactory : callable like `lsst.afw.image.Image`
    Image constructor for making the image.

Returns
-------
ampImage : `lsst.afw.image.Image`
    The constructed image.

Definition at line 374 of file utils.py.

◆ getCcdImage() [1/2]

def lsst.afw.cameraGeom.utils.ButlerImage.getCcdImage (   self,
  ccd,
  imageFactory = afwImage.ImageF,
  binSize = 1,
  asMaskedImage = False 
)
Return an image of the specified ccd, and also the (possibly updated) ccd

Definition at line 451 of file utils.py.

◆ getCcdImage() [2/2]

def lsst.afw.cameraGeom.utils.FakeImageDataSource.getCcdImage (   self,
  det,
  imageFactory,
  binSize 
)
inherited
Return a CCD image for the detector and the (possibly updated) Detector.

Parameters
----------
det : `lsst.afw.cameraGeom.Detector`
    Detector to use for making the image.
imageFactory : callable like `lsst.afw.image.Image`
    Image constructor for making the image.
binSize : `int`
    Bin the image by this factor in both dimensions.

Returns
-------
ccdImage : `lsst.afw.image.Image`
    The constructed image.

Definition at line 353 of file utils.py.

Member Data Documentation

◆ ampImValue

lsst.afw.cameraGeom.utils.FakeImageDataSource.ampImValue
inherited

Definition at line 350 of file utils.py.

◆ background

lsst.afw.cameraGeom.utils.ButlerImage.background

Definition at line 437 of file utils.py.

◆ butler

lsst.afw.cameraGeom.utils.ButlerImage.butler

Definition at line 434 of file utils.py.

◆ callback

lsst.afw.cameraGeom.utils.ButlerImage.callback

Definition at line 439 of file utils.py.

◆ isRaw

lsst.afw.cameraGeom.utils.ButlerImage.isRaw

Definition at line 436 of file utils.py.

◆ isTrimmed

lsst.afw.cameraGeom.utils.ButlerImage.isTrimmed

Definition at line 432 of file utils.py.

◆ kwargs

lsst.afw.cameraGeom.utils.ButlerImage.kwargs

Definition at line 435 of file utils.py.

◆ markSize

lsst.afw.cameraGeom.utils.FakeImageDataSource.markSize
inherited

Definition at line 348 of file utils.py.

◆ markValue

lsst.afw.cameraGeom.utils.FakeImageDataSource.markValue
inherited

Definition at line 349 of file utils.py.

◆ scaleGain

lsst.afw.cameraGeom.utils.FakeImageDataSource.scaleGain
inherited

Definition at line 351 of file utils.py.

◆ showAmpGain

lsst.afw.cameraGeom.utils.FakeImageDataSource.showAmpGain
inherited

Definition at line 347 of file utils.py.

◆ type

lsst.afw.cameraGeom.utils.ButlerImage.type

Definition at line 433 of file utils.py.

◆ verbose

lsst.afw.cameraGeom.utils.ButlerImage.verbose

Definition at line 438 of file utils.py.


The documentation for this class was generated from the following file: