scalergb¶
- romanisim.util.scalergb(rgb, scales=None, lumrange=None)¶
Scales three flux images into a range of luminosity for displaying.
Images are scaled into [0, 1].
This routine is intended to help with cases where you want to display some images and want the color scale to cover only a certain range, but saturated regions should retain their appropriate hue and not be compressed to white.
- Parameters:
- rgbnp.ndarray[npix, npix, 3]
the RGB images to scale
- scaleslist[float] (must contain 3 floats)
rescale each image by this amount
- lumrangelist[float] (must contain 2 floats)
minimum and maximum luminosity
- Returns:
- imnp.ndarray[npix, npix, 3]
scaled RGB image suitable for displaying