.help gcorpha May96 ftools.caltools
.ih
NAME
gcorpha -- remaps PHA channels from SPECTRUM extension.
.ih
USAGE
gcorpha infil shftfil outfil 
.ih
DESCRIPTION

This task remaps PHA channels according as defined by user.

Given an OGIP-approved FITS format input file, this task provides the facility
to move the user-defined PHA channel elements (columns) of the array to the left 
or right (ie down or up in channel-space) by a user-defined number of channels. 

The shift to be applied to each channel of the input PHA channels 
must be specified by an ASCII input file. The format of each row of 
this input ASCII file must be 
.br
.ce
MINCHAN MAXCHAN NCHAN
.ju
denoting all 'columns' of the i/p PHA channels between
detector channels MINCHAN and MAXCHAN (inclusive) are to be shifted by
NCHAN. The shift, NCHAN, can be a positive or negative INTEGER or real number of
channels (or zero). Any channel ranges "implied" by their exclusion from
the ASCII file will be shifted by zero channels. Note that
should the shift applied to two or more 'columns' result in those
columns being in the same o/p detector channel, then their respective
probabilities (that an incident photon of a given energy will be detected
in that detector channel) WILL BE SUMMED. Similarly, should the
applied shifts result in an o/p detector channel 'column' NOT
being populated, then the probability (that an incident photon of a given
energy will be detected in that detector channel) will be set to zero. 
However, shifts below the minimum, and above the maximum legal channel number 
for the instrument will result in those probabilities being excluded.
.ih
WARNINGS ON USAGE

.br
.nj

.ih

PARAMETERS
.le
.ls infil [character string]
 The name of the FITS PHA file to be remapped in channel-space
.le
.ls outfil [character string]
 The name of the FITS file to be written containing the remapped PHA dataset
.le
.ls shftfil [character string]
 The name of an ascii file specifying the remapping information. The ascii 
 file format should be of the form :
.br
.ce 
  1 20 -1
.ce
 21 30 0
.ju
 where channels 1 to 20 are shifted back by one, and 21 to 30 stay as they are.
.le
.ls (chatter = 9) [integer]
 Flag to indicate how chatty the task is at execution. A value of 9 is the
 default, with lower/higher values producing quieter/verbose output
 respectively.    
.le
.ls (clobber = false) [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.
.le
.ih
BUGS
.br
.nj
None known

.ih
SEE ALSO
.br
.nj
GCORRMF           
.br
.nj
.ih
LOG OF SIGNIFICANT CHANGES

.ls v1.0.0 (1996 June)
    Initial public release
.le
.ih
PRIMARY AUTHOR

.nj
Banashree Mitra Seifert
.br
.nj
HEASARC
.br
.nj
NASA/GFSC
.br
.nj
http://heasarc.gsfc.nasa.gov/cgi-bin/ftoolshelp
.br
.nj
(301) 286-5307
.ju

.endhelp
