Extract Coadded and Grouped Nth-Order Source & Background Spectra and ARFs
[CIAO 3.4 Science Threads]
OverviewLast Update: 1 Dec 2006 - reviewed for CIAO 3.4: no changes Synopsis: add_grating_orders is a script which lets the user add up positive and negative diffraction orders of a given grating spectrum, and their associated ARFs. The output spectrum can be grouped if desired. Purpose: To generate and group a coadded positive and negative order grating spectrum (for both source and background) and the associated ARF. Read this thread if: you are working with ACIS/HETG, ACIS/LETG, or HRC/LETG observational data and would like to add the grating orders. Related Links:
|
Contents
- Get Started
- Downloading add_grating_orders
- Run add_grating_orders
- Summary
- Parameter files:
- History
Get Started
Sample ObsID used: 459 (HETG/ACIS-S, 3C 273)
File types needed: pha2
This thread assumes that you have created positive and negative grating ARFs for your dataset. This process is illustrated in the threads for building ACIS/HETG, ACIS/LETG, HRC-S/LETG, or HRC-I/LETG ARFs.
The data to be combined must have been taken with the same instrumental configuration:
- ACIS-HETG-HEG
- ACIS-HETG-MEG
- ACIS-LETG-LEG
- HRC-LETG-LEG
Downloading add_grating_orders
The most recent version of add_grating_orders is 2.2 (22 May 2001):
unix% grep version_ `which add_grating_orders` version_str="2.2" version_date="22 May 2001"
Please check that you are using the most recent version before continuing. If you do not have the script installed or need to update to a newer version, please refer to the Scripts page.
Run add_grating_orders
The script executes the following tools in order:
- dmtype2split: to split the PHA2 spectrum into two temporary positive and negative order spectra with PHA1-like format.
- dmtcalc: to rename columns in the two temporary PHA1 files, and to build two temporary single-order ARFs with renamed columns.
- dmpaste: to merge the two temporary PHA1 spectra and ARFs. gspec
- dmtcalc: to add together positive and negative spectra and ARFs.
- dmcopy: to build a final coadded spectrum (with a PHA1-like format) and a coadded ARF.
- dmgroup: to group the coadded positive and negative order spectrum (if needed).
In this example, we build coadded 1st-order source and background MEG spectra and a 1st-order ARF. Then the source spectrum is grouped by a factor of 10 (to learn more about the several options for gtype, see ahelp dmgroup. Note that the ``ADAPTIVE'' grouping may take a long time on large PHA files):
unix% punlearn add_grating_orders unix% pset add_grating_orders pha2=acisf00459N002_pha2.fits unix% pset add_grating_orders order=1 unix% pset add_grating_orders garm=MEG unix% pset add_grating_orders garfm=acisf00459MEG_-1_garf.fits unix% pset add_grating_orders garfp=acisf00459MEG_1_garf.fits unix% pset add_grating_orders gtype=BIN unix% pset add_grating_orders gspec=10 unix% pset add_grating_orders root=459 unix% add_grating_orders Input PHA2 spectrum (acisf00459N002_pha2.fits): Order of the grating spectra to extract and add together (1): Grating Arm (HEG, MEG or LEG) (MEG): Negative order grating ARF (acisf00459MEG_-1_garf.fits): Positive order grating ARF (acisf00459MEG_1_garf.fits): Root name for output files (459): Input pha2 file is: acisf00459N002_pha2.fits Using MEG grating ARF order 1: acisf00459MEG_-1_garf.fits Using MEG grating ARF order 1: acisf00459MEG_1_garf.fits The root filename for the output file is: 459 The coadded, grouped output spectrum is named 459_MEG_1_BIN10.pha The coadded Effective Area is named 459_MEG_1.arf
The content of the parameter file may be checked using plist add_grating_orders.
Summary
The thread is now complete. The coadded 1st-order spectra are contained in the PHA1-like file named 459_MEG_1_BIN10.pha; the coadded +/- 1st order ARF is named 459_MEG_1.arf.
To fit this data in Sherpa:
sherpa> data 459_MEG_1_BIN10.pha sherpa> rsp[arfname](,459_MEG_1.arf,) sherpa> instrument = arfname
See the Fitting PHA Data with Multi-Component Source Models thread for more information.
Parameters for /home/username/cxcds_param/add_grating_orders.par pha2 = acisf00459N002_pha2.fits Input PHA2 spectrum order = 1 Order of the grating spectra to extract and add together garm = MEG Grating Arm (HEG, MEG or LEG) garfm = acisf00459MEG_-1_garf.fits Negative order grating ARF garfp = acisf00459MEG_1_garf.fits Positive order grating ARF root = 459 Root name for output files (gtype = BIN) Spectrum grouping type (gspec = 10) Spectrum grouping specs (NONE,10,etc) (clobber = no) Clobber existing output files? (verbose = 0) Debug Level(0-5) (mode = ql) |
History
14 Dec 2004 | updated for CIAO 3.2: created Downloading add_grating_orders section |
06 Dec 2005 | reviewed for CIAO 3.3: no changes |
01 Dec 2006 | reviewed for CIAO 3.4: no changes |