Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: 3 Dec 2012

URL: http://cxc.harvard.edu/ciao/threads/pointlike/thread.html

Extract Spectrum and Response Files for a Pointlike Source

CIAO 4.5 Science Threads


Overview

Synopsis:

Using a combination of CIAO tools, we extract source and background spectra for a pointlike source. The background spectrum is grouped, if desired. The appropriate Response Matrix Files (RMFs) and Ancillary Response Files (ARFs) are created for both source and background.

The specextract script automates these steps for extended and pointlike sources observed with the ACIS detector.

Purpose:

To generate source and background spectra of a pointlike ACIS source and build the proper RMFs and ARFs.

Related Links:

Last Update: 3 Dec 2012 - Review for CIAO 4.5; minor edits


Contents


Get Started

Download the sample data: 459 (HETG/ACIS-S, 3C 273)

unix% download_chandra_obsid 459 evt2,asol,pbk,msk,bpix

A comparison of the specextract and psextract syntax

specextract infile="evt2.fits[sky=region(src.reg)]" bkgfile="evt2.fits[sky=region(bg.reg)]" \
outroot=point asp=point.asphist pbkfile=acisf063875928N003_pbk0.fits \
weight=no correct=yes \
grouptype=NUM_CTS binspec=15

psextract events="evt2.fits[sky=region(src.reg)]" bgevents="evt2.fits[sky=region(bg.reg)]" bkgresp=yes \
root=point asol=@pcad_asol1.lis pbkfile=acisf063875928N003_pbk0.fits \
gtype=NUM_CTS gspec=15

Why use specextract instead of psextract?

The specextract script uses the newest CIAO tools and calibration files when extracting the spectrum and creating response files.

  • If the source is at the very edge of a CCD, subarray or window, the mask file should be used when making the ARF. specextract includes the mask file (mskfile parameter) when running mkarf, but psextract did not.

  • psextract did not include the tool arfcorr. arfcorr calculates the energy-dependent point-source aperture correction for the source and applies the correction to the ARF file.

    specextract creates a corrected ARF by running arfcorr when the correct parameter is set to yes.

  • specextract runs either mkrmf or mkacisrmf to build the RMF(s), depending on which is appropriate for the data and the calibration; see the Creating ACIS RMFs why topic for details.

    psextract always used mkrmf.

  • psextract would fail if the source or background region spans more than one CCD because it cannot select the appropriate calibration (FEF) file.

    specextract calculates the mode of the events and selects calibration for the CCD which contains more of the events.


Build Source and Background Regions

We need to define two regions, one for the source and another for the background. To do this, first display the image:

unix% ds9 acisf00459N004_evt2.fits &

In this example, we define the jet as the source with a rectangle (see this FAQ on how to rotate shapes in ds9) and four 10-pixel radius circles for the background (from source-free parts of the image around the source). All the regions are shown in Figure 1. The background region can also be selected from a different chip, if desired.

[Thumbnail image: The source region around the jet is a rotated rectangle; the background region is comprised of four circles.]

[Version: full-size]

[Print media version: The source region around the jet is a rotated rectangle; the background region is comprised of four circles.]

Figure 1: Extraction regions on the event file

The background was chosen from a from source-free area of the same chip for this example, but it may also be chosen from a different chip or different event file.

To save the regions, follow these steps:

  1. Region → Save Regions... → Save As "3c273.reg" (source) and "3c273_bg.reg" (background). To select multiple regions for saving, hold down the <SHIFT> key and click on each one.
  2. After choosing "OK" in the region filename dialog, a format dialog is opened. Set the format to "CIAO" and the coordinate system to "Physical".

The resulting region files will look like:

unix% more 3c273.reg
# Region file format: CIAO version 1.0
rotbox(4148.125,4043.625,7.58978,22.338761,44.516094)

unix% more 3c273_bg.reg
# Region file format: CIAO version 1.0
circle(4119,4014.75,10)
circle(4077,4025.75,10)
circle(4186.5,4023.25,10)
circle(4196.25,4064.5,10)

Using specextract

specextract runs the following tools for the pointlike source case:

  • dmextract: to extract source and (optionally) background spectra. This tool also creates the WMAP used as input to mkacisrmf.
  • mkarf: to create ARF(s).
  • arfcorr: to apply an energy-dependent point-source aperture correction to the source ARF file.
  • mkrmf or mkacisrmf: to build the RMF(s), depending on which is appropriate for the data and the calibration; see the Creating ACIS RMFs why topic for details.
  • dmgroup: to group the source spectrum and/or background spectrum.
  • dmhedit: to update the BACKFILE, RESPFILE and ANCRFILE keys in the source and background spectrum files.

1. Run the script

Input the event file with the appropriate region file for the source and background, as well as the aspect solution files. In some rare cases, there will be more than one aspect solution file (pcad_asol1.fits) for an observation. All the files must be input to the asp parameter, either as a list or as a stack. Here we use:

unix% cat pcad_asol1.lis 
pcadf063874624N003_asol1.fits

unix% punlearn specextract
unix% pset specextract infile="acisf00459N004_evt2.fits[sky=region(3c273.reg)]"
unix% pset specextract outroot=spec
unix% pset specextract bkgfile="acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)]"
unix% pset specextract weight=no
unix% pset specextract correct=yes
unix% pset specextract asp=@pcad_asol1.lis
unix% pset specextract mskfile=acisf00459_000N003_msk1.fits
unix% pset specextract badpixfile=acisf00459_000N003_bpix1.fits
unix% pset specextract pbkfile=acisf063875928N003_pbk0.fits
unix% pset specextract grouptype=NUM_CTS binspec=15

The weight parameter is set to "no" to tell the script to make a pointlike ARF and the correct parameter is set to "yes" so that arfcorr will be run to correct the ARF.

We choose to use the default grouping values: the source spectrum will be grouped to a minimum number of 15 counts per new channel and the background spectrum will be ungrouped.

Running the tool with verbose=2 shows what it is doing:


unix% specextract verbose=2
Source event file(s) (acisf00459N004_evt2.fits[sky=region(3c273.reg)]):
Output directory path + root name for output files (spec):
Should response files be weighted? (no):
Apply point source aperture correction to ARF? (yes):
Combine ungrouped output spectra and responses? (no): 
Background event file(s) (acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)]): 
Create background ARF and RMF? (yes): 
Source aspect histogram file (output of asphist) (spec.asphist):
pbkfile input to mkwarf (acisf063875928N003_pbk0.fits):
mskfile input to mkwarf (acisf00459_000N003_msk1.fits): 

Running: specextract
  Version:    20 November 2012

Note: all input source regions are converted to physical coordinates for point-source analysis with ARF correction.

