Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: December 2012

URL: http://cxc.harvard.edu/chips/remove_image_channel.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.5 ChIPS v1

remove_image_channel

Context: images

Synopsis

Add or delete a channel from the image.

Syntax

remove_image_channel([ChipsId,] channel)

set_image_channel([ChipsId,] filename, channel)
set_image_channel([ChipsId,] image_array, x-dim, y-dim, channel)

Description

  • ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
  • channel - the image channel to delete: chips_red, chips_green, chips_blue, or chips_alpha.

The remove_image_channel command deletes the specifed channel from the image. This command can only be used with true color images; an error is returned if the images is pseudocolor.

A different channel filter can be loaded for the image with the set_image_channel command.

Example 1

chips> add_image("soft.fits", "med.fits", "hard.fits")
chips> remove_image_channel(chips_red)

Load three image files to create a truecolor image. Then remove the contribution of the red image, soft.fits, from the display.

Example 2

chips> image = read_file("input.fits")
chips> pixels = get_piximgvals(image)
chips> alpha = pixels * 0
chips> index = np.where(pixels > 0)
chips> alpha[index] = 1
chips> set_image_channel(alpha, chips_alpha)

An alpha filter is created based on the pixel values in the image "input.fits". The set_image_channel command is used to set the alpha channel in the current image.

Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

contrib
imextent
images
add_image, current_image, delete_image, display_image, get_image, hide_image, load_colormap, print_image, set_image, shuffle_image

Last modified: December 2012
CXC logo

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2012. All rights reserved.