ButlerImage

class lsst.afw.cameraGeom.utils.ButlerImage(butler=None, type='raw', isTrimmed=True, verbose=False, background=nan, callback=None, *args, **kwargs)

Bases: FakeImageDataSource

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

Parameters:
butlerlsst.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.

typestr

The type of image to read (e.g. raw, bias, flat, calexp).

isTrimmedbool

If true, the showCamera command expects to be given trimmed images.

verbosebool

Be chatty (in particular, log any error messages from the butler)?

backgroundfloat

The value of any pixels that lie outside the CCDs.

callbackcallable

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.

*argslist

Passed to the base class constructor.

**kwargsdict

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)

Methods Summary

getAmpImage(amp, imageFactory)

Return an amp segment image.

getCcdImage(ccd[, imageFactory, binSize, ...])

Return an image of the specified ccd, and also the (possibly updated) ccd

Methods Documentation

getAmpImage(amp, imageFactory)

Return an amp segment image.

Parameters:
amplsst.afw.table.AmpInfoTable

AmpInfoTable for this amp.

imageFactorycallable like lsst.afw.image.Image

Image constructor for making the image.

Returns:
ampImagelsst.afw.image.Image

The constructed image.

getCcdImage(ccd, imageFactory=<class 'lsst.afw.image.image.ImageF'>, binSize=1, asMaskedImage=False)

Return an image of the specified ccd, and also the (possibly updated) ccd