Checking source input files for readability...

Checking background input files for readability...

Setting bad pixel file for item 1 of 1 in input list

Running tool acis_set_ardlib using:
>>> acis_set_ardlib acisf00459_000N003_bpix1.fits verbose=2

Converting source region to physical coordinates for item 1 of 1 in input list.

Running tool dmmakereg using:
>>> dmmakereg "region(3c273.reg)" 3c273.reg_phys_coords wcsfile=acisf00459N004_evt2.fits verbose=2

Extracting src spectra for item 1 of 1 in input list

Running tool dmextract using:        
>>> dmextract "acisf00459N004_evt2.fits[sky=region(3c273.reg)][bin PI]" spec.pi wmap="[energy=300:2000][bin det=8]" verbose=2

Creating src ARF for item 1 of 1 in input list

Running tool asphist using:
>>> asphist @pcad_asol1.lis spec_asphist7.fits "acisf00459N004_evt2.fits[ccd_id=7]" dtffile= verbose=2
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(spec_phys_coords_reg_file1.reg)][bin chipx=2,chipy=2]" verbose=0
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(spec_phys_coords_reg_file1.reg)][bin chipx=2,chipy=2]" verbose=0
Running tool acis_fef_lookup using:
>>> acis_fef_lookup acisf00459N004_evt2.fits 7 287 365
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(spec_phys_coords_reg_file1.reg)][bin sky=2]" verbose=0
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(spec_phys_coords_reg_file1.reg)][bin sky=2]" verbose=0
Running tool mkarf using:
>>> mkarf spec_asphist7.fits spec.arf 4142.5880805 4047.9999999 0.3:11.0:0.01 acisf00459N004_evt2.fits acisf063875928N003_pbk0.fits ACIS-S3 HETG acisf00459_000N003_msk1.fits 2
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(spec_phys_coords_reg_file1.reg)][bin sky=2]" verbose=0
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(spec_phys_coords_reg_file1.reg)][bin sky=2]" verbose=0
Running tool arfcorr using:
>>> arfcorr "acisf00459N004_evt2.fits[sky=region(spec_phys_coords_reg_file1.reg)][bin sky=1]" spec.arf spec.corr.arf "region(spec_phys_coords_reg_file1.reg)" 4142.5880805 4047.9999999 energy=0.0 clobber=yes
  
Creating src RMF for item 1 of 1 in input list

Searching for P2_RESP calibration file...
Running tool calquiz using:
>>> calquiz "spec.pi[WMAP]" telescope= instrument= product=SC_MATRIX calfile=CAL
DB outfile=y echo=yes

Using mkacisrmf...

Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(spec_phys_coords_reg_file1.reg)]
[bin chipx=2,chipy=2]" verbose=0
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(spec_phys_coords_reg_file1.reg)]
[bin chipx=2,chipy=2]" verbose=0
Running tool mkacisrmf using:
>>> mkacisrmf CALDB spec.rmf none 0.3:11.0:0.01 1:1024:1 PI 7 287 365 CALDB obsf
ile=acisf00459N004_evt2.fits verbose=2
Grouping src spectrum for item 1 of 1 in input list

Running tool dmgroup using:
>>> dmgroup "spec.pi[SPECTRUM]" spec_grp.pi NUM_CTS 15.0 binspec= xcolumn=channe
l ycolumn=counts verbose=2
Updating header of spec.pi with RESPFILE and ANCRFILE keywords.
Running tool dmhedit using:
>>> dmhedit spec.pi none add RESPFILE spec.rmf verbose=2
Running tool dmhedit using:
>>> dmhedit spec.pi none add ANCRFILE spec.corr.arf verbose=2
Updating header of spec_grp.pi with RESPFILE and ANCRFILE keywords.
Running tool dmhedit using:
>>> dmhedit spec_grp.pi none add RESPFILE spec.rmf verbose=2
Running tool dmhedit using:
>>> dmhedit spec_grp.pi none add ANCRFILE spec.corr.arf verbose=2

Setting bad pixel file for item 1 of 1 in input list

Running tool acis_set_ardlib using:
>>> acis_set_ardlib acisf00459_000N003_bpix1.fits verbose=2

Extracting bkg spectra for item 1 of 1 in input list

Running tool dmextract using:
>>> dmextract "acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin PI]" spec_
bkg.pi wmap="[energy=300:2000][bin tdet=8]" verbose=2

Creating bkg ARF for item 1 of 1 in input list

Running tool asphist using:
>>> asphist @pcad_asol1.lis spec_bkg_asphist7.fits "acisf00459N004_evt2.fits[ccd
_id=7]" dtffile= verbose=2
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin chipx=2,chipy
=2]" verbose=0
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin chipx=2,chipy
=2]" verbose=0
Running tool acis_fef_lookup using:
>>> acis_fef_lookup acisf00459N004_evt2.fits 7 275 309
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin sky=2]" verbo
se=0
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin sky=2]" verbo
se=0
Running tool mkarf using:
>>> mkarf spec_bkg_asphist7.fits spec_bkg.arf 4113.5 4013.75 0.3:11.0:0.01 acisf
00459N004_evt2.fits acisf063875928N003_pbk0.fits ACIS-S3 HETG acisf00459_000N003
_msk1.fits 2

Creating bkg RMF for item 1 of 1 in input list

Searching for P2_RESP calibration file...
Running tool calquiz using:
>>> calquiz "spec_bkg.pi[WMAP]" telescope= instrument= product=SC_MATRIX calfile
=CALDB outfile=y echo=yes

Using mkacisrmf...

Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin chipx=2,chipy
=2]" verbose=0
Running tool dmstat using:
>>> dmstat "acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin chipx=2,chipy
=2]" verbose=0
Running tool mkacisrmf using:
>>> mkacisrmf CALDB spec_bkg.rmf none 0.3:11.0:0.01 1:1024:1 PI 7 275 309 CALDB 
obsfile=acisf00459N004_evt2.fits verbose=2
Updating header of spec_bkg.pi with RESPFILE and ANCRFILE keywords.
Running tool dmhedit using:
>>> dmhedit spec_bkg.pi none add RESPFILE spec_bkg.rmf verbose=2
Running tool dmhedit using:
>>> dmhedit spec_bkg.pi none add ANCRFILE spec_bkg.arf verbose=2
Updating header of spec.pi with BACKFILE keyword.
Running tool dmhedit using:
>>> dmhedit spec.pi none add BACKFILE spec_bkg.pi verbose=2
Updating header of spec_grp.pi with BACKFILE keyword.
Running tool dmhedit using:
>>> dmhedit spec_grp.pi none add BACKFILE spec_bkg.pi verbose=2

The contents of the parameter file may be checked with plist specextract.


