|
lsst.pipe.tasks gd5638573c2+392ae78cd2
|
Public Member Functions | |
| __init__ (self, minimum=None, image=None) | |
| make_rgb_image (self, image_r, image_g, image_b) | |
| intensity (self, image_r, image_g, image_b) | |
| map_intensity_to_uint8 (self, I) | |
Public Attributes | |
| minimum = minimum | |
Protected Member Functions | |
| _convert_images_to_uint8 (self, image_r, image_g, image_b) | |
Protected Attributes | |
| _uint8Max = float(np.iinfo(np.uint8).max) | |
| _image = np.asarray(image) | |
Baseclass to map red, blue, green intensities into uint8 values.
Parameters
----------
minimum : float or sequence(3)
Intensity that should be mapped to black (a scalar or array for R, G, B).
image : ndarray, optional
An image used to calculate some parameters of some mappings.
|
protected |
Use the mapping to convert images image_r, image_g, and image_b to a triplet of uint8 images.
| lsst.pipe.tasks._fallback_asinhmapping.Mapping.intensity | ( | self, | |
| image_r, | |||
| image_g, | |||
| image_b ) |
Return the total intensity from the red, blue, and green intensities.
This is a naive computation, and may be overridden by subclasses.
Parameters
----------
image_r : ndarray
Intensity of image to be mapped to red; or total intensity if
``image_g`` and ``image_b`` are None.
image_g : ndarray, optional
Intensity of image to be mapped to green.
image_b : ndarray, optional
Intensity of image to be mapped to blue.
Returns
-------
intensity : ndarray
Total intensity from the red, blue and green intensities, or
``image_r`` if green and blue images are not provided.
| lsst.pipe.tasks._fallback_asinhmapping.Mapping.make_rgb_image | ( | self, | |
| image_r, | |||
| image_g, | |||
| image_b ) |
Convert 3 arrays, image_r, image_g, and image_b into an 8-bit RGB image.
Parameters
----------
image_r : ndarray
Image to map to red.
image_g : ndarray
Image to map to green.
image_b : ndarray
Image to map to blue.
Returns
-------
RGBimage : ndarray
RGB (integer, 8-bits per channel) color image as an NxNx3 numpy array.
| lsst.pipe.tasks._fallback_asinhmapping.Mapping.map_intensity_to_uint8 | ( | self, | |
| I ) |
Return an array which, when multiplied by an image, returns that image
mapped to the range of a uint8, [0, 255] (but not converted to uint8).
The intensity is assumed to have had minimum subtracted (as that can be
done per-band).
Parameters
----------
I : ndarray
Intensity to be mapped.
Returns
-------
mapped_I : ndarray
``I`` mapped to uint8
Reimplemented in lsst.pipe.tasks._fallback_asinhmapping.AsinhMapping, and lsst.pipe.tasks._fallback_asinhmapping.LinearMapping.