WSPIROS
=======

recasts iros output into an ascii format file which can be read by, e.g.,
the spectral package SPEX.

(If you want to do spectral analysis using XSPEC, you first need to
1. create a fits-format spectrum data file, e.g., using the fitstool ascii2pha
2. rebin the response matrix (available at the SDC ftp-site) according
   to your choice of energybands in the spectrum.
   This can be done using the fitstool rbnrmf.)

Wspiros now creates for each source found by iros a separate outputfile, 
with columns for:

1. number of energyband
2. exposure time (sec)
3. countrate (counts/s/cm^2)
4. uncertainty in countrate (idem)
5. and 6. spare

Example:

In observation op_4462/w2 1 source and the background are detected, so
after running wspiros 

w_x wspiros skyfile=WOP4462_w2_4bands.res rootname=WOP4462_w2_4bands

we end up with two .spa files, i.e,

WOP4462_w2_4bands_01.spa, and
WOP4462_w2_4bands_02.spa

Note that iros cannot determine the uncertainty in the
background flux (set to zero in second file).

-------------------------------------------------------------------------
Sample output file  WOP4462_w2_4bands_01.spa:
-------------------------------------------------------------------------
C SOURCE SPECTRUM
C input file: WOP4462_w2_4bands_iros_d1.res                               
C date: 27-JUL-98 15:21:37
C Source:   X0115-737                       
C RA/Dec:    19.38909062   -73.47483962
C BAND  1  (2,12)            590637      0.3202E+00
C BAND  2  (13,20)           387916      0.3879E+06
C BAND  3  (21,27)           544005      0.5440E+06
C BAND  4  (28,31)           215612      0.2156E+06
SPEX
           4
    1   13679.7      2.149735E-02  4.319813E-02  0.000000E+00  0.000000E+00
    2   13679.7      2.961028E-02  3.897452E-02  0.000000E+00  0.000000E+00
    3   13679.7      4.379643E-02  5.542223E-02  0.000000E+00  0.000000E+00
    4   13679.7      3.511709E-02  0.128505      0.000000E+00  0.000000E+00

-------------------------------------------------------------------------
Sample output file  WOP4462_w2_4bands_02.spa:
-------------------------------------------------------------------------
 SOURCE SPECTRUM
C input file: WOP4462_w2_4bands_iros_d1.res                               
C date: 27-JUL-98 15:21:37
C Source:   Background                      
C RA/Dec:   326.67722820   -82.21923992
C BAND  1  (2,12)            590637      0.3202E+00
C BAND  2  (13,20)           387916      0.3879E+06
C BAND  3  (21,27)           544005      0.5440E+06
C BAND  4  (28,31)           215612      0.2156E+06
SPEX
           4
    1   13679.7      0.109224      0.000000E+00  0.000000E+00  0.000000E+00
    2   13679.7      6.954905E-02  0.000000E+00  0.000000E+00  0.000000E+00
    3   13679.7      9.506997E-02  0.000000E+00  0.000000E+00  0.000000E+00
    4   13679.7      3.577054E-02  0.000000E+00  0.000000E+00  0.000000E+00