2. Examining the Output Files

The number of files created depends on if a background event file was provided and if source and/or background grouping was specified. In this case, the output files are:

spec.pi       ungrouped source spectrum
spec.arf      original source ARF
spec.corr.arf corrected source ARF
spec.rmf      source RMF
spec_grp.pi   grouped source spectrum

spec_bkg.pi   ungrouped background spectrum
spec_bkg.arf  background ARF
spec_bkg.rmf  background RMF

Read the analysis caveats before proceeding to fitting the spectrum.


Step-by-Step Guide

This section explains how to manually run the analysis steps that are used by specextract.

Please ensure that you have set up ardlib to use the bad pixel file for your observation before following this section of the thread.

1. Extract Source and Background Spectra

In this example, we extract the spectra in pulse invariant (PI) space. This creates a histogram of number of counts vs. PI channel:

unix% punlearn dmextract
unix% pset dmextract infile="acisf00459N004_evt2.fits[sky=region(3c273.reg)][bin pi]"
unix% pset dmextract outfile=3c273.pi
unix% dmextract
Input event file  (acisf00459N004_evt2.fits[sky=region(3c273.reg)][bin pi]): 
Enter output file name (3c273.pi):

And for the background spectrum:

unix% pset dmextract infile="acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin pi]"
unix% pset dmextract outfile=3c273_bg.pi
unix% dmextract
Input event file  (acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin pi]): 
Enter output file name (3c273_bg.pi): 

You can check the parameter file that was used with plist dmextract.

Locate Centroids (dmstat)

Since the calibration varies across the chips, we need to locate the centroid (in chip coordinates) of the source and background regions. This information is needed to create the ARFs, as well as to select which FEF (FITS Embedded Function) to use in calculating the RMFs with mkrmf. For the source:

unix% dmstat "acisf00459N004_evt2.fits[sky=region(3c273.reg)][cols chipx,chipy,ccd_id,x,y]"
chip(chipx, chipy)[pixel]
    min:	( 260 350 )	      @:	( 153 443 )
    max:	( 311 392 )	      @:	( 164 25 )
   mean:	( 282.43352601 372.19845857 )
  sigma:	( 12.248821787 11.744761368 )
    sum:	( 146583 193171 )
   good:	( 519 519 )
   null:	( 0 0 )

ccd_id
    min:	7 	      @:	1 
    max:	7 	      @:	1 
   mean:	7 
  sigma:	0 
    sum:	3633 
   good:	519 
   null:	0 

sky(x, y)[pixel]
    min:	( 4138.565918 4035.0893555 )	      @:	( 365 164 )
    max:	( 4155.7944336 4052.7905273 )	      @:	( 167 314 )
   mean:	( 4144.2868365 4046.6510732 )
  sigma:	( 3.513813344 3.7447860531 )
    sum:	( 2150884.8682 2100211.907 )
   good:	( 519 519 )
   null:	( 0 0 )

The centroid of the source distribution is at chipx = 282.43 and chipy = 372.20. Note also that the source position is x = 4144.29 and y = 4046.65 and is on CCD 7 (ACIS-S3).

And for the background:

unix% dmstat "acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][cols chipx,chipy,ccd_id,x,y]"
chip(chipx, chipy)[pixel]
    min:	( 252 296 )	      @:	( 136 57 )
    max:	( 343 465 )	      @:	( 87 54 )
   mean:	( 293.6076555 382.18660287 )
  sigma:	( 20.953334771 50.746566221 )
    sum:	( 61364 79877 )
   good:	( 209 209 )
   null:	( 0 0 )

ccd_id
    min:	7 	      @:	1 
    max:	7 	      @:	1 
   mean:	7 
  sigma:	0 
    sum:	1463 
   good:	209 
   null:	0 

sky(x, y)[pixel]
    min:	( 4068.8461914 4005.0986328 )	      @:	( 9 51 )
    max:	( 4205.9257812 4074.0290527 )	      @:	( 173 86 )
   mean:	( 4140.4038366 4031.5951926 )
  sigma:	( 48.516897207 20.060247953 )
    sum:	( 865344.40186 842603.39526 )
   good:	( 209 209 )
   null:	( 0 0 )

The centroid of the background distribution is at chipx = 293.61 and chipy = 382.19. Again, note that the mean position is at x = 4140.40 and y = 4031.60 and is also on ACIS-S3. You can check the parameter file that was used with plist dmstat.


2. Calculate the RMFs

The observation used in this thread (ObsID 459) was taken at the -110 C focal plane temperature and the source is on ACIS-7, a back-illuminated chip. Therefore, it is possible to use mkacisrmf to create the RMF file, assuming the dataset was reprocessed with CALDB 3.4.3 or higher.

The syntax for both mkacisrmf and mkrmf are given in this section. Users should choose the appropriate tool for the data and calibration.

Using mkacisrmf (mkacisrmf)

The mkacisrmf why topic has more details on using the mkacisrmf tool. This example is for -110 C data on a BI chip.

For the source:

unix% dmkeypar acisf00459N004_evt2.fits gainfile echo+
acisD1999-09-16gainN0006.fits

unix% punlearn mkacisrmf
unix% pset mkacisrmf infile=$CALDB/data/chandra/acis/p2_resp/acisD2000-01-29p2_respN0005.fits
unix% pset mkacisrmf outfile=3c273_mkacisrmf.rmf
unix% pset mkacisrmf energy=0.1:11.0:0.01
unix% pset mkacisrmf channel=1:1024:1
unix% pset mkacisrmf chantype=PI
unix% pset mkacisrmf wmap=none
unix% pset mkacisrmf ccd_id=7 chipx=282.43 chipy=372.20
unix% pset mkacisrmf gain=$CALDB/data/chandra/acis/det_gain/acisD1999-09-16gainN0006.fits

unix% mkacisrmf
scatter/rsp matrix file (/soft/ciao/CALDB/data/chandra/acis/p2_resp/acisD2000-01-29p2_respN0005.fits):
RMF output file (3c273_mkacisrmf.rmf):
WMAP file (none):
energy grid in keV (lo:hi:bin) (0.1:11.0:0.01):
channel grids in pixel (min:max:bin) (1:1024:1):
channel type (PI|PHA) (PI):
filter CCD-ID (0:9) (7):
filter chipx in pixel (282):
ficlter chipy in pixel (372):
gain file (/soft/ciao/CALDB/data/chandra/acis/det_gain/acisD1999-09-16gainN0006.fits):

INFO: Effective user energy (keV) grids will be re-arranged in
     0.25000 - 11.00000


Single region, #2316 , processed.

For the background, repeat the command with the background chipx and chipy values:

