LETG/ACIS-S Grating ARFs
CIAO 4.2 Science Threads
Last Update: 5 Apr 2010 - updated for CALDB 4.2.1: calibration update - the LETG grating efficiency has been upgraded to vN0006.
fullgarf is a script that creates a grating ARF for a particular order and grating of an observation. While the mkgarf tool will create a grating ARF for an individual chip given an aspect histogram, this script creates ARFS for each chip, creating aspect histograms as necessary. The script then combines the individual ARFS into one for the full array.
To create grating ARFs for an LETG/ACIS-S observation.
Read this thread if:
you are working with an LETG/ACIS-S observation and intend to model and fit the spectra.
CALDB v4.2.1 (5 Apr 2010):
The LETG grating efficiency file (GREFF) was updated to be version N0006. The new file will be used by default when creating LETG response files (ARFs).
There is no change in the responses for +/1 order. The revised effective area curves (ARF files) for orders 2-7 will be lower than those created with the previous LETG GREFF calibration by 3-9%.
Users should read the How CALDB 4.2.1 Affects Your Analysis section of the CIAO 4.2 release notes for more information on how this change will affect the response file.
CALDB v4.2.0 (15 Dec 2009):
The ACIS QE contamination model has been upgraded to vN0005. This version of the file contains separate components for the correction on ACIS-S and ACIS-I. The new calibration file is used by default when creating ARFs and instrument maps in CIAO 4.2.
The changes in the vN0005 file will primarily affect low-energy absorption components between C-K edge (0.283 keV) and 1.2 keV. In general, hard spectra will not be affected much by the calibration change.
Users should read the ACIS QE Contamination Model vN0005 section of the CIAO 4.2 release notes for information on how this change will affect the response file.
- Analysis Guide for Chandra High Resolution Spectroscopy: an in-depth discussion of grating analysis.
Continuous Clocking Mode why topic: additional information for users working with CC-mode data.
ACIS QE Contamination why topic: correcting for the change in low-energy ACIS QE associated with the deposition of one or more materials on the ACIS detectors or optical blocking filters.
- About the Chandra Grating Data Archive and Catalog
- Get Started
- Determine the Orders of the Observation
- Run fullgarf
- Parameter files:
The Chandra Grating Data Archive and Catalog (TGCat) is a browsable interface to analysis-quality spectral products (binned spectra and corresponding response files). TGCat makes it easy to find observations of a particular object, type of object, or type of observation, to quickly assess the quality and potential usefulness of the spectra with pre-computed graphics or custom-generated plots of binned and combined counts or fluxe spectra. Spectra, responses, event files, and summary products may be downloaded as a package.
TGCat runs standard CIAO tools, but also includes customized extractions for non-standard cases to refine the zeroth order position or to use regions appropriate for extended sources. Non-standard extractions details are provided in "verification and validation" comments for users.
Most public grating observations are available and new ones are added soon after they are released. See the list of of observations not included for exceptions. Many of the observations currently in this list will be included when we add enhanced processing for more difficult cases (multiple sources, very extended sources).
Please consider using the spectrum and responses (PHA, ARF, and RMF files) from TGCat in your analysis.
Sample ObsID used: 1198 (LETG/ACIS-S, 3C 273)
File types needed: evt2; pha2; asol1; bpix1; msk1; pbk0
If you created a new bad pixel file by running the New ACIS Bad Pixel File: Identify ACIS Hot Pixels and Cosmic Ray Afterglows thread or the Customizing an ACIS Bad Pixel File thread, use that file in this analysis. Otherwise, use the bpix1.fits file from the Archive. Make sure that you have set up ardlib to use the same bad pixel file.
It is assumed that you have created a gRMF for your observation by running the Create Grating RMFs for ACIS-S Observations thread, which is called rmf.fits.
This thread uses the fullgarf script; for information about the script, consult the help file ("ahelp fullgarf"). The script is part of the CIAO Scripts distribution. The CIAO scripts package should be the following version or newer:
unix% cat $ASCDS_CONTRIB/VERSION.CIAO_scripts 01 Jun 2009
Please check that you have at least this version of the scripts package installed before continuing. If you do not have the scripts installed or need to update to a newer version, refer to the Scripts page.
An ARF needs to be calculated for each order in the observation. We can use Prism to examine the pha2 file and determine how many orders there are:
unix% prism acisf01198N002_pha2.fits &
The tg_m column indicates the order of the observation (+/- 1, +/- 2, +/- 3) and the tg_part column indicates the grating (1 = HEG, 2 = MEG, 3 = LEG). The six rows (all +/- orders for LEG) for the LETG observation are shown in Figure 1.
It is necessary to run fullgarf for each order that will be modeled, up to six times (once for each row in the PHA file).
For row 2, LEG, order = -2:
unix% punlearn fullgarf unix% pset fullgarf phafile=acisf01198N002_pha2.fits unix% pset fullgarf pharow=2 unix% pset fullgarf evtfile=acisf01198N002_evt2.fits unix% pset fullgarf asol=@pcad_asol1.lis unix% pset fullgarf engrid="grid(rmf.fits[cols ENERG_LO,ENERG_HI])" unix% pset fullgarf dtffile=")evtfile" unix% pset fullgarf badpix=acis_1198_new_bpix1.fits unix% pset fullgarf maskfile=acisf01198_000N002_msk1.fits unix% pset fullgarf pbkfile=acisf063833861N002_pbk0.fits unix% pset fullgarf dafile=CALDB unix% pset fullgarf rootname=acisf01198
unix% cat pcad_asol1.lis pcadf063832996N002_asol1.fits
Now run the tool:
unix% fullgarf Will use /home/username/cxcds_param4/fullgarf.par for the parameter file. /home/username/cxcds_param4/fullgarf.par contains 15 parameters . . . Input PHA file (Type I or II) (acisf01198N002_pha2.fits): Row in Type II PHA file (ignored if Type I) (0:99) (2): Event file (acisf01198N002_evt2.fits): Aspect offsets file (@pcad_asol1.lis): Energy grid spec (grid(rmf.fits[cols ENERG_LO,ENERG_HI])): Dead time correction factor; ACIS->evt file; HRC -> dtf file (')evtfile'): Bad pixel file; (filename|NONE|CALDB) (acis_1198_new_bpix1.fits): Output rootname (acisf01198): NONE, or the name of the parameter block file (acisf063833861N002_pbk0.fits): NONE, or name of ACIS window mask file (acisf01198_000N002_msk1.fits): Getting the pha file type . . . Grating arm is LEG, order=-2 Source location is X=4162.240234375, Y=4084.679931640625 Detector is ACIS Will run asphist for ccd_id= 4 5 6 7 asphist infile=@pcad_asol1.lis outfile=acisf01198_ah4.fits evtfile=acisf01198N002_evt2.fits[ccd_id=4] dtffile=acisf01198N002_evt2.fits asphist infile=@pcad_asol1.lis outfile=acisf01198_ah5.fits evtfile=acisf01198N002_evt2.fits[ccd_id=5] dtffile=acisf01198N002_evt2.fits asphist infile=@pcad_asol1.lis outfile=acisf01198_ah6.fits evtfile=acisf01198N002_evt2.fits[ccd_id=6] dtffile=acisf01198N002_evt2.fits asphist infile=@pcad_asol1.lis outfile=acisf01198_ah7.fits evtfile=acisf01198N002_evt2.fits[ccd_id=7] dtffile=acisf01198N002_evt2.fits Finished creating aspect histograms for ccd_id= 4 5 6 7 Will run mkgarf for the same ccd_id list mkgarf detsubsys=ACIS-S0 order=-2 grating_arm=LEG outfile=acisf01198_S0_LEG_-2.fits asphistfile=acisf01198_ah 4.fits[ASPHIST] engrid=grid(rmf.fits[cols ENERG_LO,ENERG_HI]) osipfile=CALDB dafile=CALDB pbkfile=acisf063833861N002_pbk0.fits pbkfile=acisf063833861N002_pbk0.fits maskfile=acisf01198_000N002_msk1.fits mode=hl verb=0 mkgarf detsubsys=ACIS-S1 order=-2 grating_arm=LEG outfile=acisf01198_S1_LEG_-2.fits asphistfile=acisf01198_ah 5.fits[ASPHIST] engrid=grid(rmf.fits[cols ENERG_LO,ENERG_HI]) osipfile=CALDB dafile=CALDB pbkfile=acisf063833861N002_pbk0.fits pbkfile=acisf063833861N002_pbk0.fits maskfile=acisf01198_000N002_msk1.fits mode=hl verb=0 mkgarf detsubsys=ACIS-S2 order=-2 grating_arm=LEG outfile=acisf01198_S2_LEG_-2.fits asphistfile=acisf01198_ah 6.fits[ASPHIST] engrid=grid(rmf.fits[cols ENERG_LO,ENERG_HI]) osipfile=CALDB dafile=CALDB pbkfile=acisf063833861N002_pbk0.fits pbkfile=acisf063833861N002_pbk0.fits maskfile=acisf01198_000N002_msk1.fits mode=hl verb=0 mkgarf detsubsys=ACIS-S3 order=-2 grating_arm=LEG outfile=acisf01198_S3_LEG_-2.fits asphistfile=acisf01198_ah 7.fits[ASPHIST] engrid=grid(rmf.fits[cols ENERG_LO,ENERG_HI]) osipfile=CALDB dafile=CALDB pbkfile=acisf063833861N002_pbk0.fits pbkfile=acisf063833861N002_pbk0.fits maskfile=acisf01198_000N002_msk1.fits mode=hl verb=0 Finished creating grating arfs for ccd_id= 4 5 6 7 dmarfadd @thisfile.istemporary acisf01198LEG_-2_garf.fits fullgarf finished.
The script is run in a similar way for the remaining rows.
At this point, you should have the spectra, gARFs, and gRMFs necessary for fitting the data. The Fitting Grating Data thread shows how to load the data and responses, define a model, and fit the spectra.
In order to use Gaussian statistics to fit a model to a dataset, it is often necessary to "group" the data - i.e. combine channels until you have enough counts. Before fitting the data in Sherpa, read the Grouping a Grating Spectrum thread for more information.
Parameters for /home/username/cxcds_param/fullgarf.par phafile = acisf01198N002_pha2.fits Input PHA file (Type I or II) pharow = 2 Row in Type II PHA file (ignored if Type I) evtfile = acisf01198N002_evt2.fits Event file asol = @pcad_asol1.lis Aspect offsets file engrid = grid(rmf.fits[cols ENERG_LO,ENERG_HI]) Energy grid spec dtffile = )evtfile -> acisf01198N002_evt2.fits Dead time correction factor; ACIS->evt file; HRC -> dtf file badpix = acis_1198_new_bpix1.fits Bad pixel file; (filename|NONE|CALDB) rootname = acisf01198 Output rootname maskfile = acisf01198_000N002_msk1.fits NONE, or name of ACIS window mask file pbkfile = acisf063833861N002_pbk0.fits NONE, or the name of the parameter block file (dafile = CALDB) NONE, CALDB, or name of ACIS dead-area calibration file (osipfile = CALDB) NONE or Name of fits file with order sorting info (clobber = no) Clobber existing output files? This is passed to ALL child processes. (verbose = 0) Control the level of diagnostic output. 0=>least. (mode = hl) Mode flags. Set to 'ql' to enable querying, 'hl' to suppress.
|23 Dec 2004||updated for CIAO 3.2: canned gRMFs are no longer available in the CALDB|
|06 Dec 2005||updated for CIAO 3.3: the fullgarf script has been updated to version 3.3.1 for the new asphist tool syntax; corresponding changes to screen output|
|01 Dec 2006||reviewed for CIAO 3.4: no changes|
|26 Feb 2007||fullgarf v4.0.1: Four new parameters have been added, all of which are used by the mkgarf tool: pbkfile, dafile, osipfile, and maskfile; see "ahelp fullgarf" for details on each new parameter. Added ACIS dead area correction section|
|23 Jan 2008||updated for CIAO 4.0: fullgarf v4.1.1 (parameter updates for applying ACIS dead area correction, which is turned on by default); ACIS QE contamination link moved to "Related Links" section; removed outdated calibration updates|
|30 May 2008||fullgarf v4.1.3 (Unix head and tail commands replaced by pget and dmkeypar); thread images are inline|
|12 Feb 2009||updated for CIAO 4.1: "ARDLIB warning ... Assuming the first "interesting" extension." no longer printed; input data must have a CTI_APP keyword|
|19 Feb 2009||added Fitting section|
|06 May 2009||check the version of the CIAO scripts package instead of the individual script|
|01 Jun 2009||fullgarf updated in 01 Jun 2009 scripts package: If bad pixel file is not supplied, use the one from the CALDB. Previously, the script would set the bad pixel file to "NONE" in this case.|
|16 Jun 2009||added About the Chandra Grating Data Archive and Catalog section|
|12 Jan 2010||updated for CIAO 4.2: calibration update - the ACIS QE contamination model has been upgraded to vN0005.|
|05 Apr 2010||updated for CALDB 4.2.1: calibration update - the LETG grating efficiency has been upgraded to vN0006.|