next up previous contents
Next: Extracting images in more Up: Useful recipes for the Previous: Combining spectra and lightcurves   Contents


Rebinning the Response Matrix

Read this if you want to use a spectral binning different from the default one. You will also learn how to rebin the response matrix to extract images in more than 10 energy ranges.

The file $REP_BASE_PROD/ic/ibis/rsp/isgr_rmf_grp_0025.fits contains the latest full response matrix with 2048 channels. With the help of the FTOOLS program rbnrmf you can rebin this matrix according to your needs. The default rebinned matrix is $REP_BASE_PROD/ic/ibis/rsp/isgr_rmf_grp_0027.fits and has 13 energy bins in its third extension. The optimum way to rebin the matrix depends on the source and on what you are interested to study, so there is not a general best way to rebin it. Nevertheless, it is reasonable not to spend time on a fine energy binning where the source is too weak and background contaminated as well as it is better to avoid too narrow energy bins for weak sources: extracting a spectrum in wider energy bins from the very beginning is better than extracting it in too fine bins, being background contaminated, and then rebinning the spectrum afterwards.

To use rbnrmf you should create an ASCII file with three columns, representing minimal and maximal channels, and the compression factor. In the example below we create the file new_bin.txt in order to apply a compression factor of 16 to channels 10 - 409 (17.7 - 209.26keV), and ignore all the others. This will lead to [(maximal_channel-minimal_channel+1)/compression factor] number of final bins, i.e. in this example to 25 bins.

 0   9   -1
 10  409  16
 410 2047 -1
To rebin the matrix give the command:
rbnrmf infile="$REP_BASE_PROD/ic/ibis/rsp/isgr_rmf_grp_0025.fits" \
outfile="new-rmf.fits" binfile="new_bin.txt"
As a result of this, you now have the rebinned response matrix new-rmf.fits. With the help of fv you can see that the rebinned matrix is saved in the third extension of the file. For the successful analysis you should make new rebinned matrix read-only:
chmod -w new-rmf.fits

To tell the software to use this newly created matrix set in your analysis
IBIS_SI_inEnergyValues="/PATH-TO-THE-FILE/new-rmf.fits[3]"
otherwise the default 13 channels will be used (corresponding to an empty value of IBIS_SI_inEnergyValues).

To have the correct name of the response matrix in the header of the spectrum file you should set SCW2_ISPE_idx_isgrResp="new-rmf.fits". Warning:This parameter is hidden. Thus you should either provide the value of this parameter during the script launch

ibis_science_analysis SCW2_ISPE_idx_isgrResp="new-rmf.fits"
or press "hidden"-button and set this parameter on the SPE page.



Subsections
next up previous contents
Next: Extracting images in more Up: Useful recipes for the Previous: Combining spectra and lightcurves   Contents
inthelp@sciops.esa.int