unix% pset mkacisrmf outfile=3c273_bg_mkacisrmf.rmf
unix% pset mkacisrmf ccd_id=7 chipx=293.61 chipy=382.19

unix% mkacisrmf
scatter/rsp matrix file (/soft/ciao/CALDB/data/chandra/acis/p2_resp/acisD2000-01-29p2_respN0005.fits):
RMF output file (3c273_bg_mkacisrmf.rmf):
WMAP file (none):
energy grid in keV (lo:hi:bin) (0.1:11.0:0.01):
channel grids in pixel (min:max:bin) (1:1024:1):
channel type (PI|PHA) (PI):
filter CCD-ID (0:9) (7):
filter chipx in pixel (293):
ficlter chipy in pixel (382):
gain file (/soft/ciao/CALDB/data/chandra/acis/det_gain/acisD1999-09-16gainN0006.fits):

INFO: Effective user energy (keV) grids will be re-arranged in
     0.25000 - 11.00000


Single region, #2348 , processed.

You can check the parameter file that was used with plist mkacisrmf.

If you use mkacisrmf to create the RMFs, you can now continue to the Calculate the ARFs step.

Using mkrmf (acis_fef_lookup, mkrmf)

First acis_fef_lookup is needed to determine the correct FEFs. For the source:

unix% punlearn acis_fef_lookup
unix% acis_fef_lookup acisf00459N004_evt2.fits 7 280.29 373.73
/soft/ciao/CALDB/data/chandra/acis/fef_pha/acisD1999-09-16fef_phaN0002.fits[FUNCTION][ccd_id=7,chipx=257:288,chipy=353:384]

and for the background:

unix% acis_fef_lookup acisf00459N004_evt2.fits 7 293.61 382.19
/soft/ciao/CALDB/data/chandra/acis/fef_pha/acisD1999-09-16fef_phaN0002.fits[FUNCTION][ccd_id=7,chipx=289:320,chipy=353:384]

You can check the parameter file that was used with plist acis_fef_lookup.

Now that we have the FEFs, we can compute RMFs with mkrmf. It is important that the axes are defined correctly. The energy range (keV) for axis1 should cover the detector response range, which is ~0.2-12 keV for ACIS-S. The default for extraction in PI space is axis2=1:1024:1; in PHA space it would be 1:4096:2.

For the source:

unix% punlearn mkrmf
unix% pset mkrmf infile="/soft/ciao/CALDB/data/chandra/acis/fef_pha/acisD1999-09-16fef_phaN0002.fits[FUNCTION][ccd_id=7,chipx=257:288,chipy=353:384]"
unix% pset mkrmf outfile=3c273.rmf
unix% pset mkrmf axis1="energy=0.1:11.0:0.01"
unix% pset mkrmf axis2="pi=1:1024:1"
unix% mkrmf
name of FEF input file (/soft/ciao/CALDB/data/chandra/acis/fef_pha/acisD1999-09-16fef_phaN0002.fits
[FUNCTION][ccd_id=7,chipx=257:288,chipy=353:384]): 
name of RMF output file (3c273.rmf): 
axis-1(name=lo:hi:btype) (energy=0.1:11.0:0.01): 
axis-2(name=lo:hi:btype) (pi=1:1024:1): 

and for the background:

unix% pset mkrmf infile="/soft/ciao/CALDB/data/chandra/acis/fef_pha/acisD1999-09-16fef_phaN0002.fits[FUNCTION][ccd_id=7,chipx=289:320,chipy=353:384]"
unix% pset mkrmf outfile=3c273_bg.rmf
unix% pset mkrmf axis1="energy=0.1:11.0:0.01"
unix% pset mkrmf axis2="pi=1:1024:1"
unix% mkrmf
name of FEF input file (/soft/ciao/CALDB/data/chandra/acis/fef_pha/acisD1999-09-16fef_phaN0002.fits
[FUNCTION][ccd_id=7,chipx=289:320,chipy=353:384]): 
name of RMF output file (3c273_bg.rmf): 
axis-1(name=lo:hi:btype) (energy=0.1:11.0:0.01): 
axis-2(name=lo:hi:btype) (pi=1:1024:1): 

You can check the parameter file that was used with plist mkrmf.


3. Calculate the ARFs

Compute the Aspect Histogram (asphist)

We now need to create the aspect histogram, which is a binned representation of aspect motion during the observation.

In many cases, there will be more than one aspect solution file (pcad_asol1.fits) for an observation. All the files must be input to the infile parameter, either as a list or as a stack. Here we use:

unix% cat pcad_asol1.lis 
pcadf063874624N003_asol1.fits

unix% punlearn asphist
unix% pset asphist infile=@pcad_asol1.lis
unix% pset asphist outfile=3c273.asphist
unix% pset asphist evtfile="acisf00459N004_evt2.fits[ccd_id=7]"
unix% asphist
Aspect Solution List Files (@pcad_asol1.lis): 
Aspect Histogram Output File (3c273.asphist): 
Event List Files (acisf00459N004_evt2.fits[ccd_id=7]): 

You can check the parameter file that was used with plist asphist.

Compute the ARFs (mkarf)

The grating parameter in mkarf is set to reflect whether or not grating data is being used. For non-grating observations, this parameter is left at the default (NONE). You can double-check the grating information in the file header:

unix% dmkeypar acisf00459N004_evt2.fits GRATING echo+
HETG

In this case, since we are using an ACIS/HETG observation, mkarf will extract the 0th order spectrum and ARF. The sourcepixelx and sourcepixely were found in the Locate Centroids step. The energy grid (engrid) must be the same as that used for the axis in mkrmf, so the RMF file is used to define it.

To obtain an accurate ARF at the very edge of a CCD, subarray or window, it is necessary to include the mask file (msk1.fits).

unix% punlearn mkarf
unix% pset mkarf grating=HETG
unix% pset mkarf detsubsys=ACIS-S3
unix% pset mkarf outfile=3c273.arf
unix% pset mkarf asphistfile="3c273.asphist[ASPHIST]"
unix% pset mkarf obsfile="acisf00459N004_evt2.fits[EVENTS]"
unix% pset mkarf maskfile=acisf00459_000N003_msk1.fits
unix% pset mkarf pbkfile=acisf063875928N003_pbk0.fits
unix% pset mkarf dafile=CALDB
unix% pset mkarf engrid="grid(3c273_mkacisrmf.rmf[cols ENERG_LO,ENERG_HI])"
unix% pset mkarf sourcepixelx=4144.29
unix% pset mkarf sourcepixely=4046.65

Run mkarf for the source:

