lsst.pipe.tasks g253578fa50+9bdef6ea54
Loading...
Searching...
No Matches
lsst.pipe.tasks.prettyPictureMaker._colorMapper Namespace Reference

Classes

class  _SentinalDefault
 

Functions

RGBImage lsstRGB (FloatImagePlane rArray, FloatImagePlane gArray, FloatImagePlane bArray, LocalContrastFunction|None|_SentinalDefault local_contrast=DEFAULT_FUNCTION, ScaleLumFunction|None|_SentinalDefault scale_lum=DEFAULT_FUNCTION, ScaleColorFunction|None|_SentinalDefault scale_color=DEFAULT_FUNCTION, RemapBoundsFunction|None|_SentinalDefault remap_bounds=DEFAULT_FUNCTION, BracketingFunction|None|_SentinalDefault bracketing_function=DEFAULT_FUNCTION, GamutRemappingFunction|None|_SentinalDefault gamut_remapping_function=DEFAULT_FUNCTION, FloatImagePlane|None psf=None, tuple[float, float] cieWhitePoint=(0.28, 0.28))
 

Variables

 logger = logging.getLogger(__name__)
 
 DEFAULT_FUNCTION = _SentinalDefault.DEFAULT_FUNCTION
 

Function Documentation

◆ lsstRGB()

RGBImage lsst.pipe.tasks.prettyPictureMaker._colorMapper.lsstRGB ( FloatImagePlane rArray,
FloatImagePlane gArray,
FloatImagePlane bArray,
LocalContrastFunction | None | _SentinalDefault local_contrast = DEFAULT_FUNCTION,
ScaleLumFunction | None | _SentinalDefault scale_lum = DEFAULT_FUNCTION,
ScaleColorFunction | None | _SentinalDefault scale_color = DEFAULT_FUNCTION,
RemapBoundsFunction | None | _SentinalDefault remap_bounds = DEFAULT_FUNCTION,
BracketingFunction | None | _SentinalDefault bracketing_function = DEFAULT_FUNCTION,
GamutRemappingFunction | None | _SentinalDefault gamut_remapping_function = DEFAULT_FUNCTION,
FloatImagePlane | None psf = None,
tuple[float, float] cieWhitePoint = (0.28, 0.28) )
Enhance the lightness and color preserving hue using perceptual methods.

Parameters
----------
rArray : `numpy.ndarray`
    The array used as the red channel
gArray : `numpy.ndarray`
    The array used as the green channel
bArray : `numpy.ndarray`
    The array used as the blue channel
local_contrast : `LocalContrastFunction` or `None`
    This is a callable that's passed the luminance values, and is expected
    to do local contrast enhancement. Set to None to bypass.
scale_lum : `ScaleLumFunction` or `None`
    This is a callable that's passed the luminance values and should
    return a scaled luminance array the same shape as the input.
    Set to None for no scaling.
scale_color : `ScaleColorFunction` or `None`
    This is a callable that's passed the original luminance, the remapped
    luminance values, the a values for each pixel, and the b values for
    each pixel. This function is responsible for scaling chroma
    values. This should return two arrays corresponding to the scaled a and
    b values. Set to None for no modification.
remap_bounds : `RemapBoundsFunction` or `None`
    This is a callable that remaps the input arrays such that each of
    them fall within a zero to one range. This callable is given the
    initial image. Set to None for no remapping. If this is None
    input arrays should already be in 0-1 range.
bracketing_function : `BracketingFunction` or `None`
    This is a callable that is passed the input luminance, and should
    create various exposure levels and then fuse them together.
    Set to None for no bracketing.
gamut_remapping_function : `GamutRemappingFunction` or `None`
    This is a callable that is passed the final OkLab image. Its job
    is to detect and correct any pixel values that would fall outside
    an RGB P3 colorspace. Set to None for no fixes.
psf : `FloatImagePlane` or `None`
    If this parameter is an image of a PSF kernel the luminance channel is
    deconvolved with it. Set to None to skip deconvolution.
cieWhitePoint : `tuple` of `float`, `float`
    This is the white point of the input of the input arrays in CIE XY
    coordinates. Altering this affects the relative balance of colors
    in the input image, and therefore also the output image.

Returns
-------
result : `RGBImage`
    The brightness and color calibrated image.

Raises
------
ValueError
    Raised if the shapes of the input array don't match

Definition at line 65 of file _colorMapper.py.

Variable Documentation

◆ DEFAULT_FUNCTION

lsst.pipe.tasks.prettyPictureMaker._colorMapper.DEFAULT_FUNCTION = _SentinalDefault.DEFAULT_FUNCTION

Definition at line 62 of file _colorMapper.py.

◆ logger

lsst.pipe.tasks.prettyPictureMaker._colorMapper.logger = logging.getLogger(__name__)

Definition at line 55 of file _colorMapper.py.