|
lsst.pipe.tasks gd5638573c2+392ae78cd2
|
Public Member Functions | |
| __init__ (self, minimum, stretch, Q=8) | |
| map_intensity_to_uint8 (self, I) | |
| Public Member Functions inherited from lsst.pipe.tasks._fallback_asinhmapping.Mapping | |
| __init__ (self, minimum=None, image=None) | |
| make_rgb_image (self, image_r, image_g, image_b) | |
| intensity (self, image_r, image_g, image_b) | |
Protected Attributes | |
| _slope = frac * self._uint8Max / np.arcsinh(frac * Q) | |
| _soften = Q / float(stretch) | |
| Protected Attributes inherited from lsst.pipe.tasks._fallback_asinhmapping.Mapping | |
| _uint8Max = float(np.iinfo(np.uint8).max) | |
| _image = np.asarray(image) | |
Additional Inherited Members | |
| Public Attributes inherited from lsst.pipe.tasks._fallback_asinhmapping.Mapping | |
| minimum = minimum | |
| Protected Member Functions inherited from lsst.pipe.tasks._fallback_asinhmapping.Mapping | |
| _convert_images_to_uint8 (self, image_r, image_g, image_b) | |
A mapping for an asinh stretch (preserving colours independent of brightness).
x = asinh(Q (I - minimum)/stretch)/Q
This reduces to a linear stretch if Q == 0
See https://ui.adsabs.harvard.edu/abs/2004PASP..116..133L
Parameters
----------
minimum : float
Intensity that should be mapped to black (a scalar or array for R, G, B).
stretch : float
The linear stretch of the image.
Q : float
The asinh softening parameter.
| lsst.pipe.tasks._fallback_asinhmapping.AsinhMapping.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 from lsst.pipe.tasks._fallback_asinhmapping.Mapping.