.help hriaspcor Jun94 ftools.rosat
.ih
NAME
hriaspcor -- Use Morse's method to correct
aspect errors in large photon event lists from HRI.  
.ih
USAGE
hriaspcor infile outfile iwobbin mincnts
.ih
DESCRIPTION
Reads an HRI events list and uses the algorithm of Jon Morse
to correct the standard aspect solution for detector "wobble". 
See (Morse, PASP 1994) for details of the algorithm.
Writes a new events list with corrected values of X and Y 
(actual sky position).  If the copyall parameter is set to true,
the new file should be identical to the old one except for the 
X and Y columns in the "good" events table and the necessary 
keyword changes in the headers. Default values of the parameters 
assume an RDF file.  Previously released data sets use FITS 
extension [3] and detector coordinate column names DX and DY.
It is recommended that the "dewobbling" bin size should 
correspond to ~10", and the mincnts parameter should not be 
less than 100.  Note, this technique will fail for extended
sources (i.e. anything with a real size larger than the
"dewobbling" bin size.   

.ih
PARAMETERS
.ls infile [filename]
The input FITS file name and extension.
.le
.ls outfil [filename]
The output FITS file name.  The new table will be in the same
extension as it was in infile. (Unless copyall=no, then it will
be in extension 1.)
.le
.ls iwobbin [integer]
The binning size for taking centroids and restacking
("dewobbling").  Recomended size: approximately 10", or about 20
pixels. 
.le
.ls  mincnts [real]
Minimum number of counts in a valid "dewobbling" bin.
Recommended: at least 100.
.le
.ls (xcol = 'RAWX') [string]
The name of the column containing the detector X coordinates.
.le
.ls (ycol = 'RAWY') [string]
The name of the column containing the detector Y coordinates.
.le
.ls (xcolcor = 'X') [string]
The name of the column containing the X sky coordinates.
.le
.ls (ycolcor = 'Y') [string]
The name of the column containing the Y sky coordinates.
.le
.ls (xrange = 'INDEF,INDEF') [string]
The X range of valid pixels in detector coordinates (note: not
sky coordinates).
.le
.ls (yrange = 'INDEF,INDEF') [string]
The Y range of valid pixels in detector coordinates (note: not
sky coordinates).
.le
.ls (copyprime=yes) [boolean]
Whether to copy all additional keywords from the primary array of input
file to the primary array of the output file.
.le
.ls (copyall=yes) [boolean]
Whether to copy all other HDUs from the input file to the output file.
.le
.ls (clobber=no) [boolean]
Whether to overwrite an existing output file.
.le
.ih
EXAMPLES 
To make a Morse-corrected version of an RFD file rh141873n00_bas.fits

ft>hriaspcor rh141873n00_bas.fits rh141873n00_bas_m.fits 20 100

To make a Morse-corrected table of the events from an old format (US Rev0)
HRI file rh160093.fits and write it as the only extension in a file
called meaty.fits 

ft>hriaspcor rh160093.fits[3] meaty.fits 20 100 copyall=no xcol="DX" ycol="DY"

.ih
NOTES:
If more than one bright source is in the field, you must use the
xrange and yrange parameters to isolate the source of interest.

.ih
KNOWN BUGS

Does not treat each orbit separately as specified in Morse's paper.

Subimage centroids are calculated by finding the center of gravity of
the entire subimage rather than just the central 3" (i.e. unlike in
Morse, no radial brightness profiles are calculated).

.ih
LOG OF SIGNIFICANT CHANGES

.ls v1.1 (1994 Sept.)
Added warning if zero counts, changed clobber to match new ftools
standard and added some new documentation.
.le
.ls v1.0.0 (1994 July)
Original version.
.le

.ih
PRIMARY AUTHOR

.nj
Lawrence E. Brown
.br
.nj
Hughes STX for
.br
.nj
NASA/GFSC
.br
.nj
http://heasarc.gsfc.nasa.gov/cgi-bin/ftoolshelp
.br
.nj
(301) 286-4996
.ju

.ih
SEE ALSO
.br
.nj
Morse, Jon, (June 1994, PASP, 106:675)
.br
.nj
f2dhisto,fimconcat
.ju
.endhelp
