Next: Tips and Tricks
Previous: Gamma Ray Burst imaging
In the following section we explain how to derive spectra of
short bursts, such as GRB, from SPI data. We assume that readers have
some knowledge about SPI data analysis with the ISDC
spi_science_analysis script. Please follow the cookbook example
in previous sections if it is not your case.
Furthermore, the user is asked to follow the points 1 to 4 from the previous section
on GRB imaging. Once this is achieved, you
have an observation group in the current directory and you can
continue with the following steps.
- The burst position at which you want to extract a spectrum must
now be specified. This is done by providing a ``source_cat.fits'' file
containing the GRB position. You can either use an existing file, or
create a new one using the spi_science_analysis to run the catalogue
extraction step (the spi_science_analysis main GUI is shown in
Select ``catalogue extraction'' and un-select all other tasks, click on
"catalog" to enter the catalogue task parameters. Click ``Ok'' to
close the ``catalogue'' window, and on ``Run'' in the main frame to
execute spi_science_analysis. The ``source_cat.fits'' catalogue
produced contains irrelevant data. It will probably include a
number of catalogue sources that may be detected on longer
observation, and certainly not the GRB position from which we want to
extract a spectrum. The catalogue file should include a single row
with the GRB identification and position. Edit this file with``f''
and enter the correct identification and position, deleting extra
rows if any, and save the result.
Alternatively, the position from the SPI image analysis can be used
(see Sect. for how to transform a ``source_res.fits''
into a ``source_cat.fits''), although in most cases a more accurate
position should be available, e.g. from IBIS.
If you use an existing ``source_cat.fits'' file make sure with fv that
it contains the correct identification and position of the GRB and
that the ISDCLEVL keyword of this file is ``CAT_I''.
- As in the previous GRB imaging analysis case, two alternatives
can be used to specify the parameters of your analysis. The simplest one
is to use the spi_science_analysis GUI.
- Run spi_science_analysis and specify parameters through the
GUI, as displayed in Fig. .
Main GUI window of the spi_science_analysis script
- Check the ``List of detectors'' (use 0-18 in most cases) and the
``Coordinate System'' in that window, un-select ``catalogue
extraction'', enter the name of your file (source_cat.fits) in the
``spiros Input Catalog'' entry field and click on ``Energy_definition''
to open the GUI window (see Fig. ).
Energy boundaries GUI
- Select your energy binnning (in this case we use 6 bins ranging from 20 to
200 keV, logarithmically spaced as the bin number is negative),
click ``Ok''. This will close this window.
- Click on ``Background options'' and un-select the flat-field
default options as shown in Fig. , then click ``Ok'' to
close this window.
- Back in the parent window click the ``spiros'' button to open the GUI window
shown in Fig. .
spiros GUI main window
- Make sure the ``SPECTRA'' mode is specified, do not introduce
any selection parameters, and specify the ``Background method'' and
the ``Optimization statistic'' (see more details on the different
options for those parameters in Sect. )
- Close all sub-windows by clicking twice ``Ok'', then using the
``Save As'' button, you can save the parameters you have just entered
into a file. Enter the name ``grb_analysis.par'' and store it in
the current directory.
- Once the parameters are ``saved'', click on ``Quit'' to quite
the process. We do not want to run the analysis yet. This procedure
is just a convenient way to enter parameters for the analyses.
Again, as indicated in Sect. ,
the user can alternatively specify the parameter set by editing the
spi_science_analysis.par file located in your $PFILES directory.
- Now, the ``grb_analysis.par'' file located in the current
directory contains the main parameters you want to use in your
burst analysis and will be used by the script.
- Run ``spi_grb_analysis''. Without any command line argument
you get the following help text.
Outputs of spi_grb_analysis when invoked without any
Since we know the input parameters from the first point above, we can
then launch the spi_grb_analysis script. Make sure the ``grb_start''
- ``sec_to_avoid_before_grb'' is not before the pointing start, and
that ``grb_stop'' + ``sec_to_avoid_after_grb'' is not after the
pointing end, as there is no corresponding checks in the
In our example:
spi_grb_analysis 2003-05-01T03:10:10.000 2003-05-01T03:10:30.000 UTC
Again, if you want to keep your output before running the script a second time, we suggest you to
save them by copying the entire directory (e.g., cd ..; cp -r
grb030501 grb030501_spectra; cd grb030501) before continuing.
- After a successful run of ``spi_grb_analysis" (step 7) you
obtain a spectrum of the burst, called spectrum_''your GRB
ID''.fits, containing a link to the appropriate RMF response. You
can directly enter XSPEC to display and fit your resulting spectrum
(see Sect. for more information).
- ``spi_grb_analysis'' is calling a number of executables and
``spi_science_analysis'' several times. Since
``spi_science_analysis'' produces its own log file, the log file
situation after running ``spi_grb_analysis'' is somewhat
complicated. The resulting ``/spi_grb_analysis.log'' is the high
level log file, containing logs from the executables called directly
by "spi_grb_analysis". In addition, you can find three log files
``spi_pointing.log'', ``spi_binning.log'', and
``spi_spiros.log''. The first contains the outputs of
spi_obs_point, the second includes the logs from the binning to
background steps, and the third contains the results from spiros.
- After a successful execution of ``spi_grb_analysis'', it is also
possible to run spiros again with the ``spi_science_analysis'' script.
Launch ``spi_science_analysis'', make sure you select only the spiros
step (if you select any other step, the burst background produced by
``spi_grb_analysis'' will be deleted and you will have to start it all
again), change the required spiros parameters (making a LIKEH
analysis rather than a
one for example), and run the show
Next: Tips and Tricks
Previous: Gamma Ray Burst imaging