.help flx2xsp Nov1998 ftools.heasarc 
.ih
NAME
flx2xsp -- Creates spectra and response files from an ascii file of fluxes and errors.
.ih
USAGE
flx2xsp infile phafil rspfil

.ih
DESCRIPTION

FLX2XSP creates OGIP standard PHA and RSP FITS files from an ascii file
containing fluxes and errors. The response file created is a unit diagonal
matrix of the appropriate size. This ftool can be used to convert any
input data into something that can be fit using XSPEC (whether this is the
correct thing to do is, of course, up to the judgement of the user).

.ih
PARAMETERS
.le
.ls infile [character string]
 The name of the ASCII file containing the fluxes and errors. Each line should
 contain at least four numbers. The first two give the energy range (in keV) 
 over which the flux is measured. The third number is the flux and the fourth 
 the one sigma error on the flux. The flux should be in units of photons/cm^2/s.
 If the file contains multiple spectra then the nspec parameter (see below) 
 should be set and each spectrum should be another two columns in the file ie
 the second spectrum will be the fifth and sixth numbers etc. The file should be 
 ordered in increasing energy and energy ranges should be contiguous ie the lower
 energy for one line should be the higher energy of the previous line. 
.le 
.ls phafil [character string]
 The name of the output spectrum file. If more than one spectrum is included
 in the input ascii file then this will be in the typeII spectral FITS format.
.le
.ls rspfil [character string]
 The name of the output response file
.le
.ls nspec [integer]
 The number of spectra in the input file
.le
.ls (clobber = no) [boolean]
 If yes then an existing file can be overwritten.
.le

.ih
BUGS
None known

.ih
SEE ALSO
.br
.nj
 Arnaud etal, 1992. Legacy, 2, 65 (OGIP/92-007)
.br
.nj
 The ftools/heasarc tasks GRPPHA, ASCII2PHA
.ju

.ih
PRIMARY AUTHOR

.nj
Keith Arnaud
.br
.nj
HEASARC
.br
.nj
NASA/GSFC
.br
.nj
http://heasarc.gsfc.nasa.gov/cgi-bin/ftoolshelp
.br
.ju

.endhelp
