lsst.afw  15.0-25-gacd707fca
Classes | Functions | Variables
lsst.afw.display.rgb Namespace Reference

Classes

class  _RgbImageF
 
class  AsinhMapping
 A mapping for an asinh stretch (preserving colours independent of brightness) More...
 
class  asinhMappingF
 
class  AsinhZScaleMapping
 A mapping for an asinh stretch, estimating the linear stretch by zscale. More...
 
class  LinearMapping
 A linear map map of red, blue, green intensities into uint8 values. More...
 
class  Mapping
 Baseclass to map red, blue, green intensities into uint8 values. More...
 
class  ZScaleMapping
 A mapping for a linear stretch chosen by the zscale algorithm (preserving colours independent of brightness) More...
 

Functions

def computeIntensity (imageR, imageG=None, imageB=None)
 Return a naive total intensity from the red, blue, and green intensities. More...
 
def makeRGB (imageR, imageG=None, imageB=None, minimum=0, dataRange=5, Q=8, fileName=None, saturatedBorderWidth=0, saturatedPixelValue=None, xSize=None, ySize=None, rescaleFactor=None)
 
def displayRGB (rgb, show=True)
 Display an rgb image using matplotlib. More...
 
def writeRGB (fileName, rgbImage)
 Write an RGB image to disk. More...
 
def __init__ (self, minimum, dataRange, Q)
 
def RgbImageF (imageR, imageG, imageB, mapping)
 

Variables

 minimum
 
 dataRange
 
 Q
 

Function Documentation

◆ __init__()

def lsst.afw.display.rgb.__init__ (   self,
  minimum,
  dataRange,
  Q 
)
Deprecated:
Object used to support legacy API

Definition at line 414 of file rgb.py.

◆ computeIntensity()

def lsst.afw.display.rgb.computeIntensity (   imageR,
  imageG = None,
  imageB = None 
)

Return a naive total intensity from the red, blue, and green intensities.

Parameters
imageRintensity of image that'll be mapped to red; or intensity if imageG and imageB are None
imageGintensity of image that'll be mapped to green; or None
imageBintensity of image that'll be mapped to blue; or None

Inputs may be MaskedImages, Images, or numpy arrays and the return is of the same type

Definition at line 30 of file rgb.py.

◆ displayRGB()

def lsst.afw.display.rgb.displayRGB (   rgb,
  show = True 
)

Display an rgb image using matplotlib.

Parameters
rgbThe RGB image in question
showIf true, call plt.show()

Definition at line 381 of file rgb.py.

◆ makeRGB()

def lsst.afw.display.rgb.makeRGB (   imageR,
  imageG = None,
  imageB = None,
  minimum = 0,
  dataRange = 5,
  Q = 8,
  fileName = None,
  saturatedBorderWidth = 0,
  saturatedPixelValue = None,
  xSize = None,
  ySize = None,
  rescaleFactor = None 
)
Make a set of three images into an RGB image using an asinh stretch and optionally write it to disk

If saturatedBorderWidth is non-zero, replace saturated pixels with saturatedPixelValue.  Note
that replacing saturated pixels requires that the input images be MaskedImages.

Definition at line 353 of file rgb.py.

◆ RgbImageF()

def lsst.afw.display.rgb.RgbImageF (   imageR,
  imageG,
  imageB,
  mapping 
)
Deprecated:
Legacy API

Definition at line 433 of file rgb.py.

◆ writeRGB()

def lsst.afw.display.rgb.writeRGB (   fileName,
  rgbImage 
)

Write an RGB image to disk.

Parameters
fileNameThe output file. The suffix defines the format, and must be supported by matplotlib
rgbImageThe image, as made by e.g. makeRGB

Most versions of matplotlib support png and pdf (although the eps/pdf/svg writers may be buggy, possibly due an interaction with useTeX=True in the matplotlib settings).

If your matplotlib bundles pil/pillow you should also be able to write jpeg and tiff files.

Definition at line 393 of file rgb.py.

Variable Documentation

◆ dataRange

lsst.afw.display.rgb.dataRange

Definition at line 416 of file rgb.py.

◆ minimum

lsst.afw.display.rgb.minimum

Definition at line 415 of file rgb.py.

◆ Q

lsst.afw.display.rgb.Q

Definition at line 417 of file rgb.py.