.help chimgtyp August,1997 ftools.fimage
.ih
NAME
chimgtyp - Converts (changes) the data type (BITPIX) of an image array of 
the FITS image extension.

.ih
USAGE
chimgtyp infile outfile datatype
.ih
DESCRIPTION
CHIMGTYP converts the data type of the image extension. It writes the
image array to an output file with modified bitpix value and modified 
array values as requested by user.  The FITS defined data types are:
.br
.nj
 ----------------------------------------------
.br
.nj
 datatype   meaning                    bitpix
.br
.nj
 ----------------------------------------------
.br
.nj
 UBYTE       8-bit unsigned byte          8
.br
.nj
 USHORT      unsigned short              16
.br
.nj
 SHORT       signed short                16
.br
.nj
 ULONG       unsigned long               32 
.br
.nj
 LONG        signed long                 32
.br
.nj
 FLOAT       single precision float     -32
.br
.nj
 DOUBLE      double precision float     -64
.br
.ih
CAUTION:
Note that certain convertions (e.g., float --> int, double --> float,
long --> short, etc.) may cause loss of information. 
.ih
PARAMETERS
.le
.ls infile [string]
The name of the input image file.
.le
.ls outfile [string]
The name of output file.  
.le
.ls datatype[string]
Datatype to be converted to (e.g., USHORT, or LONG, etc.).
.le
.ls (Fnull= -1e37)[float]
Value to assign undefined floating point pixels for output file. This is 
used when datatype is FLOAT or DOUBLE.
.le
.ls (Inull= -99)[int]
Value to assign undefined integer pixels for output file. This is 
used when datatype is LONG, or SHORT. Possible limits of this value,
for converting to various datatypes are:
.br
.nj
datatype            limits
.br
.nj
-------------------------------------
.br
.nj
UBYTE                  0 to 255
.br
.nj
USHORT                 0 to 65535 
.br
.nj
SHORT             -32768 to +32767
.br
.nj
ULONG                  0 to 4294967295
.br
.nj
LONG         -2147483648 to 2147483647
.br
.nj
-------------------------------------

.le
.ls (copyall= yes)[boolean]
To copy all other existing extensions from the input file.  By default, it
is set to value 1 (true) which means, the task will copy all other existing
extensions from the input to output. To reverse this option, one needs to
enter copyall=0 in the command line.
.le
.ls (clobber = no) [boolean])
Flag specifying whether or not a  pre-existing  file  with  the
same  name  as that  requested as the output file from this task
will be overwritten.
.ih
EXAMPLES
 
1. To convert image type from DOUBLE to ULONG,
.br
.ls prompt> chimgtyp infile outfile datatype=ULONG Inull=99
.br

.ih
BUGS
 
None Known
.br
.ih
LOG OF SIGNIFICANT CHANGES
 
V1.0.0 (1997 August)
.br
.ih
PRIMARY AUTHOR
 
Banashree M Seifert
.ih
CONTACT FOR PROBLEM
 
http://heasarc.gsfc.nasa.gov/cgi-bin/ftoolshelp
 
.endhelp
 
 
 

 