|AHELP for CIAO 4.9 ChIPS v1||
Add or delete a channel from the image.
remove_image_channel(channel) remove_image_channel(id, channel) set_image_channel([id,] filename, channel) set_image_channel([id,] numpy array, channel) set_image_channel([id,] image array, nx, ny, channel)
The function arguments.
|channel||The red, green, blue, or alpha (opacity) channel. The valid arguments are: chips_red, chips_green, chips_blue, and chips_alpha.|
|filename||The name of the image file to use; see add_image.|
|numpy array||The image pixel values as a NumPy array; see add_image.|
|image array, nx, ny||The image pixel values as an array and its size; see add_image.|
|id||A ChipsId structure identifying the item.|
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.
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.
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.
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.