Provisional method to obtain XIS particle background
2007 Sep 19 by Kenji Hamaguchi/GOF and the XIS Team
XIS team is preparing a new XIS NXB database, corresponding to v2.x processed data, for a release around the end of September. In the mean time, we describe a workaround that can be used with the existing trend archive.
Screened XIS event data still include particle and X-ray background events. These contributions can be estimated best from off-source area of the same XIS CCD chip, but this is not always possible for extended sources. Alternatively, we can estimate particle background during the observations of the target from the night Earth data, which have been collected by the XIS team and stored in the trend archive.
The XIS background level varies with the cut-off-ridigity (COR) value which is a function of the satellite position. You therefore need to weight the night Earth data by COR during your observation. The XIS team is developing a tool xisnxbgen, which should automatically generate background spectra and images for your observation, but for now you have to do it manualy. Here we explain how to obtain the night Earth data and to generate background spectra.
1. Download night Earth data from the trend archive
Go to the Suzaku trend archive and download night Earth data taken around your observation. The data are stored into monthly directories, each of which has 4 subdirectories for the XIS, HXD, XRS and ancillary data. For this purpose, you need the XIS night Earth data (stored at "year_month"/xis/xis[0-3]/xis[0-3]night/) and mkf files ("year_month"/misc/aemkf/), which have cut-off-ridigity (COR) values during the observations. Though these directories would contain files you do not need, it would be easier to download all the files with wget and remove unnecessary files later. Type, for example,> wget --passive-ftp -q -nH --cut-dirs=5 -r -l0 -c -N -np --retr-symlinks ftp://legacy.gsfc.nasa.gov/suzaku/data/trend/2007_06/xis/xis0/xis0night > wget --passive-ftp -q -nH --cut-dirs=5 -r -l0 -c -N -np --retr-symlinks ftp://legacy.gsfc.nasa.gov/suzaku/data/trend/2007_06/misc/aemkf
to obtain XIS0 night Earth data and mkf files. You will find directories aemkf and xis0/xis0night under the current directory. Below, we assume that we analyze the E0102.2-7219 data observed on 2007-06-13 (Seq. No. 102002010) and generate XIS0 background spectra for this observation using the night Earth data downloaded above. Though this example uses only one month of night Earth data, you are advised to use data taken over at least several months around your observation to obtain sufficient photon statistics. We should also note that the night Earth data taken too much apart from your observation do not reproduce the energy resolution well.
2. Find the night Earth data taken with the same observing mode and without telemetry saturation
The archive includes all kinds of data: the normal mode, the window option, spaced charge injection (SCI) and so on. You need to select data taken with the same XIS mode as your observation. You can find them from the microcode number in the file name after the edit mode. For example, the event file ae102002010xi0_0_3x3n066c_cl.evt.gz was taken with the microcode n066c: the normal mode with the SCI mode, and you need to find night Earth data files with the same microcode number. Most of the data for extended sources would be taken with the normal mode, then the microcode numbers you see should be:<
- Normal mode without the SCI option
- XIS0, 2, 3: n000
- XIS1: n001
- Normal mode with the SCI option
- XIS0, 2, 3: n066c
- XIS1: n069b
You can find the exact definition of the micro code number in CALDB
($CALDB/data/suzaku/xis/bcf/ae_xis_ucodelst_XXXXXXXX.fits). You may not
find many night Earth data with the same XIS mode as your observing data if your
data were taken between 2006 Dec. - 2007 April when the default XIS
mode switched from the non-SCI to the SCI option. In this case, you may
need to use the data
with the different SCI option with special care.
A small number of event files in the trend archive include data that
suffer telemetry saturation. You need to find them by your eyes with a
viewer such as ds9 and remove them. A telemetry saturated image shows a
weird square pattern like
this
(ae801064010xi0_0_5x5n066a_ne.evt). Fortunately, there was no such data
in June 2007.
Then, find out mkf files corresponding to the night Earth data you have selected. They have the same sequence number in the file name (9 digit numbers after "ae").
After this process, you will end up with these files in your directory.
3. Combine the XIS event data and mkf files
Next, you combine the night Earth data and mkf files into one file for each, so that you can utilize the tool to generate the background spectra.
3.1 Combine event files
Before combining event files, you need to change the header keywords "TCRVL10", "TCRVL11" in each event file, which describe the X/Y reference pixel coordinate in degree. Without this process, xselect tries to calculate an X/Y sky position of each event from the X/Y reference point in the event file that is read first and fails to do it for events with too large separation from the reference point. We thus tentatively put 0.0 for the X/Y reference points for all the event files.
First, ungzip all the event files. Go to the directory where event files are
(xis0/xis0night/ in this example), and type
> gunzip ae*.evt.gz
Then type, on the command line,
> fparkey 0.0 "event file\[1\]" TCRVL10 > fparkey 0.0 "event file\[1\]" TCRVL11For example,
> fparkey 0.0 ae102007010xi0_0_3x3n066c_ne.evt\[1\] TCRVL10 > fparkey 0.0 ae102007010xi0_0_3x3n066c_ne.evt\[1\] TCRVL11
Backslashes are needed on the command line to escape brackets. You may use this Perl script to run this command for all event files in a directory (be sure to change the perl command path on the 1st line.)
You can check by this command if those parameters are correctly changed.
> fkeyprint ae102007010xi0_0_3x3n066c_ne.evt\[1\] TCRVL10 > fkeyprint ae102007010xi0_0_3x3n066c_ne.evt\[1\] TCRVL11
Then feed these event files to xselect. Xselect can read up to 999 event
files, but it has a limitation of number of event files to be fed in
one command: to be precise, there is a limiation of the character length
in one command line. If you do not change file names of the event
files, you can feed up to 6 files to xselect in one command. Run
xselect and type commands as follows to feed all the event files.
xsel> read e "ae102007010xi0_0_3x3n066c_ne.evt ae102007010xi0_0_5x5n066c_ne.evt ae102009010xi0_0_3x3n086c_ne.evt ae402039010xi0_0_3x3n066a_ne.evt ae402039010xi0_0_5x5n066a_ne.evt ae702070010xi0_0_3x3n066a_ne.evt" xsel> read e "ae702073010xi0_0_3x3n066a_ne.evt ae702073010xi0_0_5x5n066a_ne.evt ...."
You may write a script like this
(nightevent.xcl)
and feed it to xselect.
xsel> @nightevent.xcl
Then type
xsel> extract event xsel> save event ae_xi0_ntebgd_200706.evt
Now you have a combined event file (which we have called ae_xi0_ntebgd_200706.evt - of course, this name is arbitrary).
3.2 Combine mkf files
Next, we combine the mkf files using ftmerge. First,
go to the directory where mkf files are and ungzip all the mkf files
> gunzip ae*.mkf.gz
we only use the "TIME" and "COR" columns in this processing, so we just copy these columns to the output file to reduce the file size. You need to remember that the output mkf file cannot be used for filtering with another parameters (SAA, ELV etc.)
> ftmerge ae102007010.mkf,ae402039010.mkf,ae702070010.mkf,ae702073010.mkf, ae702120010.mkf,ae801080020.mkf,ae802037010.mkf,ae802040010.mkf ae_200706.mkf columns='TIME,COR'
(Note that the above was broken into 4 lines for display purposes only.)
We then sort the output file in TIME order. You need to run this command even if you pile the mkf files in time order since there may be duplicated TIME rows from continuous observations.
> ftsort ae_200706.mkf ae_200706_sort.mkf TIME unique=YES
4. Screen the event data
You need to screen the night Earth data with the STATUS bit as you did
for your observing data. You need to do nothing if you just analyze
cleaned event files. You also need to remove flickering pixels. Type
xsel> cleansis
in XSELECT. You don't need to change the parameter values you are asked. Just hit the return key for all the questions.
5. Generate spectra
Now that you have created the combined event file "ae_xi0_ntebgd_200706.evt" and mkf file "ae_200706_sort.mkf", you are ready to run a tool to generate particle background spectrum. Documentation on how to download and use the software is provided at ISAS/JAXA. (You should put the night Earth event file after the option i and the mkf file after the option e).
If you have any questions concerning Suzaku, visit the Feedback form.

