make_rgb_cube

aplpy.make_rgb_cube(files, output, north=True)[source]

Make an RGB data cube from a list of three FITS images.

This method can read in three FITS files with different projections/sizes/resolutions and uses the reproject package to reproject them all to the same projection.

Two files are produced by this function. The first is a three-dimensional FITS cube with a filename give by output, where the third dimension contains the different channels. The second is a two-dimensional FITS image with a filename given by output with a _2d suffix. This file contains the mean of the different channels, and is required as input to FITSFigure if show_rgb is subsequently used to show a color image generated from the FITS cube (to provide the correct WCS information to FITSFigure).

Parameters:
files : tuple or list

A list of the filenames of three FITS filename to reproject. The order is red, green, blue.

output : str

The filename of the output RGB FITS cube.

north : bool, optional

Whether to rotate the image so that north is up. By default, this is assumed to be ‘north’ in the ICRS frame, but you can also pass any astropy BaseCoordinateFrame to indicate to use the north of that frame.