SPI data analysis
If you are unsure what to do, got stuck somewhere, or have questions
of any kind (concerning SPI), ask me (Ingo) or Pierre, or consult the
online
cookbook if we are not present.
First problem: simple Crab image analysis
This problem is very basic and all necessary commands are
provided to guide you through the basic steps.
This guideline is a strongly shortened version of the SPI analysis
cookbook. We strongly recommend, that you look at the online
cookbook in parallel, as the cookbook contains many explanations.
- Get a list of scws from here.
- Set up your environment as usual
- create your OG
- launch the main GUI: spi_science_analysis
- since we first want to know, what is in the data without biasing
our analysis, we do not want any catalog extraction.
- check the options for the energy binning. Since we want an image
first, make sure you use a single broad bin, i.e., 20-40 keV
- check the spiros options: make sure, spiros is set to "imaging"
mode. Use POINTING+FCFOV to get nicer intensity images.
- run the pipeline
- when the pipeline has finished, check the produced logfile
spi_sa........log: you will see lots of output from all executables
called by the script. This logfile is also a good place to look for
any unusual messages in case you experience problems. Go to the end of
the logfile to the spiros section and locate the Contributions to
CHI2 parameter by pointing exposure table. It is a bit confusing
to read, but very important. Checkout the column "Reduced CHI2". All
values should be compatible with a good fit (i.e., around 1.0).
For this first problem, I have provided you a cleaned list of science
windows, so all Reduced CHI2 should be OK.
- create a region file for ds9 from the source list provided by
spiros
- look at your images with ds9:
Intensity image:
ds9
spiros_image_intensity_result.fits -region source_res.reg
Actually more important is usually the significance image:
ds9
spiros_image_sigma_result.fits -region source_res.reg
but
also take a look at the error image.
Exercises
- Rerun spiros, but play with the different settings of spiros:
change Optimization statistic from CHI2 to maximum Likelihood (LIKEH)
- use a different background method (i.e., 5 instead of 3), use the GeDSat background model together with spiros method 2
- play with the sigma threshold and the number of sources: i.e.,
decrease the threshold to 1 and increase the number of sources and
look at your images and source list.
- rerun the pipeline, but use a different energy band (i.e., at higher
energies,...)
Second problem: simple Crab spectral analysis
- Copy your OG (i.e., cp -r crab_ima crab_spe, and cd into
the new OG
- create an appropriate input catalog: copy the produced source
list cp source_res.fits source_cat.fits
- use fv, to edit the columns "name" and "sel_flag". Source-1 will
be the Crab, so set the name appropriately. Make sure that the
sel_flag for the Crab is set to 1.
- edit the header of the extension and replace the extension name
"SPI.-SRCL-RES" with "SPI.-SRCL-CAT"
- save and quit fv
- launch spi_science_analysis
- provide source_cat.fits as input catalog!
- select an energy binning that is appropriate for spectral
analysis, i.e., 20-200 keV in -100 bins (the minus gives you a
logarithmic binning which you should prefer)
- set spiros in spectral mode and also select LIKEH as optimization
statistic (preferred for spectral extraction, but not necessary)
- run
- launch xspec and analyze the produced spectrum spectrum_Crab.fits
Exercises
- use different binnings to extract spectra
- run spi_science_analysis in spectral mode without any input
catalog: what happens?
Third problem: real life analysis of V0332+53
Note that unlike before, you'll be confronted here with a real life
example, i.e., an uncleaned science window list as you download it
from the archive (or from your private data).
- begin from scratch, i.e., remove your previous
spi_science_analysis.par file: rm ~/pfiles/spi_science_analysis.par
- Download the scw list from here.
- create your OG as usual
- Again, do not use the catalog extraction
- run a simple image analysis
- look at the Contributions to CHI2 parameter by pointing
exposure table in the logfile. You see some really bad pointings!
- rerun spiros, but use background method 5 this time - the
situations should be much better now, but still many pointings are
unacceptable: write down those pointings which are really bad
- rerun spiros, but exclude those really bad pointings
- check the logfile. Repeat this selection process until you have a
good solution.
Exercises
- Look again at your first logfile. Checkout the duration of the
pointings. The first one is exceptional. What has happened?
- how many science windows do you have in your OG? How many are
analyzed by spiros? What has happened?
- try the different background methods / models to see how that
influences the resulting CHI2 contributions
- create a spectrum and fit it in xspec
- create a new OG, and run the catalog step only. Look at the produced
catalog with fv. Search for your source V0332+53 (remember that the
name in the catalog might be different). Hint: V0332+53 is a transient.
- use only sources detected by SPI for catalog extraction: enter
$ISDC_REF_CAT[SPI_FLAG==1] as reference catalog in the
catalog options box. Check the resulting catalog! Do the same for the
Crab example above.
- the sources are not round. Why? Hint: try galactic coordinates.
Prepared by Ingo Kreykenbohm (ISDC/IAAT).
Email:Ingo
Kreykenbohm@obs.unige.ch
Telephone: +41 22 3792102