.help genrsp Feb97 ftools.caltools
.ih
NAME
GENRSP -- Generic spectral response generator
.ih
USAGE
genrsp [<rmffil> [<res_reln> [<res_file> [<fwhm> [<disperse> [<tlscpe> 
       [<instrm> [<low> [<high> [<delta> [<break> [<delta2> [<chan_low>
       [<chan_high> [<chan_delta> [<chan_break> [<chan_delta2> [<efffil>
       [<detfil> [<filfil> [<max_elements> [<rsp_min> [<clobber> 
       ]]]]]]]]]]]]]]]]]]]]]]]

genrsp [rmffil=<rmffil>] [res_reln=<res_reln>] [res_file=<res_file>]
       [fwhm=<fwhm>] [disperse=<disperse>] [tlscpe=<tlscpe>] 
       [instrm=<instrm>] [low=<low>] [high=<high>] [delta=<delta>] 
       [break=<break>] [delta2=<delta2>] [chan_low=<chan_low>]
       [chan_high=<chan_high>] [chan_delta=<chan_delta>] 
       [chan_break=<chan_break>] [chan_delta2=<chan_delta2>] 
       [efffil=<efffil>] [detfil=<detfil>] [filfil=<filfil>] 
       [max_elements=<max_elements>] [rsp_min=<rsp_min>] 
       [clobber=<clobber>] 

.ih
DESCRIPTION
GENRSP is a generator for the spectral response files used by XSPEC. It
is primarily intended as a way of making quick response files when 
designing new instruments. GENRSP assumes that the response is Gaussian
which is unlikely to be the case in reality so these responses are
probably not going to be useful for analyzing actual data.

The first parameter to set is <res_reln> which specifies the way that
the resolution varies with energy or wavelength. The options are CONSTANT,
SQROOT (energy only), CZT (energy only), and FILE. CZT is a special case
and uses the relation FWHM = E/(10*sqrt(20/E)). If FILE is specified then
<res_file> should be used to give the filename. This should be an ascii
file with two columns, the first being the energy or wavelength and the 
second the FWHM. Both should be in keV or Angstrom. If CONSTANT or SQROOT
are specifed then <fwhm> should be set. In the case of SQROOT this is
assumed to be the FWHM in keV at 1 keV.

If CONSTANT or FILE are chosen then the <disperse> parameter specifies
whether the spectrometer is dispersive or non-dispersive. If <disperse>=yes
then all parameters are assumed to be wavelengths in Angstroms while if 
<disperse>=no they are assumed to be energies in keV.

The response energy bins (ie the energies on which the model is calculated
in XSPEC) are assumed to be linear starting at <low> going up to <high>
with size <delta>. If the <break> parameter is set then the binsize changes
to <delta2> for energies or wavelengths above <break> keV or Angstrom.
The channel energies are defined in a similar way by the parameters chan_*.

There are three files that can be used to give the instrument efficiency.
<efffil> is the effective area curve, <detfil> the detector efficiency,
and <filfil> the filter transmission. Any two out of three of these can
be set to the string none. These files should be ascii with two columns,
the first the energy in keV and the second the area/efficiency/transmission.

The response matrix is calculated in a compressed format with only elements 
having values above <rsp_min> being stored. The parameter <max_elements>
is used to allocate memory for the matrix elements so should exceed the
number of elements that are expected to be stored.
.ih
PARAMETERS
.ls rmffil [string]
The name of the output spectral response matrix file.
.le
.ls res_reln [string]
The relation that describes the change in resolution with energy or
wavelength. Options are CONSTANT, SQROOT, CZT, and FILE.
.le
.ls res_file [string]
The filename required if <res_reln>=FILE.
.le
.ls fwhm [real]
The fiducial FWHM for <res_reln>=CONSTANT or <res_reln>=SQROOT.
.le
.ls disperse [bool]
If set to yes then input parameters in wavelength, otherwise energy.
.le
.ls tlscpe [string]
The telescope name.
.le
.ls instrm [string]
The instrument name.
.le
.ls low [real]
The low energy or wavelength for the response energies.
.le
.ls high [real]
The high energy or wavelength for the response energies.
.le
.ls delta [real]
The binsize for the response energies.
.le
.ls break [real]
The energy or wavelength where the response bins change size.
.le
.ls delta2 [real]
The binsize for the response energies above <break>.
.le
.ls chan_low [real]
The low energy or wavelength for the response channels.
.le
.ls chan_high [real]
The high energy or wavelength for the response channels.
.le
.ls chan_delta [real]
The binsize for the response channels.
.le
.ls chan_break [real]
The energy or wavelength where the response channels change size.
.le
.ls chan_delta2 [real]
The binsize for the response channels above <chan_break>.
.le
.ls efffil [string]
The name of the file with effective areas.
.le
.ls detfil [string]
The name of the file with detector effeciencies.
.le
.ls filfil [string]
The name of the file with filter transmissions.
.le
.ls max_elements [int]
The maximum number of response elements to be stored.
.le
.ls rsp_min [real]
The maximum value of a response element to be stored.
.le
.ls clobber [bool]
If clobber = yes then overwrite the output file if a file of this name already
exists.
.le
.ih
BUGS
.ih


.endhelp