unix% mkarf
Aspect Histogram File (3c273.asphist[ASPHIST]): 
Output File Name (3c273.arf): 
Source X Pixel (4144.29): 
Source Y Pixel (4046.65): 
Energy grid spec (grid(3c273_mkacisrmf.rmf[cols ENERG_LO,ENERG_HI])): 
Name of fits file with obs info (evt file -- include extension) (acisf00459N004_evt2.fits[EVENTS]): 
Verbosity (0:5) (0): 
Detector Name (ACIS-S3): 
Grating for zeroth order ARF (NONE|LETG|HETG) (HETG): 
NONE, or name of ACIS window mask file (acisf00459_000N003_msk1.fits): 
NONE, or the name of the parameter block file (acisf063875928N003_pbk0.fits): 

and for the background:

unix% pset mkarf outfile=3c273_bg.arf
unix% pset mkarf engrid="grid(3c273_bg_mkacisrmf.rmf[cols ENERG_LO,ENERG_HI])"
unix% pset mkarf sourcepixelx=4140.40
unix% pset mkarf sourcepixely=4031.60
unix% mkarf 
Aspect Histogram File (3c273.asphist[ASPHIST]): 
Output File Name (3c273_bg.arf): 
Source X Pixel (4140.40): 
Source Y Pixel (4031.60): 
Energy grid spec (grid(3c273_bg_mkacisrmf.rmf[cols ENERG_LO,ENERG_HI])): 
Name of fits file with obs info (evt file -- include extension) (acisf00459N004_evt2.fits[EVENTS]): 
Verbosity (0:5) (0): 
Detector Name (ACIS-S3): 
Grating for zeroth order ARF (NONE|LETG|HETG) (HETG): 
NONE, or name of ACIS window mask file (acisf00459_000N003_msk1.fits): 
NONE, or the name of the parameter block file (acisf063875928N003_pbk0.fits): 

You can check the parameter file that was used with plist mkarf.

Correct the Source ARF (arfcorr)

arfcorr calculates the energy-dependent point-source aperture correction for the source and applies the correction to the ARF file.

The (x,y) position used when running mkarf is input to arfcorr, as is the extraction region used for the source spectrum. An input image is required to set the size and scale of the PSF image that will be generated. A one-arcminute image (120 ACIS pixels) is created using Data Model virtual file syntax at the source location.

unix% punlearn arfcorr
unix% pset arfcorr infile="acisf00459N004_evt2.fits[sky=region(3c273.reg)][bin sky]" 
unix% pset arfcorr arf=3c273.arf
unix% pset arfcorr outfile=3c273_corr.arf
unix% pset arfcorr region="region(3c273.reg)"
unix% pset arfcorr x=4144.29 y=4046.65

unix% arfcorr
input image file (acisf00459N004_evt2.fits[sky=region(3c273.reg)][bin sky]):
output PSF image or PSF_FRAC table (3c273_corr.arf):
source region (region(3c273.reg)):
image centroid, sky x coordinate (4144.29):
image centroid, sky y coordinate (4046.65):
input ARF (3c273.arf):

The output file, 3c273_corr.arf, is a copy of the input ARF with two column changes:

  • an additional column, "PSF_FRAC", lists the fraction of PSF counts within the input region at each energy (i.e., the ECF at each energy).
  • the "SPECRESP" column values have been multiplied by the PSF_FRAC value, resulting in column values of effective area scaled by the ECF.

You can check the parameter file that was used with plist arfcorr.

Since the background ARF is an extended component, arfcorr should not be applied. More information is available in the help file.


4. Update the Spectrum Files

Group the Source Spectrum (dmgroup)

The source spectrum is grouped to have a minimum number of 15 counts per new channel:

unix% punlearn dmgroup
unix% pset dmgroup infile=3c273.pi
unix% pset dmgroup outfile=3c273_grp.pi
unix% pset dmgroup grouptype=NUM_CTS 
unix% pset dmgroup grouptypeval=15
unix% pset dmgroup xcolumn=channel
unix% pset dmgroup ycolumn=counts
unix% dmgroup
Input dataset name (3c273.pi): 
Output dataset name (3c273_grp.pi): 
Grouping type (NONE|BIN|SNR|NUM_BINS|NUM_CTS|ADAPTIVE|ADAPTIVE_SNR|BIN_WIDTH|MIN_SLOPE|MAX_SLOPE|BIN_FILE) (NUM_CTS): 
Grouping type value (15): 
Binning specification (): 
Name of x-axis (channel): 
Name of y-axis (counts): 

Group the Background Spectrum (dmgroup)

The background spectrum is binned by a factor of 20:

unix% punlearn dmgroup
unix% pset dmgroup infile=3c273_bg.pi
unix% pset dmgroup outfile=3c273_bg_grp.pi
unix% pset dmgroup binspec=1:1024:20
unix% pset dmgroup grouptype=BIN
unix% pset dmgroup xcolumn=channel
unix% pset dmgroup ycolumn=counts
unix% dmgroup
Input dataset name (3c273_bg.pi): 
Output dataset name (3c273_bg_grp.pi): 
Grouping type (NONE|BIN|SNR|NUM_BINS|NUM_CTS|ADAPTIVE|ADAPTIVE_SNR|BIN_WIDTH|MIN_SLOPE|MAX_SLOPE|BIN_FILE) (BIN): 
Grouping type value (0): 
Binning specification (1:1024:20): 
Name of x-axis (channel): 
Name of y-axis (counts): 

You can check the parameter file that was used with plist dmgroup.

Update File Headers (dmhedit)

Finally, update the appropriate header keywords in the both the ungrouped and grouped source PHA files.

Note that the ungrouped background file name is used as the BACKFILE header keyword value. The source grouping is applied to the background grouping when fitting in Sherpa. For fitting only background data, or simultaneous fitting of source and background data, Sherpa can group background dynamically with the group functions; see the Fitting section of this thread for more information.

unix% punlearn dmhedit
unix% dmhedit infile=3c273.pi filelist="" operation=add key=BACKFILE value=3c273_bg.pi
unix% dmhedit infile=3c273.pi filelist="" operation=add key=RESPFILE value=3c273_mkacisrmf.rmf
unix% dmhedit infile=3c273.pi filelist="" operation=add key=ANCRFILE value=3c273_corr.arf

unix% dmhedit infile=3c273_grp.pi filelist="" operation=add key=BACKFILE value=3c273_bg.pi
unix% dmhedit infile=3c273_grp.pi filelist="" operation=add key=RESPFILE value=3c273_mkacisrmf.rmf
unix% dmhedit infile=3c273_grp.pi filelist="" operation=add key=ANCRFILE value=3c273.arf

in the ungrouped background PHA file:

