make_lupton_rgb#

astropy.visualization.make_lupton_rgb(image_r, image_g, image_b, interval=None, stretch_object=None, minimum=None, stretch=5, Q=8, filename=None, output_dtype=<class 'numpy.uint8'>)[source]#

Return a Red/Green/Blue color image from 3 images using interconnected band scaling, and an arbitrary stretch function (by default, an asinh stretch). The input images can be int or float, and in any range or bit-depth.

For a more detailed look at the use of this method, see the document Creating color RGB images.

Parameters:
image_rndarray

Image to map to red.

image_gndarray

Image to map to green.

image_bndarray

Image to map to blue.

intervalBaseInterval subclass instance or numpy:array_like, optional

The interval object to apply to the data (either a single instance or an array for R, G, B). Default is ManualInterval with vmin=0.

stretch_objectBaseStretch subclass instance, optional

The stretch object to apply to the data. If set, the input values of minimum, stretch, and Q will be ignored. For the Lupton scheme, this would be an instance of LuptonAsinhStretch, but alternatively LuptonAsinhZscaleStretch or some other stretch can be used.

minimumpython:float or numpy:array_like, optional

Deprecated. Intensity that should be mapped to black (a scalar or array of R, G, B). If None, each image’s minimum value is used. Default is None.

stretchpython:float, optional

The linear stretch of the image. Default is 5

Qpython:float, optional

The asinh softening parameter. Default is 8.

filenamepython:str, optional

Write the resulting RGB image to a file (file type determined from extension).

output_dtypenumpy scalar type, optional

Image output data type. Default is np.uint8.

Returns:
rgbndarray

RGB color image as an NxNx3 numpy array, with the specified data type format