lsst.afw  14.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
lsst.afw.display.rgb Namespace Reference

Classes

class  Mapping
 Baseclass to map red, blue, green intensities into uint8 values. More...
 
class  LinearMapping
 A linear map map of 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...
 
class  AsinhMapping
 A mapping for an asinh stretch (preserving colours independent of brightness) More...
 
class  AsinhZScaleMapping
 A mapping for an asinh stretch, estimating the linear stretch by zscale. More...
 
class  asinhMappingF
 
class  _RgbImageF
 

Functions

def computeIntensity
 Return a naive total intensity from the red, blue, and green intensities. More...
 
def makeRGB
 
def displayRGB
 Display an rgb image using matplotlib. More...
 
def writeRGB
 Write an RGB image to disk. More...
 
def RgbImageF
 

Function Documentation

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 32 of file rgb.py.

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

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 352 of file rgb.py.

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

Definition at line 432 of file rgb.py.

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 392 of file rgb.py.