unix% dmhedit infile=3c273_bg.pi filelist="" operation=add key=RESPFILE value=3c273_bg_mkacisrmf.rmf
unix% dmhedit infile=3c273_bg.pi filelist="" operation=add key=ANCRFILE value=3c273_bg.arf

and in the linearly-grouped background PHA file:

unix% dmhedit infile=3c273_bg_grp.pi filelist="" operation=add key=RESPFILE value=3c273_bg_mkacisrmf.rmf
unix% dmhedit infile=3c273_bg_grp.pi filelist="" operation=add key=ANCRFILE value=3c273_bg.arf

Analysis Caveats

Users should be cautious about analyzing the data for sources near the edges of the ACIS CCDs.

  1. For X-rays passing through the mirrors, the very bottom of each CCD is obscured by the frame store. As a result, some of the events in rows with CHIPY <= 8 are not detected. (The set of rows affected varies from CCD to CCD.) Since the CIAO tools do not compensate for this effect, the ARFs and exposure maps for sources in these regions may be inaccurate.

  2. For sources within about thirty-two pixels of any edge of a CCD, the source may be dithered off the CCD during part of an observation. The aspect histogram, which is used to create ARFs and exposure maps, is designed to compensate for this effect.

  3. An ARF calculated at the edge of a chip will not be accurate since the response tools for spectral extraction (specifically the ARF) assume that 100% of the PSF is enclosed - i.e. on the chip - all the time, which may not be the case. The amount of error introduced depends on how close the source is to the edge, the morphology of the source, and the characteristics of the PSF, which depends on the source spectrum.

  4. A contaminant has accumulated on the optical-blocking filters of the ACIS detectors, as described in the ACIS QE Contamination why topic. Since there is a gradient in the temperature across the filters (the edges are colder), there is a gradient in the amount of material on the filters. (The contaminant is thicker at the edges.) Within about 100 pixels of the outer edges of the ACIS-I and ACIS-S arrays, the gradient is relatively steep. Therefore, the effective low-energy (' 1 keV) detection efficiency may vary within the dither pattern in this region. The ARF and instrument map tools are designed to read a calibration file which describes this spatial dependence.


Fitting

If you would like to fit the background-subtracted source spectrum using a common RMF and ARF for source and background, simply read the source spectrum FITS file into Sherpa, subtract the background, and fit it. See the Introduction to Fitting PHA Spectra thread for details.

To fit source and background spectra simultaneously with distinct RMFs and ARFs, follow the Independent Background Responses thread.



Parameters for /home/username/cxcds_param/specextract.par


        infile = acisf00459N004_evt2.fits[sky=region(3c273.reg)] Source event file(s)
       outroot = spec             Output directory path + root name for output files
        weight = no               Should response files be weighted?
       correct = yes              Apply point source aperture correction to ARF?
           asp = @pcad_asol1.lis  Source aspect solution or histogram file(s)
       combine = no               Combine ungrouped output spectra and responses?
       pbkfile = acisf063875928N003_pbk0.fits pbkfile input to mkwarf
       mskfile = acisf00459_000N003_msk1.fits mskfile input to mkwarf
      (bkgfile = acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)]) Background event file(s)
      (rmffile = CALDB)           rmffile input for CALDB
        (ptype = PI)              PI or PHA
    (grouptype = NUM_CTS)         Spectrum grouping type (same as grouptype in dmgroup)
      (binspec = 15)              Spectrum grouping specification (NONE,1:1024:10,etc)
(bkg_grouptype = NONE)            Background spectrum grouping type (NONE, BIN, SNR, NUM_BINS, NUM_CTS, or ADAPTIVE)
  (bkg_binspec = )                Background spectrum grouping specification (NONE,10,etc)
       (energy = 0.3:11.0:0.01)   Energy grid
      (channel = 1:1024:1)        RMF binning attributes
  (energy_wmap = 300:2000)        Energy range for (dmextract) WMAP input to mkacisrmf
      (binwmap = tdet=8)          Binning factor for (dmextract) WMAP input to mkacisrmf
   (binarfwmap = 1)               Binning factor for (sky2tdet) WMAP input to mkwarf
       (dafile = CALDB)           dafile input to mkwarf
   (badpixfile = acisf00459_000N003_bpix1.fits) Bad pixel file for the observation
      (clobber = no)              OK to overwrite existing output file?
      (verbose = 0)               Debug Level(0-5)
         (mode = ql)              
    


Parameters for /home/username/cxcds_param/dmextract.par


#--------------------------------------------------------------------
#
# DMEXTRACT -- extract columns or counts from an event list
#
#--------------------------------------------------------------------
        infile = acisf00459N004_evt2.fits[sky=region(3c273_bg.reg)][bin pi] Input event file 
       outfile = 3c273_bg.pi      Enter output file name
          (bkg = )                Background region file or fixed background (counts/pixel/s) subtraction
        (error = gaussian)        Method for error determination(poisson|gaussian|<variance file>)
     (bkgerror = gaussian)        Method for background error determination(poisson|gaussian|<variance file>)
      (bkgnorm = 1.0)             Background normalization
          (exp = )                Exposure map image file
       (bkgexp = )                Background exposure map image file
      (sys_err = 0)               Fixed systematic error value for SYS_ERR keyword
          (opt = pha1)            Output file type: pha1 
     (defaults = ${ASCDS_CALIB}/cxo.mdb -> /soft/ciao/datacxo.mdb) Instrument defaults file
         (wmap = )                WMAP filter/binning (e.g. det=8 or default)
      (clobber = no)              OK to overwrite existing output file(s)?
      (verbose = 0)               Verbosity level
         (mode = ql)              
    


Parameters for /home/username/cxcds_param/dmstat.par


        infile = acisf00459N004_evt2.fits[sky=region(3c273.reg)][cols chipx,chipy,ccd_id,x,y] Input file specification
   out_columns = chipx,chipy,ccd_id,x,y Output Column Label
       out_min = 252,296,7,4068.8461914,4005.0986328 Output Minimum Value
   out_min_loc = 136,57,1,9,51    Output Minimum Location Value
       out_max = 343,465,7,4205.9257812,4074.0290527 Output Maximum Value
   out_max_loc = 87,54,1,173,86   Output Maximum Location Value
      out_mean = 293.6076555,382.18660287,7,4140.4038366,4031.5951926 Output Mean Value
    out_median =                  Output Median Value
     out_sigma = 20.953334771,50.746566221,0,48.516897207,20.060247953 Output Sigma Value
       out_sum = 61364,79877,1463,865344.40186,842603.39526 Output Sum of Values
      out_good = 209,209,209,209,209 Output Number Good Values
      out_null = 0,0,0,0,0        Output Number Null Values
    out_cnvrgd =                  Converged?
 out_cntrd_log =                  Output Centroid Log Value
