.help rbnrpsf Feb95 ftools.caltools 
.ih
NAME
rbnrpsf - rebins a radial PSF dataset 
.ih
USAGE
rbnrpsf infile outfile c_min 
.ih
DESCRIPTION
  
  rbnrpsf reads an i/p FITS datafile containing a radial point spread 
function dataset in OGIP-standard format, and rebins the dataset such that 
such that each new bin contains a user-supplied minimum number of counts. 
The result is written in the form of a BINTABLE (with extname = OBS RPSF) 
in the output file (again in OGIP standard format). Details of the o/p
file formats supported can be found in the OGIP Calibration Memo
CAL/GEN/92-020 available via the OGIP anonymous ftp account on
legacy.gsfc.nasa.gov (in Postscript) as caldb/docs/memos/cal_gen_92_020.ps.

  The number of ('source') counts in each radial bin is calculated after 
the subtraction of an appropriate background. By default this background is
obtained from the BACKGRND keyword within the i/p file (and may be zero). 
However users may override this value by entering their own (see below).

.ih
WARNINGS ON USAGE

  You need to specify the extension number when specifying the name of
the input FITS file. If the input filename is infile.fits and the extension
for radial profile is 2, then it should be infile.fits[2].

  If a radial profile has been background subtracted, with an overestimate
for the background rate, negative counts can be present in the input 
datafile. It is important to note that when PCRPSF performs the rebinning, 
these negative values are (negatively) included within the summation to 
determine whether the requested number of minimum counts are in the new bin.
This often results in wide output bins.

  In order to obtain a good resolution extract the radial profile with many
steps, for example, if the extraction is performed from 0 to 10 arcminutes,
use at least 80 steps.

.ih
PARAMETERS
.ls infile [character string]
 The input filename (produced by st2rpsf) containing the 1-dimensional 
radial profile of a source.
.le
.ls outfile [character string]
 The name of the output file to be created (in OGIP standard format),
containing an extension with the rebinned radial profile dataset.
.le
.ls c_min [integer]
 Minimum number of counts per bin, for rebinning purposes.
.le
.ls bkgd [character string (real value parsed)]
 Background count rate (in counts per pixel) should the user wish to 
 override the value written in the BACKGRND keyword in the i/p file.
 The special/default value ("%") indicates that the value from the i/p 
 data file should be used. The special character "CALC" indicates that
 the background should be calculated. NOTE: If the background value
 is changed then the sum of the source counts has to be adjusted (SUMRCTS
 keyword in datafile).
.le
.ls bkgd_rad [real]
 Only prompted for if bkgd="CALC". This is the inner radius for background
 calculation. NOTE: For Rosat PSPC an inner radius less than 2 arcmins
 is not recommended as the background estimate could be contaminated by
 the PSF. For ROSAT HRI data an inner radius less than 1/2 arcmin is
 not recommended.
.le
.ls chatter [chattiness flag (hidden)]
 The value of the chatter flag, useful for reassurance & diagostics 
 purposes. The default value is chatter=10, with chatter <= 5 being very 
 quite and chatter >= 20 very verbose (silly).
.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
  You need to specify the extension number when specifying the name of
the input FITS file. For example, if the input filename is infile.fits and 
the extension for radial profile is 2, then it should be infile.fits[2].
.ih
SEE ALSO
.br
.nj
 The ftools/caltools task st2rpsf
.br
.nj
 The ftools/caltools task rpsfqdp
.br
.nj
 The ftools/caltools task calcrpsf
.br
.nj
 The ftools/rosat task pcrpsf
.ju

.ih
PRIMARY AUTHOR
 
.nj
Rehana Yusaf
.br
.nj
HEASARC
.br
.nj
NASA/GSFC
.br
.nj
ftoolshelp@athena.gsfc.nasa.gov
.ju

.endhelp

