.help mkhratio mar00 ftools.mkhratio
.ih 
NAME
mkhratio -- generates hardness-ratio image
.ih
USAGE
mkhratio afile bfile outfile sclmode sclfact [nbins] amin bmin
.ih
DESCRIPTION

   This task generates a hardness ratio image from two images. Image A
   is the soft band, and Image B is the hard band.  The output image
   is basically composed of the values (B - A)/(B + A). The result
   corresponds to the range -1 to +1, which can be scaled by several 
   methods, such as a power of e, linearly, or binning into a linear
   histogram.  It is also possible to set a cut value for each image
   below which the pixel will be ignored.

.ih
PARAMETERS
.ls afile (Image A file) [filename]
Location of file to consider as Image A, the soft band image.
.le
.ls bfile (Image B file) [filename]
Location of file to consider as Image B, the hard band image.
Must be same size as Image A.
.le
.ls outfile [filename]
Location of the output image file. The header from Image A is copied
into the output file.
.le 
.ls sclmode (scaling mode: EXP, LINEAR, or HIST) [string]
Mode of scaling. 

   EXP:    sclfact*e^((B-A)/(B+A)) 
   LINEAR: sclfact*((B-A)/(B+A))
   HIST:   The values (B-A)/(B+A) are evenly partitioned into an 
           'nbins' number of bins.  The resulting image contains
           the bin number, which ranges from 1 to nbins. 

If B+A = 0, the value in the output image is zero.
.le
.ls sclfact [real]
The scaling factor used to multiply the hardness ratio.
.le
.ls nbins [integer]
The number of bins used to partition the range of hardness ratios.
Only applicable when sclmode=HIST.
.le
.ls amin [integer]
The minimum value of a pixel to use in Image A.  Pixels below this value
are assigned zero in the output image.
.le
.ls bmin [integer]
The minimum value of a pixel to use in Image B.  Pixels below this value
are assigned zero in the output image.
.le
.ls (tchat = 10) [integer]
Set terminal chattiness.
.le 
.ls (lchat = 0) [integer]
Set log file and chattiness in the log file: = 0 the log file is 
not written.
.ls (clobber = no) [boolean]
If true,  an  existing  file  with  the  same  name  as  the
requested output file will be overwritten.
.le
.ih
EXAMPLES
.nf
 Generate a hardness ratio image with a linear scaling such that
 the resulting image contains values from 20 to 40, and pixels with
 less than 2 counts in each original image zeroed out in the final
 image.

   > mkhratio soft.img hard.img hr.img sclmode=linear sclfact=20 amin=2 bin=2
.fi
.ih
SEE ALSO
mkcolor