out_cntrd_phys =                  Output Centroid Phys Value
out_sigma_cntrd =                  Output Sigma Centroid Value
     (centroid = yes)             Calculate centroid if image?
       (median = no)              Calculate median value?
        (sigma = yes)             Calculate the population standard deviation?
         (clip = no)              Calculate stats using sigma clipping?
       (nsigma = 3)               Number of sigma to clip
      (maxiter = 20)              Maximum number of iterations
      (verbose = 1)               Verbosity level
         (mode = ql)
    


Parameters for /home/username/cxcds_param/mkacisrmf.par


        infile = /soft/ciao/CALDB/data/chandra/acis/p2_resp/acisD2000-01-29p2_respN0005.fits scatter/rsp matrix file
       outfile = 3c273_bg_mkacisrmf.rmf RMF output file
          wmap = none             WMAP file
        energy = 0.1:11.0:0.01    energy grid in keV (lo:hi:bin)
       channel = 1:1024:1         channel grids in pixel (min:max:bin)
      chantype = PI               channel type
        ccd_id = 7                filter CCD-ID
         chipx = 293              filter chipx in pixel
         chipy = 382              ficlter chipy in pixel
          gain = /soft/ciao/CALDB/data/chandra/acis/det_gain/acisD1999-09-16gainN0006.fits gain file
     (asolfile = )                aspect solution file or a stack of asol files
      (obsfile = )wmap -> none)   obs file
      (logfile = )                log file
      (contlvl = 100)             # contour level
      (geompar = geom)            pixlib geometry parameter file
       (thresh = 1e-06)           low threshold of energy cut-off probability
      (clobber = no)              overwrite existing output file (yes|no)?
      (verbose = 0)               verbosity level (0 = no display)
         (mode = ql)
    


Parameters for /home/username/cxcds_param/acis_fef_lookup.par


        infile = acisf00459N004_evt2.fits   Source file (event or spectrum)
        chipid = 7                ACIS chip number
         chipx = 293              ACIS chip x coordinate
         chipy = 382              ACIS chip y coordinate
       outfile = /soft/ciao/CALDB/data/chandra/acis/fef_pha/
acisD1999-09-16fef_phaN0002.fits[FUNCTION][ccd_id=7,chipx=289:320,chipy=353:384] FEF file to use
      (verbose = 0)               Verbose level
         (mode = ql)              
    


Parameters for /home/username/cxcds_param/mkrmf.par


        infile = /soft/ciao/CALDB/data/chandra/acis/fef_pha/
acisD1999-09-16fef_phaN0002.fits[FUNCTION][ccd_id=7,chipx=289:320,chipy=353:384] name of FEF input file
       outfile = 3c273_bg.rmf     name of RMF output file
         axis1 = energy=0.1:11.0:0.01 axis-1(name=lo:hi:btype)
         axis2 = pi=1:1024:1      axis-2(name=lo:hi:btype)
      (logfile = STDOUT)          name of log file
      (weights = )                name of weight file
       (thresh = 1e-5)            low threshold of energy cut-off probability
       (outfmt = legacy)          RMF output format (legacy|cxc)
      (clobber = no)              overwrite existing output file (yes|no)?
      (verbose = 0)               verbosity level (0 = no display)
        (axis3 = none)            axis-3(name=lo:hi:btype)
        (axis4 = none)            axis-4(name=lo:hi:btype)
        (axis5 = none)            axis-5(name=lo:hi:btype)
         (mode = ql)              
    


Parameters for /home/username/cxcds_param/asphist.par


#--------------------------------------------------------------------------
#
#       Parameter file for the ASPECT HISTOGRAM Tool
#
#--------------------------------------------------------------------------
        infile = @pcad_asol1.lis  Aspect Solution List Files
       outfile = 3c273.asphist    Aspect Histogram Output File
       evtfile = acisf00459N004_evt2.fits[ccd_id=7] Event List Files
       dtffile =                  Live Time Correction List Files for HRC
      (geompar = geom)            Parameter file for Pixlib Geometry files
       (res_xy = 0.5)             Aspect Resolution x and y in arcsec
     (res_roll = 600.)            Aspect Resolution roll in arcsec
      (max_bin = 10000.)          Maximal number of bins
      (clobber = no)              Clobber output
      (verbose = 0)               Verbose
         (mode = ql)              
    


Parameters for /home/username/cxcds_param/mkarf.par


   asphistfile = 3c273.asphist[ASPHIST] Aspect Histogram File
       outfile = 3c273_bg.arf     Output File Name
  sourcepixelx = 4140.4           Source X Pixel
  sourcepixely = 4031.6           Source Y Pixel
        engrid = grid(3c273_bg_mkacisrmf.rmf[cols ENERG_LO,ENERG_HI]) Energy grid spec
       obsfile = acisf00459N004_evt2.fits[EVENTS] Name of fits file with obs info (evt file -- include extension)
#
       pbkfile = acisf063875928N003_pbk0.fits NONE, or the name of the parameter block file
     detsubsys = ACIS-S3          Detector Name
       grating = HETG             Grating for zeroth order ARF
      maskfile = acisf00459_000N003_msk1.fits NONE, or name of ACIS window mask file
       verbose = 0                Verbosity
