Notes on analyzing Suzaku data using XSELECT
These notes are still somewhat preliminary and experimental. They cover cleaning XIS hot and flickering pixels, how to filter by grade, how to select events based on housekeeping information, making XIS and HXD products (especially spectra), how to use xselect to catalog all the event files for a source, and how to make summed images of all 4 XIS.
It is assumed that the data is from v1 processing although this really only changes the directory structure. If you are using v0.7 processed data then you will need to explicitly set the directory and name for the mkf file, for which you will be prompted at the appropriate point.
The latest version of HEAsoft (6.1.1) should be installed.
Cleaning XIS hot/flickering pixels
The cleansis ftool originally written for ASCA SIS by Eric Gotthelf has been generalized first for Swift XRT and now for Suzaku XIS. This can either be run standalone or within xselect. We will take as an example cleaning an xis0 dataset :** XSELECT V2.4 ** > Enter session name >[xsel] xsel:SUZAKU > set datadir xis/event_uf Setting data directory to /Volumes/Documents/DATA/Suzaku/PSR1509/100009010/xis/event_uf/ Setting mkf directory to /Volumes/Documents/DATA/Suzaku/PSR1509/100009010/auxil/ xsel:SUZAKU > read e ae100009010xi0_1_3x3n000_uf.evt ... ... ... OBJECT DATE-OBS TIME-OBS DATE-END TIME-END EDITMODE 1 PSR1509-58 2005-08-23 08:38:23 2005-08-24 15:39:03 3x3Note that the mkf directory has been set automatically. Now we run the cleansis tool using the xselect command sisclean :
xsel:SUZAKU-XIS0-STANDARD > sisclean > Which method (1=constant cutoff, 2=Poisson test)? >[2] 2 > Clean cell size for local background estimation (odd integer > 1)>[5] > Enter the log poission prob for clean threshold (must be < 0) >[-5.24] > Zero background threshold >[3] > Lower cutoff for hot pixel search >[0] > Upper cutoff for hot pixel search >[4095] ... ... ... By chip : 0 1 2 3 Pixels rejected : 1229 237 242 1395 Image counts : 668652 985903 788148 600290 Image cts rejected: 41560 7453 14560 18910 Image cts rej (%) : 6.22 0.76 1.85 3.15 filtering data... Total counts : 668656 985903 788148 600290 Total cts rejected: 41560 7453 14560 18910 Total cts rej (%) : 6.22 0.76 1.85 3.15 Number of clean counts accepted : 2960514 writing history cards... copying extensions... writing out hot pixs... Number of rejected pixels : 3103 updating NEVENTS keywords... closing data file... closing clean file...If we were running cleansis standalone we would need to specify the command line argument chipcol=SEGMENT as well as the input and output filenames.
Filter by grade
Filtering by grade can be performed by two possible commands egxsel> filter grade "0,2-4,6" xsel> filter column "GRADE=0:0 2:4 6:6"The latter was required for earlier Suzaku processing versions which did not have the TLMIN/MAX keywords for the GRADE column.
Selecting on housekeeping information
After the set-up above we can get a list of available housekeeping parameters by show param mkf. To select events based on housekeeping information use select mkf and then give either a C-style or Fortran-style selection string. This will create a GTI file which will be used for any subsequent products (using extract or bin). This GTI file can be saved by save mkf_sel. The standard XIS selection used in processing is :xsel:SUZAKU-XIS0-STANDARD > select mkf "SAA==0 && T_SAA> 436 && COR > 6 && ELV>10 && DYE_ELV>20" PREFR keyword found in header, using prefr = 0.0 POSTFR keyword found in header, using postfr = 1.0 xsel:SUZAKU-XIS0-STANDARD > show filters *** SELECTIONS *** A filter file selection has been made from file: ae100009010.mkf The selection expression was: SAA==0 && T_SAA> 436 && COR > 6 && ELV>10 && DYE_ELV>20 *** FILTERS *** NONETo plot lightcurves of any of the housekeeping parameters use mkfbin followed by plot mkf.
Selecting data for the HXD works exactly the same way (note the long "select mkf" expression in the following example was split up in to multiple lines for presentation purposes only):
** XSELECT V2.4 ** > Enter session name >[xsel] xsel:SUZAKU > set datadir hxd/event_uf Setting data directory to /Volumes/Documents/DATA/Suzaku/PSR1509/100009010/hxd/event_uf/ Setting mkf directory to /Volumes/Documents/DATA/Suzaku/PSR1509/100009010/auxil/ xsel:SUZAKU > read e ae100009010hxd_1_wel_uf.evt ... ... ... OBJECT DETNAM DATE-OBS TIME-OBS DATE-END TIME-END 1 PSR1509-58 WELL 2005-08-23 08:38:27 2005-08-24 15:39:13 xsel:SUZAKU-HXD-WELL_PIN > select mkf "SAA_HXD==0 && T_SAA_HXD>436 && ELV>5 && ANG_DIST<1.5 && HXD_DTRATE<3 && AOCU_HK_CNT3_NML_P==1 && COR>8 && HXD_HV_W0_CAL>700 && HXD_HV_W1_CAL>700 && HXD_HV_W2_CAL>700 && HXD_HV_W3_CAL>700 && HXD_HV_T0_CAL>700 && HXD_HV_T1_CAL>700 && HXD_HV_T2_CAL>700 && HXD_HV_T3_CAL>700" PREFR keyword found in header, using prefr = 0.0 POSTFR keyword found in header, using postfr = 1.0 xsel:SUZAKU-HXD-WELL_PIN > show filters *** SELECTIONS *** A filter file selection has been made from file: ae100009010.mkf The selection expression was: SAA_HXD==0 && T_SAA_HXD>436 && ELV>5 && ANG_DIST<1.5 && HXD_DTRATE<3 && AOCU_HK_CNT3_NML_P==1 && COR>8 && HXD_HV_W0_CAL>700 && HXD_HV_W1_CAL>700 && HXD_HV_W2_CAL>700 && HXD_HV_W3_CAL>700 && HXD_HV_T0_CAL>700 && HXD_HV_T1_CAL>700 && HXD_HV_T2_CAL>700 && *** FILTERS *** NONE
Generating XIS products in xselect
Xselect sets reasonable default options for XIS products. The image and wmap are binned up 8 times and when being written out the spectrum is truncated at 4096 channels to match the available response matrix files. Here is an example extracting a spectrum and lightcurve from the central source in the field from the XIS0 cleaned data.** XSELECT V2.4 ** > Enter session name >[xsel] xsel:SUZAKU > read e > Enter the Event file dir >[] xis/event_cl > Enter Event file list >[] ae100009010xi0_0_3x3n000_cl.evt ae100009010xi0_0_5x5n000_cl.evt ... ... ... OBJECT DATE-OBS TIME-OBS DATE-END TIME-END EDITMODE 1 PSR1509-58 2005-08-23 08:38:23 2005-08-24 20:36:39 3x3 2 PSR1509-58 2005-08-23 09:04:07 2005-08-24 07:40:07 5x5 xsel:SUZAKU-XIS0-STANDARD > extract image extractor v4.67 11 Jul 2006 Getting FITS WCS Keywords Doing file: /Volumes/Documents/DATA/Suzaku/PSR1509/100009010/xis/event_cl/ae100009010xi0_0_3x3n000_cl.evt 100% completed Total Good Bad: Region Time Phase Grade Cut 414896 414896 0 0 0 0 0 Doing file: /Volumes/Documents/DATA/Suzaku/PSR1509/100009010/xis/event_cl/ae100009010xi0_0_5x5n000_cl.evt 100% completed Total Good Bad: Region Time Phase Grade Cut 20470 20470 0 0 0 0 0 =============================================================================== Grand Total Good Bad: Region Time Phase Grade Cut 435366 435366 0 0 0 0 0 in 61551. seconds Image has 435366 counts for 7.073 counts/sec xsel:SUZAKU-XIS0-STANDARD > plot imageThis final command launches ds9. We use that to define a region around the bright point source then save the region to a file. This file should be in the ds9/funtools format (selected using the Region->File Format menu) and in Equatorial J2000 coordinates (Region->File Coordinate System). Unfortunately, xselect doesn't automatically know about this region selection so you now need to tell it then extract the spectra and lightcurves :
xsel:SUZAKU-XIS0-STANDARD > filter region source.reg xsel:SUZAKU-XIS0-STANDARD > extract all extractor v4.67 11 Jul 2006 Getting FITS WCS Keywords Doing file: /Volumes/Documents/DATA/Suzaku/PSR1509/100009010/xis/event_cl/ae100009010xi0_0_3x3n000_cl.evt 100% completed Total Good Bad: Region Time Phase Grade Cut 414896 111165 303731 0 0 0 0 Doing file: /Volumes/Documents/DATA/Suzaku/PSR1509/100009010/xis/event_cl/ae100009010xi0_0_5x5n000_cl.evt 100% completed Total Good Bad: Region Time Phase Grade Cut 20470 5455 15015 0 0 0 0 =============================================================================== Grand Total Good Bad: Region Time Phase Grade Cut 435366 116620 318746 0 0 0 0 in 61551. seconds Fits light curve has 116620 counts for 1.895 counts/sec Thresholding removed more than half the bins Try exposure=0.0 on the extract command in xselect or lcthresh=0.0 if running extractor stand-alone Spectrum has 116620 counts for 1.895 counts/sec ... written the PHA data Extension Image has 116620 counts for 1.895 counts/secIt is a good idea to check for any problems with the lightcurve.
xsel:SUZAKU-XIS0-STANDARD > plot curveIf this show excursions due to increased background that has not been excluded by selecting on housekeeping parameters than additional times can be excised using
xsel:SUZAKU-XIS0-STANDARD > filter time cursorand following the instructions. The extract command write the output files to temporary filenames which can be converted to your own names by
xsel:SUZAKU-XIS0-STANDARD > save spectrum source.pi The data will be grouped using the following command: bad 1-81,3290-4095&exit > Group ( or rebin ) the spectra before outputting? >[yes]The save command also gives you the option of setting some channels as bad. These can then be swiftly ignored in xspec using the command ignore bad. For some missions the save spectrum command will also generate the appropriate rmf and arf, this is not yet available for Suzaku. The lightcurve can be saved similarly :
xsel:SUZAKU-XIS0-STANDARD > save curve source.lcIt is also sometimes useful to extract a new events file using only the events from good times and/or the region selected. To do that you just
xsel:SUZAKU-XIS0-STANDARD > extract events ... xsel:SUZAKU-XIS0-STANDARD > save events source.evtwhich will combine the events from the two files read in and filter them on region and the good time intervals created by selection on housekeeping parameters.
Generating HXD products in xselect
Extraction of HXD products is similar to that for the XIS with the simplication that there is no region filtering necessary but with the complication that the PIN and GSO events must be separated. At the moment the background subtraction and response matrix for the GSO are still under development so we will illustrate the use of PIN data only. The cleaned data from the standard processing is already split into separate files for the PIN and GSO however if you do need to do this yourself the easiest method is to use the command filter column "DET_TYPE=1:1".** XSELECT V2.4 ** > Enter session name >[xsel] readxsel:SUZAKU > read e > Enter the Event file dir >[] hxd/event_cl > Enter Event file list >[] ae100009010hxd_0_pinno_cl.evt ... ... ... OBJECT DETNAM DATE-OBS TIME-OBS DATE-END TIME-END 1 PSR1509-58 WELL_PIN 2005-08-23 08:38:27 2005-08-24 20:38:01 xsel:SUZAKU-HXD-WELL_PIN > extr all ... xsel:SUZAKU-HXD-WELL_PIN > save spectrum pin.piAs for the XIS, we do not yet automatically calculate arfs and rmfs. We expect to add this later along with automatic calculation of a background spectrum.
Making summed images from all 4 XIS
The easiest way to do this is not within xselect but within ximage. Suppose the four event files are called xis0.evt, xis1.evt, xis2.evt, and xis3.evt. Then the following ximage commands produce a summed image.read/rebin=4 xis0.evt save read/rebin=4 xis1.evt sum save read/rebin=4 xis2.evt sum save read/rebin=4 xis3.evt sum save smoothThe rebinning and final smooth produce an image well-matched to the psf. To produce an image from a restricted range of PI bins replace the read commands by eg
read/rebin=4/ecol=PI/emin=200/emax=1500 xis0.evt
If you have any questions concerning Suzaku, visit the Feedback form.