lsst.pipe.tasks g540474b770+e2881a99e2
Loading...
Searching...
No Matches
lsst.pipe.tasks.prettyPictureMaker._functors._bounds_remapper.BoundsRemapper Class Reference
Inheritance diagram for lsst.pipe.tasks.prettyPictureMaker._functors._bounds_remapper.BoundsRemapper:

Public Member Functions

RGBImage __call__ (self, RGBImage img)
 

Static Public Attributes

 quant
 
 absMax
 

Detailed Description

Remaps input images to a known range of values.

Often input images are not mapped to any defined range of values
(for instance if they are in count units). This controls how the units of
an image are mapped to a zero to one range by determining an upper
bound. A copy of the input image is created before processing.

Definition at line 33 of file _bounds_remapper.py.

Member Function Documentation

◆ __call__()

RGBImage lsst.pipe.tasks.prettyPictureMaker._functors._bounds_remapper.BoundsRemapper.__call__ ( self,
RGBImage img )
Bound images to a range between zero and one.

Some images supplied aren't properly bounded with a maximum value of 1.
Either the images exceed the bounds of 1, or values are nowhere near 1,
implying indeterminate maximum value. This function determines
an appropriate maximum either by taking the value supplied in the
absMax argument or by scaling the maximum across all channels with the
supplied quant variable.

Parameters
----------
img : `RGBImage`
    Input RGB image array with dimensions (height, width, 3) in RGB order.

Returns
-------
result : `RGBImage`
    The remapped image with values clipped to the range [0, 1].

Definition at line 55 of file _bounds_remapper.py.

Member Data Documentation

◆ absMax

lsst.pipe.tasks.prettyPictureMaker._functors._bounds_remapper.BoundsRemapper.absMax
static
Initial value:
= Field[float](
doc="Instead of determining the maximum value from the image, use this fixed value instead",
default=220,
optional=True,
)

Definition at line 49 of file _bounds_remapper.py.

◆ quant

lsst.pipe.tasks.prettyPictureMaker._functors._bounds_remapper.BoundsRemapper.quant
static
Initial value:
= Field[float](
doc=(
"The maximum values of each of the three channels will be multiplied by this factor to "
"determine the maximum flux of the image, values larger than this quantity will be clipped."
),
default=0.8,
)

Definition at line 42 of file _bounds_remapper.py.


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