In Sections and 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 . 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
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). Make also sure that you used exactly the same energy binning when running the science analysis of the different groups for the analysis step of interest (i.e., in this case for either the spectra or lightcurves extraction).
At this point 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 averaged RMF appropriate for your particular dataset. Since OSA v11.0 spe_pick creates the response files (RSPs) to be used with the specific dataset. The RSPs are attached to the corresponding og_group, in files isgr_rmf_ebds_xxxx_rbn.fits. The total averaged RSP is stored in the file GRS1758_sum_rbn_rmf.fits. All the RSPs are binned according to the energy bins that were specified during the spectral analysis. The response files combines both the redistribution matrix and the effective area. In OSA 10.2 and earlier, the spectral redistribution is stored in a single RMF file for the full mission and a set of time-dependent ARFs is produced. Note that in OSA11, for back compatibility, we have maintained the name ``rmf'' for the calibration files. The names of the response are inserted in the keywords of the final files, so that they are automatically recognised by XSPEC.