Analysing a GRB with ISDC/SPI software

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

Analysing a GRB with ISDC/SPI software

last update of this page: 26.07.2005

Here I describe how to analyse a gamma-ray burst (GRB) in the SPI field of view using OSA 4.2 and the latest version of SPIROS. In case you are not familiar with the terms, start with more basic documentation first, e.g. the SPI online user manual (very short), or follow the SPI cookbook.
For OSA 5.0 there is also a specific software available: How to derive images of short bursts, such as GRB, from SPI data and How to derive spectra of short burst, such as GRB, from SPI data

My procedure uses OSA 4.2 software. First create a background detector spectrum in order to have a good model:

  • create an observation group, which includes only the science window when the GRB occured.
  • create a user defined GTI with the start/end time of the GRB. A description, how to do this can be found on this page.
  • make sure that the header keyword GTI_TYPE is set to 'BAD':
    fparkey value=BAD fitsfile=usergti.fits\[1] keyword=GTI_TYPE
  • edit your spi_science_analysis.par file. You have to use the alternative pipeline. Use the same energy bins and (pseudo-)detectors you want to use for analysing the GRB. For imaging I suggest: one energy bin (20-200 keV) and detector 0-18. For spectral extraction the binning depends on the GRB strength, but you should use detector 0-84.
  • run spi_science_analysis with startLevel="POIN" and endLevel="BIN_I". Do not forget to include the user GTI file you produced.

Now we have a good background model detector spectrum, which excludes the time of the GRB. Next step is to create an image of the GRB itself:

  • create an observation group, which includes only the science window when the GRB occured.
  • copy the user defined GTI from the previous run
  • make sure that the header keyword GTI_TYPE is set to 'GOOD':
    fparkey value=GOOD fitsfile=usergti.fits\[1] keyword=GTI_TYPE
  • use the same parameter file as before, but with endLevel="RSP_I". Use e.g. the "DFEE" background (just to have some background file, which can afterwards be replaced). Use a fluxMin for cat_extract high enough to NOT select any source (e.g. fluxMin=10):
    spi_science_analysis startLevel="POIN" endLevel="RSP_I" cat_extract_fluxMin="10"
  • run spioffback (if you do not have this tool, download spioffback-2.1.tar.gz here - and learn how to install it); as an input for counts_OFF_input_file use the SPI.-OBS.-DSP file (evts_det_spec.fits[1]) of the processing done before:
    spioffback counts_ON_input_file=spi/evts_det_spec.fits\[1] ebounds_input_file=spi/energy_boundaries.fits\[1] deadtime-dol=spi/dead_time.fits\[1] back_output_file="spioffback.fits(SPI.-BMOD-DSP.tpl)"
  • copy the spioffback output file to the location of the background file SPI.-BMOD-DSP (back_model.fits):
    cp spioffback.fits spi/back_model.fits
  • run spi_science_analysis with startLevel=IMA endLevel=IMA, background method=3, imaging mode, nofsources=2 :
    spi_science_analysis startLevel="IMA" endLevel="IMA" spiros_background-method=3 spiros_mode="IMAGING" spiros_nofsources=2
  • this should find you the GRB. Look into spi/source_res.fits for details, check also the log file; in case the chi squared is >> 1.0, something went wrong.
  • the output image and catalogue you will find under

In case of questions and comments: contact me.