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, see [*]). 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 to move in the working directory $REP_BASE_PROD/obs/xxx and relaunch the jemx_science_analysis command with startLevel="IMA2", endLevel="IMA2".
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/011901060010.001/swg_jmx2.fits
/WORKING-DIR/obs/GROUP1/scw/011901070010.001/swg_jmx2.fits
/WORKING-DIR/obs/GROUP2/scw/012000360010.001/swg_jmx2.fits
/WORKING-DIR/obs/GROUP2/scw/012000370010.001/swg_jmx2.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/jmx2_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_jmx2.fits file. What you need to do now is 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_jmx2.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_jmx2.fits. Replace the first row of og_jmx2.fits with:
cd $REP_BASE_PROD/obs/GROUP1/
ftedit og_jmx2.fits MEMBER_LOCATION 1 index_comb.fits

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

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

cd $REP_BASE_PROD/obs/GROUP1
jemx_science_analysis ogDOL="og_jmx2.fits" \
   startLevel="IMA2" endLevel="IMA2"

See [*] 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 nChanBins, chanLow and chanHigh according to the energy 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