next up previous contents
Next: Combining spectra and lightcurves Up: Combining results from different Previous: Combining results from different   Contents


Creating a mosaic from different observation groups

Suppose you want to analyse 5 Science Windows and are not interested in the final mosaic. You create the group with og_create and then you launch the analysis till the imaging step but without the mosaic step (i.e. from COR till IMA with OBS1_DoPart2 = 0, see 8.2.2). An image is created per Science Window but you do not have the overall final mosaic. If you then change your mind and decide that you want the mosaic, all you have to do is move in the working directory $REP_BASE_PROD/obs/xxx and relaunch the ibis_science_analysis command with startLevel="IMA", endLevel="IMA" and OBS1_DoPart2=1.
This is relatively simple because all the Science Windows belong to the same group, so combining the results is trivial. But if this is not the case, i.e. if you have run different sets of analysis, each one with its own og_create command, then you need to make some intermediate steps [*]. You basically need to create a file that points to all the Science Windows you want to co-add. We call this file an "index". To create an index make a list of the Science Window groups you want to combine and save it as, e.g., dols.txt. 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 obs/*/scw/*.001/isgri_sky_ima.fits files exist in all the Science Windows you mention, otherwise the merging will not work. Then give the command that actually builds the fits file from the ASCII file:

cp dols.txt $REP_BASE_PROD/obs/GROUP1/
cd $REP_BASE_PROD/obs/GROUP1/
txt2idx element="dols.txt" index="index_comb.fits"
The file "index_comb.fits" is created and you can look at it with fv. In the first extension you have 4 rows, each row has the link to a given swg_ibis.fits file. What you need to do now it to let the software know that it has to use this particular set of Science Windows for the analysis. You do this by pointing og_ibis.fits to this file. This has to be done because no matter what level of the scientific analysis you are performing, the software will analyse the Science Windows pointed to by og_ibis.fits. Replace the first row of og_ibis.fits with:
cd $REP_BASE_PROD/obs/GROUP1/
ftedit og_ibis.fits MEMBER_LOCATION 1 index_comb.fits
fdelrow og_ibis.fits+1 2 1 N Y
rm isgri_catalog.fits

With the fdelrow command you detach from the first extension of og_ibis.fits row number ``2'' (= the first row to be deleted, number of rows to be deleted = ``1''), you were shown no keyword values, ``N'', and you agreed to proceed ,``Y''. This second row contained the catalog that was created in previous run during CAT_I step, and contain only sources that were in the field of view of science windows from GROUP1. To have a common catalog for GROUP1 and GROUP2 it would be necessary to rerun CAT_I step for the group referring to all science windows of interest.

You may check with fv that actually the first row of og_ibis.fits is indeed "index_comb.fits".

Before running the mosaic step please be aware that:

At this point you are ready to launch the analysis and to create a joint mosaic:

cd $REP_BASE_PROD/obs/GROUP1
ibis_science_analysis ogDOL="og_ibis.fits" \
startLevel="CAT_I" endLevel="IMA"  OBS1_DoPart2=2

See 8.2.2 for a description of the main parameters of the mosaic step. The above command is valid in case you have just run the ScW analysis part so that you indeed keep the same energy boundaries. Otherwise, if your parameter file has changed in between, you should add in the above the definition of IBIS_II_ChanNum, IBIS_II_E_band_min and IBIS_II_E_band_max according to the boundaries of the single ScW maps you want to merge.


next up previous contents
Next: Combining spectra and lightcurves Up: Combining results from different Previous: Combining results from different   Contents
inthelp@sciops.esa.int