Skip to the navigation links
Last modified: December 2009

AHELP for CIAO 4.2


Context: tools


Generate an ARF for Chandra imaging data (and grating 0-th order)


mkarf  asphistfile outfile sourcepixelx sourcepixely engrid obsfile
pbkfile detsubsys grating maskfile [dafile] [mirror] [ardlibparfile]
[geompar] [verbose] [clobber]


`mkarf' generates an OGIP style ARF appropriate for imaging observations. The ARF gives the effective area vs. energy for a given observation and instrument configuration; it has units of [cm**(2) counts/photon]. As input, 'mkarf' requires an aspect histogram (computed by asphist) along with a file with complete header information about the observation, such as a Level 1 event file. It outputs an ARF suitable for use in a spectral analysis package such as Sherpa.

The input calibration data (detector quantum efficiencies (QE), mirror effective areas, locations of bad pixels) are obtained using a software library called ARDLIB which is also used by a number of other programs. The ARDLIB library has its own parameter file, ardlib.par, which contains a large number of parameters, of which only a few are actually used by mkarf. For most users, the ARDLIB parameter values will specify files from the calibration database. Consult the ARDLIB documentation for information about specific ardlib.par parameters.

By default, the time and spatial dependence of the ACIS QE due to the buildup of contamination on the optical blocking filter is accounted for automatically. The ACIS QE is adjusted using the current contamination model, interpolating to the observation date taken from the header of the specified 'obsfile'. Alternatively, an observation date can be specified explicitly using the ARDLIB 'TIME' qualifier on the detsubsys parameter. For more information about the ACIS filter contamination model, see the ACIS calibration web page. The contamination correction can be excluded using the ARDLIB detsubsys qualifier "CONTAM=NO".

The definition of the ARF and its use in spectral analysis are discussed by Davis (2001) [ApJ, 548, 1010]. See also the discussion on the CIAO website and, in particular, "The Formal Underpinnings of the Response Functions used in X-Ray Spectral Analysis".

The ARF is computed assuming that the spectral extraction region is large enough to include the entire PSF (e.g. PSF fraction=1.0). If the spectral extraction region excludes part of the PSF, the computed effective area should include only fraction of the PSF contained in the spectral extraction region. For example, if the spectral extraction region includes only 80% of the encircled energy, the computed effective area for that extraction region should be smaller by a factor of 0.8.

It should be clear that the quantitative determination of the encircled energy fraction for a given spectral extraction region depends sensitively on the calibration of the detailed PSF shape as a function of energy and position within the field of view. Because the actual flight PSF is not known to high precision with this level of detail, one should weigh the potential gain associated with choosing a small spectral extraction region against the associated increase in calibration uncertainty.

Example 1

mkarf asphistfile="acis_i3_asphist.fits[asphist]"
outfile=acis_i3_arf.fits sourcepixelx=4139 sourcepixely=4120
engrid="grid(rmf.fits[MATRIX][cols ENERG_LO,ENERG_HI])" pbkfile=NONE
dafile=NONE obsfile=evt2.fits detsubsys="ACIS-I3"

Computes an ARF for the point (4139,4120) on ACIS-I3 using an energy grid from the file rmf.fits (in particular columns ENERG_LO and ENERG_HI in the MATRIX block), and writes it to acis_i3_arf.fits. The QE, accounting for the buildup of contamination on the optical blocking filter, is computed using the observation start time, TSTART, taken from the header of evt2.fits.

Example 2

mkarf asphistfile="acis_s3_asphist.fits[asphist]"
outfile=acis_s3_arf.fits sourcepixelx=4146.05 sourcepixely=4045.95
engrid="grid(s3_rmf.fits[MATRIX][cols ENERG_LO,ENERG_HI])"
obsfile=evt2.fits detsubsys=ACIS-S3
pbkfile=acisf063875928N002_pbk0.fits dafile=CALDB

Computes an ARF for the point (4146.0,4045.95) on ACIS-S3. The pbkfile and dafile parameters are set to apply the dead area correction.

Example 3

mkarf asphistfile="acis_s3_asphist.fits" outfile=acis_s3nc_arf.fits
sourcepixelx=3950 sourcepixely=4900 engrid="0.1:10.0:0.01" pbkfile=NONE
dafile=NONE obsfile=evt2.fits detsubsys="ACIS-S3;CONTAM=NO"

Computes an ARF for the point (3950, 4900) on ACIS-S3. The ARDLIB qualifier CONTAM=NO means that the QE will not be corrected for absorption by the contamination layer on the optical blocking filter (the default is CONTAM=YES). The energy grid will span the range 0.1-10 keV in steps of 0.01 keV


name type ftype def reqd
asphistfile file input   yes
outfile file output   yes
sourcepixelx real input   yes
sourcepixely real input   yes
engrid string input   yes
obsfile file input   yes
pbkfile string input   yes
detsubsys string input   yes
grating string input NONE yes
maskfile file input NONE yes
dafile string input CALDB  
mirror string input HRMA  
ardlibparfile file input ardlib.par  
geompar string input geom  
verbose integer   0  
clobber boolean   no  

Detailed Parameter Descriptions

Parameter=asphistfile (file required filetype=input)

The name of the file containing the binned aspect history in the form of an aspect histogram.

Note that each ACIS CCD has its own GTI file. This means that each chip will have its own aspect histogram file.

Parameter=outfile (file required filetype=output)

The name of the output ARF file.

Parameter=sourcepixelx (real required filetype=input)

Parameter=sourcepixely (real required filetype=input)

These parameters specify the (x,y) sky position [pixels] of the point source, in the appropriate tangent plane coordinate system for the detector.

Parameter=engrid (string required filetype=input)

Energy grid specification string. This string may specify either a file or an explicit energy grid. For example, to read a grid from the block MATRIX of an RMF file called rmf.fits, use:

"engrid=grid(rmf.fits[MATRIX][cols ENERG_LO,ENERG_HI])"

To specify an explicit grid running from 0.3 keV to 10.0 keV in 0.01 keV increment steps, use:


Parameter=obsfile (file required filetype=input)

The name of a FITS file, such as a level 2 event file, containing keywords which specify the mission, detector, SIM offsets, start time, etc.

Parameter=pbkfile (string required filetype=input)

The parameter block file, which defines ACIS pixel clocking parameters, is a standard product of pipeline processing and is available for every observation. This file contains information which defines how long any pixel is exposed before being read-out, which is related to the probability that any pixel will be disabled ("deadened") by cosmic rays. See the description of the "dafile" parameter for more information on ACIS dead area.

Parameter block files have names of the form, "acisf146860615N001_pbk0.fits". The long string of digits refers to the time of observation (seconds since reference date) and "N001" is a revision number.

If the pbkfile is set to "NONE", no dead area correction is applied; dafile is assumed to have the value "NONE". If pbkfile is set to a valid file, then the dafile parameter must refer to a calibration file.

The pbkfile parameter is ignored for HRC data.

Parameter=detsubsys (string required filetype=input)

The value of this parameter is passed to ARDLIB to select a particular detector subsystem so that the appropriate QE can be computed. It specifies the specific device (e.g. the specific chip or MCP of the detector) for which the ARF is to be computed. For Chandra, it must specify one of the following detector subsystems:


For these detector subsystems, the following qualifiers or options are supported:

UNIFORM (forces QE to be uniform)
IDEAL (equivalent to "QE=1;UNIFORM;CONTAM=NO")
CHIP=value (CHIP=4 ==> ACIS-4 (ACIS-S0))
TIME=value (in seconds since MJDREF)

Note that only simple rectangular regions are supported.

For ACIS, the BPMASK qualifier allows one to include bad pixels selected according to the status column in the bad pixel file:

BPMASK=hex value (Specified as, e.g., 0x39ff)
BPMASK=dec value (Specified as, e.g., 14847)
BPMASK=FAINT (=0x39ff, 14847)
BPMASK=VFAINT (=0x3fff, 16383)

If this option is not present, the default is FAINT.

Parameter=grating (string required filetype=input default=NONE)

This parameter controls whether or not to compute a zeroth order grating ARF. For grating observations, the value is either HETG or LETG. For imaging observations, the value of this parameter is NONE.

If the "grating" parameter is not set to NONE, mkarf writes the TG_M header keyword with a value of "0", so that it is explicitly recorded that this is a zero order ARF.

Note: For HETG, the PSF in zeroth order is believed to be identical to the imaging PSF. However, for LETG this is definitely not the case and it is unclear whether or not the PSF library will properly handle this case. For this reason, it is recommended that the region be selected to guarantee a PSF fraction of 1.0.

Parameter=maskfile (file required filetype=input default=NONE)

The mask file (msk1.fits) for the observation. The mask file is needed in particular when a window or subarray was used. A value of "NONE" indicates that no mask file will be applied.

Parameter=dafile (string filetype=input default=CALDB)

ACIS "dead area" coefficients file, which may have the values "NONE" (no dead area computation), CALDB (for automatic lookup), or an explicit file reference to an ACIS "dead area" coefficients FITS table.

The ACIS dead area refers to a slight decrease in detector efficiency due to the background cosmic ray flux which temporarily renders some pixels useless. The calibration product is a coefficient (per CCD) which gives the fractional area lost (or "deadened") per second. Since the area lost increases with time, the magnitude of the effect depends upon the ACIS clocking parameters (number of rows, window location, frame-time) which determine how long a pixel was exposed to the background cosmic ray flux during the primary exposure and during electronic readout from the frame-store area. For full-frame timed-exposure, the dead area is about 4% at maximum CHIPY and about 2% at the readout. It is smaller for subarrays.

The ACIS clocking parameters required to scale the coefficients in the dafile are contained in the observation-specific parameter block file, which can be set by the associated parameter of this tool, "pbkfile". If dafile=NONE, then pbkfile=NONE is assumed.

The dafile parameter is ignored for HRC data.

Parameter=mirror (string filetype=input default=HRMA)

For Chandra, the mirror parameter must be set to "HRMA". However, the following ARDLIB qualifiers are also supported:

SHELL=value (possible values: 1,3,4,6)

NOTE: the ardlib mirror qualifiers are not applied when computing a 0th order grating arf with mkarf.

To compute an instrument map for using shells 1 and 3, which corresponds to the bitmap "1100", use "HRMA;bitmap=1100" for the value of this parameter. To compute using a mirror area of 1, use "HRMA;AREA=1".

Parameter=ardlibparfile (file filetype=input default=ardlib.par)

The name of the parameter file to be used by ARDLIB.

The tool-specific parameter file contains no explicit CALDB parameters. Instead, the CALDB parameters are all contained in a separate parameter file selectable using the `ardlibparfile' parameter; "ardlib.par" is the default file name. Calibration files are specified implicitly via the `DetSubsys' and `Mirror' parameters described below.

Parameter=geompar (string filetype=input default=geom)

The name of the Pixlib Geometry parameter file.

Parameter=verbose (integer default=0)

The verbosity level for messages.

Parameter=clobber (boolean default=no)

If set to yes, existing output files will be overwritten.

Tool Version

The command "mkarf --version" prints the version of mkarf and the associated libraries. This is useful when reporting problems with the tool.


See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.

See Also

acis_bkgrnd_lookup, acis_fef_lookup, acis_set_ardlib, acisspec, add_grating_orders, add_grating_spectra, asphist, dither_region, dmarfadd, dmextract, eff2evt, fullgarf, hrc_bkgrnd_lookup, make_instmap_weights, merge_all, mkacisrmf, mkexpmap, mkgarf, mkgrmf, mkinstmap, mkpsf, mkpsfmap, mkrmf, mkwarf, psextract, psf_project_ray, rmfimg, specextract

Last modified: December 2009