lsst.afw gf03f0b42f3+e27ba6bf39
Loading...
Searching...
No Matches
lsst.afw.cameraGeom.utils.ButlerImage Class Reference
Inheritance diagram for lsst.afw.cameraGeom.utils.ButlerImage:
lsst.afw.cameraGeom.utils.FakeImageDataSource

Public Member Functions

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

Public Attributes

str type = type
 
 butler = butler
 
 kwargs = kwargs
 
bool isRaw = False
 
 callback = callback
 
 isTrimmed = isTrimmed
 
 verbose = verbose
 
 background = background
 
 showAmpGain = showAmpGain
 
 markSize = markSize
 
 markValue = markValue
 
 ampImValue = ampImValue
 
 scaleGain = scaleGain
 

Protected Member Functions

 _prepareImage (self, ccd, im, binSize, allowRotate=True)
 

Detailed Description

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

Parameters
----------
butler : `lsst.daf.butler.Butler` or `None`
    The butler to use. If `None`, an empty image is returned. Assumes that
    the instrument was specified during butler construction or is included
    in the ``kwargs`` parameter.
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, detector, 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 base class constructor.
**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 403 of file utils.py.

Constructor & Destructor Documentation

◆ __init__()

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 436 of file utils.py.

Member Function Documentation

◆ _prepareImage()

lsst.afw.cameraGeom.utils.ButlerImage._prepareImage ( self,
ccd,
im,
binSize,
allowRotate = True )
protected

Definition at line 449 of file utils.py.

◆ getAmpImage()

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 380 of file utils.py.

◆ getCcdImage()

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

Reimplemented from lsst.afw.cameraGeom.utils.FakeImageDataSource.

Definition at line 459 of file utils.py.

Member Data Documentation

◆ ampImValue

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

Definition at line 356 of file utils.py.

◆ background

lsst.afw.cameraGeom.utils.FakeImageDataSource.background = background
inherited

Definition at line 352 of file utils.py.

◆ butler

lsst.afw.cameraGeom.utils.ButlerImage.butler = butler

Definition at line 442 of file utils.py.

◆ callback

lsst.afw.cameraGeom.utils.ButlerImage.callback = callback

Definition at line 447 of file utils.py.

◆ isRaw

bool lsst.afw.cameraGeom.utils.ButlerImage.isRaw = False

Definition at line 444 of file utils.py.

◆ isTrimmed

lsst.afw.cameraGeom.utils.FakeImageDataSource.isTrimmed = isTrimmed
inherited

Definition at line 350 of file utils.py.

◆ kwargs

lsst.afw.cameraGeom.utils.ButlerImage.kwargs = kwargs

Definition at line 443 of file utils.py.

◆ markSize

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

Definition at line 354 of file utils.py.

◆ markValue

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

Definition at line 355 of file utils.py.

◆ scaleGain

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

Definition at line 357 of file utils.py.

◆ showAmpGain

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

Definition at line 353 of file utils.py.

◆ type

str lsst.afw.cameraGeom.utils.ButlerImage.type = type

Definition at line 441 of file utils.py.

◆ verbose

lsst.afw.cameraGeom.utils.FakeImageDataSource.verbose = verbose
inherited

Definition at line 351 of file utils.py.


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