#
       (dafile = CALDB            NONE, CALDB, or name of ACIS dead-area calibration file
#
       (mirror = HRMA)            Mirror Name
#
(ardlibparfile = ardlib.par)      name of ardlib parameter file
      (geompar = geom)            Parameter file for Pixlib Geometry files
      (clobber = no)              Overwrite existing files?
#
         (mode = ql)              Enter mode for parameter file.
    


Parameters for /home/username/cxcds_param/arfcorr.par


        infile = acisf00459N004_evt2.fits[sky=region(3c273.reg)][bin sky] input image file
           arf = 3c273.arf        input ARF
       outfile = 3c273_corr.arf   output PSF image or PSF_FRAC table
        region = region(3c273.reg) source region
             x = 4144.29          image centroid, sky x coordinate
             y = 4046.65          image centroid, sky y coordinate
       (energy = )                energy in keV (0 = read from ARF)
       (e_step = 50)              energy stepsize (read every 'e_step' row from ARF)
       (radlim = 2.0)             radius at which PSF artificially drops to 0 (multiplies last radius)
      (nsubpix = 5)               subpixelation (1d) of ecf model pixels to choose image pix value
     (nfracpix = 1)               subpixelation (1d) of ecf pixels when calculating psffrac
      (ecffile = ${CALDB}/data/chandra/default/reef/hrmaD1996-12-20reefN0001.fits -> /soft/ciao/CALDB/data/chandra/default/reef/hrmaD1996-12-20reefN0001.fits) ecf file
      (clobber = no)              OK to overwrite existing output file?
      (verbose = 0)               Debug level (0-5)
         (mode = ql)
    


Parameters for /home/username/cxcds_param/dmgroup.par


        infile = 3c273_bg.pi      Input dataset name
       outfile = 3c273_bg_grp.pi  Output dataset name
     grouptype = BIN              Grouping type
  grouptypeval = 0                Grouping type value
       binspec = 1:1024:20        Binning specification
       xcolumn = channel          Name of x-axis
       ycolumn = counts           Name of y-axis
      (tabspec = )                Tab specification
    (tabcolumn = )                Name of tab column
     (stopspec = )                Stop specification
   (stopcolumn = )                Name of stop column
    (errcolumn = )                Name of error column
      (clobber = no)              Clobber existing output file?
      (verbose = 0)               Verbosity level
    (maxlength = 0)               Maximum size of groups (in channels)
         (mode = ql)              
    

History

14 Dec 2004 updated for CIAO 3.2: created "Using Consistent Calibration" and Downloading the Scripts sections
23 Jun 2005 CIAO 3.2.2 patch: new calibration for mkacisrmf is available; see the "Using Consistent Calibration: mkrmf vs mkacisrmf section"
15 Dec 2005 updated for CIAO 3.3: the psextract script has been updated to version 3.3 for the new asphist tool syntax; note about specextract in the Overview; default value of dmextract error and bkgerror parameters is "gaussian" (this tool is called by psextract)
01 Feb 2006 added link to specextract thread
31 Mar 2006 specextract use update added to Overview; title changed from "Extract ACIS Spectra for Pointlike Sources and Make RMFs and ARFs" to "Using psextract to Extract ACIS Spectra and Response Files for Pointlike Sources"
14 Jun 2006 corrected link in "Calibration Updates"; clarified information on GRADED mode data
25 Jul 2006 added Creating an RMF with mkacisrmf section, moved "Using Consistent Calibration: mkrmf vs mkacisrmf" section
01 Dec 2006 updated for CIAO 3.4: psextract version 3.4 (mkarf obsfile parameter is set to event file instead of asphist file); acis_fef_lookup version 1.19 (changes for CTI lookup)
02 Feb 2007 updated for CALDB 3.3.0.1 patch
26 Feb 2007 psextract v4.0 and acis_fef_lookup v1.20: Dead area correction parameters added to the psextract.par file: pbkfile and dafile (added "ACIS dead area correction section"). Script prints a warning if RMF should be remade with mkacisrmf. Several other minor code changes that don't affect the output files (see the Script History page for details).
22 Jan 2008 updated for CIAO 4.0: psextract v4.0.1 (parameter updates for applying ACIS dead area correction, which is turned on by default); acis_fef_lookup v1.21 (updated to to run under S-Lang v2; functionality is unchanged); available links updated to point to Sherpa Beta website; removed old calibration updates
31 Mar 2008 updated for CALDB 3.4.3: use mkacisrmf for -110 BI chips if TGAIN calibration has been applied
30 May 2008 psextract v4.0.3 (Unix head and tail commands replaced by pget and dmkeypar); thread images are inline
04 Aug 2008 the source and background region(s) must be confined to a single chip
02 Feb 2009 updated for CIAO 4.1: image converted to inline; acis_fef_lookup vCIAO 4.1 - 1.0 (rewritten to be compatible with CALDB 4.1); "ARDLIB warning ... Assuming the first "interesting" extension." no longer printed; updated Sherpa thread link to 4.1 version; input data must have a CTI_APP keyword
05 Mar 2009 added information about matching the ARF and RMF grids to the Creating an RMF with mkacisrmf section
06 May 2009 check the version of the CIAO scripts package instead of the individual script
21 May 2009 added explanation of why ungrouped background filename is used in the BACKFILE header keyword of the grouped source spectrum
12 Jan 2010 updated for CIAO 4.2: ObsID 459 file versions and corresponding minor changes to screen output; calibration update - the ACIS QE contamination model has been upgraded to vN0005.
15 Dec 2010 updated for CIAO 4.3: users should run arfcorr on the source ARF file (Correct the Source ARF section); new ACIS contamination calibration file
20 Jan 2011 users are encouraged to use specextract in place of the psextract script for new analyses
25 Feb 2011 updated for 25 Feb scripts package release: the asp parameter can take aspect solution files directly (don't have to run asphist make an aspect histogram first); if the bad pixel file is supplied in the badpixfile parameter, the ardlib parameters are set by the script; the mask file is applied when making unweighted ARFs (mkarf)
01 Mar 2011 CALDB 4.4.2 release: fix to the header of the ACIS QE contamination file. Prior to this release, CIAO would fail when trying to look up the contamination model correction for chips ACIS-8 (S4) and ACIS-9 (S5).
04 Apr 2011 updated for 04 Apr scripts package release: acis_fef_lookup script prints the version at verbose > 0. specextract: user is prompted for the bkgfile parameter (previously was hidden); new parameter, bkgresp, determines whether a background ARF and RMF should be created; additional changes are outlined in detail in the script release notes for 04 Apr 2011.
12 Apr 2011 updated for specextract changes in the 12 Apr scripts package release: the grating parameter in mkarf was not being set for zero-order grating data point source extraction (weight=no); bug fix - regions may be specified on the command line or in a file, i.e. "sky=circle(344,435,10)" vs. "sky=region(src.reg)".
26 Apr 2011 install version 2 of the tools package for CIAO 4.3 to fix the mkrmf bug; specextract was updated in the 25 April scripts package release, but the changes do not affect this thread
25 May 2011 expanded the creating an RMF with mkacisrmf section
07 Jun 2011 the "Step-by-Step Guide to Creating ACIS Spectra for Pointlike Sources" thread is now a section of this thread
06 Jul 2011 specextract bug fixes were released in the 07 July 2011 scripts package; required software updates are listed in Synopsis
06 Sep 2011 a specextract bug fix was released in the 06 Sep 2011 scripts package
06 Oct 2011 a specextract bug fix and a workaround for a known CIAO bug were released in the 06 Oct 2011 scripts package
15 Dec 2011 reviewed for CIAO 4.4: documentation on psextract has been removed since the script is no longer part of the scripts package.
16 Feb 2012 a specextract bug fix was released in the 16 Feb 2012 scripts package: the script will not error out if you set outroot to be a stack and have correct=yes and weight=no.
30 May 2012 corrected typo in arfcorr command.
03 Dec 2012 Review for CIAO 4.5; minor edits

Return to Threads Page: Top | All | Imag Spec

Last modified: 3 Dec 2012
CXC logo

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2012. All rights reserved.