LSST Applications g0fba68d861+539c3c8198,g1ec0fe41b4+f0b7a83aa5,g1fd858c14a+78b1f303e5,g22210bfa2a+8e34e7f00e,g2440f9efcc+8c5ae1fdc5,g3533f9d6cb+f4db8b1b3b,g35bb328faa+8c5ae1fdc5,g3fc7d4f5b9+a4d3a2d8bb,g40d01f57dd+ad4ae80abb,g4178042926+abd409f097,g53246c7159+8c5ae1fdc5,g548d740b8c+47e4a7beb3,g60b5630c4e+f4db8b1b3b,g663da51e9b+e0f2ae43b2,g67b6fd64d1+c104138150,g78460c75b0+7e33a9eb6d,g786e29fd12+668abc6043,g8352419a5c+8c5ae1fdc5,g8852436030+d435302cbd,g89139ef638+c104138150,g8b40312ef5+5b6744d273,g90aefe88b0+c7f866738c,g989de1cb63+c104138150,g9f33ca652e+0b88989aa6,ga2f891cd6c+f4db8b1b3b,gabe3b4be73+8856018cbb,gabf8522325+5cb9e9d408,gb1101e3267+78d08b86ce,gb89ab40317+c104138150,gcf25f946ba+d435302cbd,gd6cbbdb0b4+be834e5da7,gde0f65d7ad+a7114e3dba,ge278dab8ac+fa35eb453c,ge410e46f29+c104138150,gf35d7ec915+97dd712d81,gf5e32f922b+8c5ae1fdc5,gf67bdafdda+c104138150,gffe7e49bb4+f4db8b1b3b,v29.1.0.rc2
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst.afw.cameraGeom.utils.FakeImageDataSource Class Reference
Inheritance diagram for lsst.afw.cameraGeom.utils.FakeImageDataSource:
lsst.afw.cameraGeom.utils.ButlerImage

Public Member Functions

 __init__ (self, isTrimmed=True, verbose=False, background=numpy.nan, showAmpGain=True, markSize=10, markValue=0, ampImValue=None, scaleGain=lambda gain:(gain *1000)//10)
 
 getCcdImage (self, det, imageFactory, binSize)
 
 getAmpImage (self, amp, imageFactory)
 

Public Attributes

 isTrimmed = isTrimmed
 
 verbose = verbose
 
 background = background
 
 showAmpGain = showAmpGain
 
 markSize = markSize
 
 markValue = markValue
 
 ampImValue = ampImValue
 
 scaleGain = scaleGain
 

Detailed Description

A class to retrieve synthetic images for display by the show* methods

Parameters
----------
isTrimmed : `bool`
    Should amps be trimmed?
verbose : `bool`
    Be chatty?
background : `float`
    The value of any pixels that lie outside the CCDs.
showAmpGain : `bool`
    Color the amp segments with the gain of the amp?
markSize : `float`
    Size of the side of the box used to mark the read corner.
markValue : `float`
    Value to assign the read corner mark.
ampImValue : `float` or `None`
    Value to assign to amps; scaleGain(gain) is used if `None`.
scaleGain : callable
    Function to scale the gain by.

Definition at line 325 of file utils.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.afw.cameraGeom.utils.FakeImageDataSource.__init__ ( self,
isTrimmed = True,
verbose = False,
background = numpy.nan,
showAmpGain = True,
markSize = 10,
markValue = 0,
ampImValue = None,
scaleGain = lambda gain: (gain*1000)//10 )

Definition at line 347 of file utils.py.

349 ampImValue=None, scaleGain=lambda gain: (gain*1000)//10):
350 self.isTrimmed = isTrimmed
351 self.verbose = verbose
352 self.background = background
353 self.showAmpGain = showAmpGain
354 self.markSize = markSize
355 self.markValue = markValue
356 self.ampImValue = ampImValue
357 self.scaleGain = scaleGain
358

Member Function Documentation

◆ getAmpImage()

lsst.afw.cameraGeom.utils.FakeImageDataSource.getAmpImage ( self,
amp,
imageFactory )
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.

380 def getAmpImage(self, amp, imageFactory):
381 """Return an amp segment image.
382
383 Parameters
384 ----------
385 amp : `lsst.afw.table.AmpInfoTable`
386 AmpInfoTable for this amp.
387 imageFactory : callable like `lsst.afw.image.Image`
388 Image constructor for making the image.
389
390 Returns
391 -------
392 ampImage : `lsst.afw.image.Image`
393 The constructed image.
394 """
395 ampImage = makeImageFromAmp(amp, imValue=self.ampImValue, imageFactory=imageFactory,
396 markSize=self.markSize, markValue=self.markValue,
397 scaleGain=self.scaleGain)
398 if self.isTrimmed:
399 ampImage = ampImage.Factory(ampImage, amp.getRawDataBBox())
400 return ampImage
401
402

◆ getCcdImage()

lsst.afw.cameraGeom.utils.FakeImageDataSource.getCcdImage ( self,
det,
imageFactory,
binSize )
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.

Reimplemented in lsst.afw.cameraGeom.utils.ButlerImage.

Definition at line 359 of file utils.py.

359 def getCcdImage(self, det, imageFactory, binSize):
360 """Return a CCD image for the detector and the (possibly updated) Detector.
361
362 Parameters
363 ----------
364 det : `lsst.afw.cameraGeom.Detector`
365 Detector to use for making the image.
366 imageFactory : callable like `lsst.afw.image.Image`
367 Image constructor for making the image.
368 binSize : `int`
369 Bin the image by this factor in both dimensions.
370
371 Returns
372 -------
373 ccdImage : `lsst.afw.image.Image`
374 The constructed image.
375 """
376 ccdImage = makeImageFromCcd(det, isTrimmed=self.isTrimmed, showAmpGain=self.showAmpGain,
377 imageFactory=imageFactory, binSize=binSize)
378 return afwMath.rotateImageBy90(ccdImage, det.getOrientation().getNQuarter()), det
379
std::shared_ptr< ImageT > rotateImageBy90(ImageT const &image, int nQuarter)
Rotate an image by an integral number of quarter turns.

Member Data Documentation

◆ ampImValue

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

Definition at line 356 of file utils.py.

◆ background

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

Definition at line 352 of file utils.py.

◆ isTrimmed

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

Definition at line 350 of file utils.py.

◆ markSize

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

Definition at line 354 of file utils.py.

◆ markValue

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

Definition at line 355 of file utils.py.

◆ scaleGain

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

Definition at line 357 of file utils.py.

◆ showAmpGain

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

Definition at line 353 of file utils.py.

◆ verbose

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

Definition at line 351 of file utils.py.


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