Analyse SPI data in XSPEC

skip to content
INTEGRAL U.S. Guest Observer Facility
SPI: News! User Manuals Data IRFs and RMFs Documents & Links ISDC SPI page FAQs Contact

How to analyse SPI data with XSPEC 11

last update of this page: 14.06.2004

Here I describe how to fit SPIROS output spectra with XSPEC. You might have better ideas how to do it - then please send me your comments.
  • Create output spectra using SPIROS
  • Imagine your SPIROS output spectrum has the name spectra_data.fits, then execute the following steps
  • rebin the first single RMF (before revolution 140), the second single RMF (revolution 140-214), or the third single RMF (after revolution 214) in order to use it with your spectrum, applying spirmf. Use this parameter file for spirmf: spirmf.par
  • link the produced RMF to your spectrum by applying (for the group command use the number of energy bins you have, e.g. 1-30 like here for 30 energy bins)

    grppha spectra_data.fits xspec_spectrum.fits

    group 1-30 1
    chkey RESPFILE myresponse.rmf.fits

    Now set the keyword TLMAX1 to the actual number of energy bins (30 in our example):

    fparkey value=30 fitsfile=xspec_spectrum.fits\[1] keyword=TLMAX1 add=yes

  • start XSPEC and feed the spectrum into it:

    cpd /xs
    data xspec_spectrum.fits
    setpl energy
    mo po
    fit 1000
    flux 20,200
    plot ldata

    In case the spectrum of the source has been created by the simulation programs (spi_osim), you have to apply the following command in XSPEC in order to use the diagonal RMF only:


In case of questions and comments: contact me.