STScI Logo

chpix images.imutil


NAME · USAGE · PARAMETERS · DESCRIPTION · EXAMPLES · TIME_REQUIREMENTS
BUGS · SEE_ALSO

NAME

chpixtype -- change the pixel type of an image

USAGE

chpixtype input output newpixtype

PARAMETERS

input
The list of input images.
output
The list of output images. If the output image list is the same as the input image list then the original images are overwritten.
newpixtype
The pixel type of the output image. The options are: "ushort", "short", "int", "long", "real", "double" and "complex".
oldpixtype = "all"
The pixel type of the input images to be converted. By default all the images in the input list are converted to the pixel type specified by newpixtype. The remaining options are "ushort", "short", "int", "long", "real", "double" and "complex" in which case only those images of the specified type are converted.
verbose = yes
Print messages about actions performed.

DESCRIPTION

The list of images specified by input and pixel type oldpixtype are converted to the pixel type specified by newpixtype and written to the list of output images specified by output .

Conversion from one pixel type to another is direct and may involve both loss of precision and dynamic range. Mapping of floating point numbers to integer numbers is done by truncation. Mapping of complex numbers to floating point or integer numbers will preserve the real part of the complex number only.

EXAMPLES

1. Convert a list of images to type real, overwriting the existing images.

im> chpixtype nite1*.imh nite1*.imh real

2. Convert only those images in imlist1 which are of type short to type real. Imlist1 and imlist2 are text files containing the list of input and output images respectively. The image names are listed 1 per line.

im> chpixtype @imlist1 @imlist2 real old=short

TIME REQUIREMENTS

BUGS

SEE ALSO

imarith


Source Code · Search Form · STSDAS