color_image#

color_image(*data, ax=None, idx_r=_Unset.UNSET, idx_g=_Unset.UNSET, idx_b=_Unset.UNSET, lupton=True, show=True, axis_off=True, **kwargs)[source]#

Make and show a color image.

Pulls relevant cards from FITS header to determine color combination.

# TODO table of make_rgb and # make_lupton_rgb keywords

Parameters:
  • data (ColorImageTypes | Sequence[ColorImageTypes]) – The input to get the HDU object from.

  • ax (maxes.Axes | None, optional, default=None) – The axes to plot the image on.

  • idx_r (int | _Unset, optional, default=_UNSET) – The index of the HDU object to get.

  • idx_g (int | _Unset, optional, default=_UNSET) – The index of the HDU object to get.

  • idx_b (int | _Unset, optional, default=_UNSET) – The index of the HDU object to get.

  • lupton (bool, optional, default=True) – Whether to use make_lupton_rgb.

  • show (bool, optional, default=True) – Whether to show the image.

  • axis_off (bool, optional, default=True) – Whether to turn off the axes.

  • **kwargs – Additional keyword arguments to pass to make_rgb or make_lupton_rgb.

Returns:

rgb – The RGB image.

Return type:

ndarray

Raises:

ValueError – If data has length less than 1, if its first element is None, or if its only element is not a sequence.