Since the non X-ray background (NXB) level of XIS primarily depends on the COR, the NXB data of the same COR value as the source observation would provide a good estimation of the background level. Considering the case when we make a spectrum of a source observation of many orbital cycles, we need to sum up the COR sorted "background" spectra with appropriate weights to get the background spectrum to be subtracted. For this purpose, COR sorted background spectra is useful. This script makes such sorted spectra with COR values at one time. We have also prepared a software tool to make COR weighted background spectra appropriate for a given source observation, which is 'mk_corweighted_bgd'.
Here is a instruction how to use these two tools, 'mk_corsorted_spec' and 'mk_corweighted_bgd', and make a COR weighted background spectrum.
linux> mk_corsorted_spec evtfile=ae_xi0_ntebgd_20060530.evt \ ehkfile=ae_xis_ntebgd_20060530.ehk name=nte \ region=circ.reg ph='192,1370'clobber=yesThe above command makes spectra and images from ae_xi0_ntebgd_20060530.evt. These filenames are nte_x0_cor_(cor1)_(cor2).pi, nte_x0_cor_(cor1)_(cor2).img and nte_x0_cor_(cor1)_(cor2).com, where (cor1) and (cor2) indicate the COR range from (cor1) to (cor2) GV. The default COR ranges are 0-4, 4-5, 5-6, 6-7, 7-8, 8-9, 9-10, 10-11, 11-12, 12-13 and 13-99 GV. The spectra are filtered with the region of 'circ.reg', while the images are not filtered with the region but are selected with PI channel from 192 to 1370. In additionally, the spectra and images are filtered calibration sources and bad columns with STATUS column. The input region file such as 'circ.reg' need to be specified with DETX-DETY coordinate, since the NXB level depends on the position of XIS and the NXB spectrum need to be maked from the same DETX-DETY region for target spectrum.
linux> evtfile=target_x0.evt ehkfile=target.ehk name=src \ region=circ.reg ph='192,1370' clobber=yes
S_w = Sum_n (T_n/T) S_n ,
where T_n and T are exporsure time for target observation with the COR range from (cor1) to (cor2) and with entire range of the COR, respectively. The S_n shows a spectra sorted with COR from (cor1) to (cor2) and their unit are counts/sec. The calculation makes equal the average of the COR for target spectrum and that for background spectrum.
linux> mk_corweighted_bgd tgtfile=src bgdfile=nte id=0 \ image=1 name=nxb clobber=yes
This command products corweighted_nxb_x0.pi, corweighted_nxb_x0.img and corweighted_nxb_x0.log as spectrum, image and log file, respectively. The background image of corweighted_nxb_x0.img is weighted with exposure time equal to target observation.
1.
mk_corsorted_spec evtfile=gti_cln_a1413_x0.evt \ ehkfile=ae20051115_1955_0434.ehk.gz name=a1413 step=0,9,14 \ region=exclude.reg status=0 clobber=yes2.
mk_corsorted_spec