next up previous contents
Next: Rebinning the Response Matrix Up: Combining results from different Previous: Creating a mosaic from   Contents


Combining spectra and lightcurves from different observation groups

In Sections 7.2 and 7.3 you have seen how to merge lightcurves and spectra from different Science Windows belonging to the same group. In that case the file og_ibis.fits points to all the Science Windows and it is possible to launch the collecting/merging tools lc_pick and spe_pick directly on the group (group=og_ibis.fits+1).

If you have Science Windows belonging to different groups, you need an intermediate step. Basically you need to create a file (an index) that points to all the Science Windows you want to co-add, similarly to the case seen in section 9.4.1. Then this file will be given as input via the "group" parameter at the place of og_ibis.fits.

To create the index make a list of the Science Window groups you want to combine and save it as, e.g., dols.txt under $REP_BASE_PROD/obs/. To ensure a proper work of the software give the full path, i.e. your file should look like

/WORKING-DIR/obs/GROUP1/scw/011901070010.001/swg_ibis.fits
/WORKING-DIR/obs/GROUP1/scw/011901080010.001/swg_ibis.fits
/WORKING-DIR/obs/GROUP2/scw/012000360010.001/swg_ibis.fits
/WORKING-DIR/obs/GROUP2/scw/012000370010.001/swg_ibis.fits

The first 2 files belong to a run with the og_create parameter "ogid" equal to "GROUP1" while the latter two to a run with "ogid" equal to "GROUP2" /WORKING-DIR/ has to be the extensive name of $REP_BASE_PROD. WARNING: make sure that the lightcurve and spectra result files exist for each Science Window you want to co-add (isgri_lcr.fits and isgri_spectrum.fits files).

Then give the command that actually builds the fits file from the ASCII file:

cd $REP_BASE_PROD/obs/
txt2idx element="dols.txt" index="index_comb_2.fits"

Then run lc_pick and spe_pick putting the parameter "group" equal to "index_comb_2.fits":

cd $REP_BASE_PROD/obs/
lc_pick source='GRS 1758-258' attach=n \
group=index_comb_2.fits+1 lc=GRS1758.lc.fits emin="20"  \
emax=40 instrument="ISGRI"
GRS1758.lc.fits contains the merged lightcurve of GRS 1758-258 in the 20-40keV band (energy range that of course has to exist in the isgri_lcr.fits original files!).

cd $REP_BASE_PROD/obs
spe_pick group="index_comb_2.fits"\
                source="GRS 1758-258" rootname="GRS1758"  instrument="ISGRI"

GRS1758_sum_pha.fits (the combined spectrum of GRS 1758-258) and GRS1758_single_pha2.fits (a file with the four spectra of the initial four Science Windows collected together) are created. spe_pick also creates an ARF, appropriate for your particular dataset. This ARF is written to GRS1758_sum_arf.fits and GRS1758_single_pha2.fits files. The names of the response and ancrfile are inserted in the keyword of the final files, so that they are automatically recognised by XSPEC.


next up previous contents
Next: Rebinning the Response Matrix Up: Combining results from different Previous: Creating a mosaic from   Contents
inthelp@sciops.esa.int