lsst.pipe.tasks gcf790cdeb6+f6e4da7c1c
Loading...
Searching...
No Matches
lsst.pipe.tasks.prettyPictureMaker._functors._color_scale.ColorScaler Class Reference
Inheritance diagram for lsst.pipe.tasks.prettyPictureMaker._functors._color_scale.ColorScaler:

Public Member Functions

tuple[FloatImagePlane, FloatImagePlane] __call__ (self, FloatImagePlane old_lum, FloatImagePlane new_lum, FloatImagePlane a, FloatImagePlane b)
 

Static Public Attributes

 saturation
 
 maxChroma
 
 brightFalloff
 
 equalizer_levels
 

Detailed Description

Definition at line 35 of file _color_scale.py.

Member Function Documentation

◆ __call__()

tuple[FloatImagePlane, FloatImagePlane] lsst.pipe.tasks.prettyPictureMaker._functors._color_scale.ColorScaler.__call__ ( self,
FloatImagePlane old_lum,
FloatImagePlane new_lum,
FloatImagePlane a,
FloatImagePlane b )
Adjusts the color saturation while keeping the hue constant.

This function adjusts the chromaticity (a, b) of colors to maintain a
consistent saturation level, based on their original luminance. It uses
the CIELAB color space representation and the `luminance` is the new target
luminance for all colors.

Parameters
----------
old_lum : `FloatImagePlane`
    Luminance values of the original colors.
new_lum : `FloatImagePlane`
    Target luminance values for the transformed colors.
a : `FloatImagePlane`
    Chromaticity parameter 'a' corresponding to green-red axis in CIELAB.
b : `FloatImagePlane`
    Chromaticity parameter 'b' corresponding to blue-yellow axis in CIELAB.

Returns
-------
new_a : `FloatImagePlane`
    New a values representing the adjusted chromaticity.
new_b : `FloatImagePlane`
    New b values representing the adjusted chromaticity.

Definition at line 64 of file _color_scale.py.

Member Data Documentation

◆ brightFalloff

lsst.pipe.tasks.prettyPictureMaker._functors._color_scale.ColorScaler.brightFalloff
static
Initial value:
= Field[float](
doc="The rate that saturation scaling should slow with brightness", default=800
)

Definition at line 50 of file _color_scale.py.

◆ equalizer_levels

lsst.pipe.tasks.prettyPictureMaker._functors._color_scale.ColorScaler.equalizer_levels
static
Initial value:
= ListField[float](
doc=(
"A list of factors to modify the color constrast in a scale dependent way. "
"One coefficient for each spatial scale, starting from the largest. "
"Values large than 1 increase contrast, while less than 1 decreases"
"Only scales upto and including the largest to be modified need specified"
"IE [1.1,0.9] modifieds the first two [1.1,1,0.9] modifies the first three."
),
optional=True,
)

Definition at line 53 of file _color_scale.py.

◆ maxChroma

lsst.pipe.tasks.prettyPictureMaker._functors._color_scale.ColorScaler.maxChroma
static
Initial value:
= Field[float](
doc=(
"The maximum chromaticity in the OKLCh color space, large "
"values will cause bright pixels to fall outside the RGB gamut."
),
default=0.4,
)

Definition at line 43 of file _color_scale.py.

◆ saturation

lsst.pipe.tasks.prettyPictureMaker._functors._color_scale.ColorScaler.saturation
static
Initial value:
= Field[float](
doc=(
"The overall saturation factor with the scaled luminance between zero and one. "
"A value of one is not recommended as it makes bright pixels very saturated"
),
default=0.6,
)

Definition at line 36 of file _color_scale.py.


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