Notes on analyzing Chandra ACIS data using XSELECT
CTI and gain correctingCIAO 2.3 includes code to correct for CTI using the algorithm originally developed by Lisa Townsley and collaborators at PSU. Check the CXC pages for details. The script /chandra/software/scripts/acisgaincorr automates this process. It will check whether the CTI correction can be used. If it cannot then the script will also check which gain file was used and determine whether a more recent version should be used. Note that CTI correction must be run on the level 1 file. If you do perform CTO correction on the level 1 file then you will definitely want to do the following filtering. (This works correctly under Linux or Solaris but when I tried under OSF acis_process_events used up ever increasing amounts of memory before crashing)
Preparatory filteringSome basic filtering can be done on ACIS files before reading into xselect. The perl script /chandra/software/scripts/acisscreen runs fselect to throw away events with GRADE not equal to 02346, with PI equal to 0, 1, and 1024, with CHIPX any of 256, 257, 512, 513, 768, 769, with STATUS non-zero, and with CHIPX,CHIPY for a number of hot columns and pixels. The CHIPX rejections are made because these columns lie on the edges of read-out node areas and event selection will not operate correctly since the charge cloud will be split between 2 different read-out nodes. This filtering can reduce the size of your event file by an order of magnitude and will remove most of the linear structures seen in the FI chips. Note that this script does not update the data subspace keywords - I don't think this makes any difference when creating responses but it should be fixed.
The hot columns and pixels thrown away by acisscreen are all the ones that we have identified from observations and which have been listed by the CXC. There may be additional bad columns or pixels in your observation. A useful trick to find them is to make images from one chip at a time using CHIPX, CHIPY - any features with widths of one pixel will be due to problems with the chip. If you don't want to remove the hot columns and pixels then run acisscreen with the third argument "no". Note that the CIAO ARF and exposure map creation software use the bad pixel file that comes with your observation. If you remove additional bad pixels you may want to modify this file. It will be in the primary or secondary directories and end _bpix1.fits.
Aspect correctingIt may be necessary to correct the aspect in for your data due to various bugs in the processing. Information summarizing problems is available. A CIAO thread explains how to correct for aspect offsets.
Running XSELECTYou can either read ACIS event files in or set up an observation catalog by specifying mission as AXAF and instrument as ACIS. The information displayed includes the DETNAM which lists which CCDs are operating (0-3 are I0-I3 and 4-9 are S0-S5). FIRSTROW and NROWS indicate whether windowing was used.
** XSELECT V2.2 ** > Enter session name >[xsel] Notes: XSELECT set up for ASCA Time keyword is TIME in units of s Default timing binsize = 16.000 xsel:ASCA > read e > Enter the Event file dir >[./] > Enter Event file list >[s3good.evt] acisf01988_000N001_evt1_cti_clean.fits Got new mission: AXAF > Reset the mission ? >[yes] Notes: XSELECT set up for AXAF Time keyword is TIME in units of s Default timing binsize = 16.000 Setting... Image keywords = X Y with binning = 4 WMAP keywords = DETX DETY with binning = 8 Energy keyword = PI with binning = 1 Getting Min and Max for Energy Column... Got min and max for PI: 1 1024 Could not get minimum time resolution of the data read Number of files read in: 1 ******************** Observation Catalogue ******************** Data Directory is: /local/data/genji3/kaa/3C396/primary/ HK Directory is: /local/data/genji3/kaa/3C396/primary/ OBJECT DATE-OBS LIVETIME DETNAM READMODE FIRSTROW NROWS 1 3C396 (G39. 2001-05-12T 0.10E+06 ACIS-235678 TIMED 1 1023
Making imagesThe default image coordinates are sky with a factor of 4 binning, which produces 2 arcsec pixels and a 16 Mbyte image.
xsel:AXAF-ACIS-FAINT > extract image extractor v4.20 1 Nov 2002 Getting FITS WCS Keywords Doing file: /local/data/genji3/kaa/3C396/primary/acisf01988_000N001_evt1_cti_clean.fits 100% completed Total Good Bad: Region Time Phase Cut 569168 569168 0 0 0 0 =============================================================================== Grand Total Good Bad: Region Time Phase Cut 569168 569168 0 0 0 0 in 1.02219E+05 seconds Image has 569168 counts for 5.568 counts/sec xsel:AXAF-ACIS-FAINT > plot imagewill make an image and plot it using ds9. To save the image to a file
xsel:AXAF-ACIS-FAINT > save image total.img Wrote image to file total.imgIf you want to work on only a subset of the available chips you can use the select chip command.
xsel:AXAF-ACIS-FAINT > select chip s3 Processing file: /local/data/genji3/kaa/3C396/primary/acisf01988_000N001_evt1_cti_clean.fits Set XYCENTER to 3978, 3817 and XYSIZE to 1382 with current binning image will be 346 x 346The select chip command also calculates the minimum and maximum values of X and Y in the selected event. It uses this to set the xycenter and xysize which the extract command uses as filters. This will probably mean a small enough section of the focal plane is selected that a full resolution image can be constructed.
xsel:AXAF-ACIS-FAINT > set xybinsize 1 1 xsel:AXAF-ACIS-FAINT > extr image extractor v4.20 1 Nov 2002 Getting FITS WCS Keywords Doing file: /local/data/genji3/kaa/3C396/primary/xsel_work1001.xsl 100% completed Total Good Bad: Region Time Phase Cut 175425 175425 0 0 0 0 =============================================================================== Grand Total Good Bad: Region Time Phase Cut 175425 175425 0 0 0 0 in 1.02223E+05 seconds Image has 175425 counts for 1.716 counts/secIf this image is still too large you can change xycenter and xysize to make it smaller or you can make a region file of the required area. When filtering with a region file you will need to add the fullimage=no argument to the extract command. This ensures that the image created is chopped down to a box encompassing the selected region.
If you want to save the event file selected for a single chip you can do so.
xsel:AXAF-ACIS-FAINT > save select s3.evt
Removing bad time intervalsSince Chandra ACIS data can suffer from flaring background it is a good idea to look at the light curve and excise bad time intervals. To make a light curve in XSELECT from the S3 events...
xsel:AXAF-ACIS-FAINT > extr curve extractor v4.20 1 Nov 2002 Getting FITS WCS Keywords Doing file: /local/data/genji3/kaa/3C396/primary/xsel_work1001.xsl 100% completed Total Good Bad: Region Time Phase Cut 175425 175425 0 0 0 0 =============================================================================== Grand Total Good Bad: Region Time Phase Cut 175425 175425 0 0 0 0 in 1.02223E+05 seconds Fits light curve has 175425 counts for 1.716 counts/secThis makes a light curve with 16 second bins. You can change this binning using set binsize. To look at the light curve...
xsel:AXAF-ACIS-FAINT > plot curveand to filter out bad time intervals by clicking on appropriate positions on the plot...
xsel:AXAF-ACIS-FAINT > filter time cursorand follow the instructions printed on your screen. Note that you can also excise all times with a count rate above some critical value using filter intensity.
Making spectra, RMFs, and ARFsTo extract spectra from part of the image you need to create a region filter file. This can be done using ds9 (use the ds9/funtools file format and equatorial J2000 coordinate system). Here is an example I made earlier...
xsel:AXAF-ACIS-FAINT > $cat nebula.reg Spawning... # Region file format: DS9 version 3.0 global color=green font="helvetica 10 normal" select=1 edit=1 move=1 delete=1 include=1 fixed=0 fk5;ellipse(286.02001,5.4529342,28.536",14.76",0)To use this to extract a spectrum...
xsel:AXAF-ACIS-FAINT > filter reg nebula.reg xsel:AXAF-ACIS-FAINT > extr spec extractor v4.20 1 Nov 2002 Getting FITS WCS Keywords Doing file: /local/data/genji3/kaa/3C396/primary/xsel_work1001.xsl 100% completed Total Good Bad: Region Time Phase Cut 175425 4159 171266 0 0 0 =============================================================================== Grand Total Good Bad: Region Time Phase Cut 175425 4159 171266 0 0 0 in 1.02223E+05 seconds Spectrum has 4159 counts for 4.0686E-02 counts/sec ... written the PHA data ExtensionXSELECT extracts spectra in PI by default. After extracting it you can save it to a file. Adding the resp=yes option to the save spec command will automatically generate the appropriate rmf and arf files for the spectrum. Note that it checks around for the bad pixel file for this observation and updates the ardlib parameters if the file is available. The script that runs the rmf and arf generation is xsl_chandra_acis_makeresp.
Free readers for PDF, PPT, Word, Excel, and QuickTime files.
NASA Website Privacy Statement | NASA IT Security Warning Banner | NASA Website Disclaimer
This file was last modified on Wednesday, 14-Mar-2012 17:18:32 EDT