Creating ACIS RMFs with mkacisrmf
About mkacisrmf
The tool mkacisrmf creates an RMF for an ACIS imaging - or zeroth-order grating - observation with the newest calibration available. It replaces - for most cases - the mkrmf tool. We describe below when mkacisrmf should be used, and further instructions on how to run this tool are given in the mkacisrmf help file.
Analysing Data
The tool mkacisrmf is used to create RMFs for:
- -120 °C ACIS data taken in (V)FAINT or GRADED mode that has the time-dependent gain adjustment and CTI correction applied ;
- -110 °C ACIS data taken on the back-illuminated chips (ACIS-S1 and S3) only that has the time-dependent gain adjustment applied (there is no CTI correction available at this focal-plane temperature).
All new analyses with these types of data should be done with mkacisrmf instead of mkrmf. The results from mkacisrmf and mkrmf are very similar, except for the following cases:
-
The new RMFs are 10-15% more accurate at energies lower than 1 keV.
-
Calibration for the ACIS-S1 (ccd_id=5) back-illuminated chip has been greatly improved.
Input data requirements
In order to use mkacisrmf, the observation must:
-
be taken at a supported focal-plane temperature (any chip at -120 °C, BI chips at -110 °C)
-
have a CTI_APP header keyword.
If CTI_APP is not found, follow the instructions in the ACIS CTI_APP Keyword Required section of the ACIS CTI Correction why topic to add the keyword. The tool may produce incorrect results without issuing an error if the keyword is missing.
-
have been processed with an acceptable version of the gain file. Any CTI-corrected gain file since version 4 is good enough for use with the tool.
-
be taken in the right data mode.
mkacisrmf can be used on any observation taken in (V)FAINT mode, including continuous-clocking CC(33)_FAINT mode. The tool can also be used on any GRADED mode data.
The keyword values in the sample data file evt2.fits show that it can be used with mkacisrmf:
unix% dmkeypar evt2.fits fp_temp echo+ 153.60722351 unix% dmkeypar evt2.fits CTI_APP echo+ PPPPPBPBPP unix% dmkeypar evt2.fits gainfile echo+ /soft/ciao/CALDB/data/chandra/acis/bcf/gain/acisD2000-01-29gain_ctiN0006.fits unix% dmkeypar evt2.fits DATAMODE echo+ FAINT
Using Consistent Calibration
The calibration applied to the event file must be consistent with the RMF tool chosen or a systematic energy shift will occur.
The mkacisrmf calibration files (called a "P2_RESP" file) and the gain files are released in pairs of matching versions, so simply choose the file which has the same "N000x" version as the gain:
unix% ls -1 $CALDB/data/chandra/acis/p2_resp/ acisD1999-09-16p2_respN0005.fits acisD2000-01-29p2_respN0005.fits acisD2000-01-29p2_respN0006.fits
- -120 °C Data: mkacisrmf
-
For data taken at the -120 °C focal plane temperature, the newest gain file is automatically selected when acis_process_events is run. The CTI and TGAIN corrections must also be applied when reprocessing the data.
There is TGAIN calibration for all GRADED mode data, but CTI correction for the front-illuminated chips only.
acisD2000-01-29gain_ctiN0006.fits
Note that any file since version 4 is "good enough" for use with mkacisrmf.
- -110 °C Data
-
For data taken at the -110 °C focal plane temperature on the back-illuminated chips (ACIS-S1 and S3), the appropriate gain file is automatically selected when acis_process_events is run. The TGAIN correction must also be applied when reprocessing the data; there is no CTI available for -110 °C.
acisD1999-09-16gainN0006.fits
Analysis for the -110 °C front-illuminated chips must still be done with mkrmf.
If the input file contains -110 °C data and has the CTI-correction applied but the source is actually on a front-illuminated chip, mkacisrmf fails with an error:
# mkacisrmf (CIAO 4.4): ERROR: No non-zero pixels map to valid chip coordinates in the supplied wmap='src.pi[WMAP]' file mkacisrmf infile=CALDB outfile=src.wrmf energy="0.3:11.0:0.01" channel="1:1024:1" chantype=PI wmap=src.pi"[WMAP]" gain=CALDB clobber=yes verbose=2 mode=h failed. Error: Failed to create RMF for evt2.fits[sky=region(src.reg)]
Matching the Grids
Sherpa allows you to use different energy grids for your ARF and RMF files, but XSpec does not. XSpec will still run if the grids do not match, but it issues a warning and sets all values in the ARF to unity (1).
There are two approaches to creating an ARF-RMF pair with the same gridding: Match an existing ARF or Create the RMF first.
- Match an existing ARF
-
If the specextract script was used, you already have an ARF file for the data. Rather than remake both the RMF and ARF, get the grid information from the history in the ARF file. The value of the parameter can be read from the screen or extracted using the action=pset parameter, as shown below:
ARF created by mkarf
The parameter of interest is engrid:
unix% dmhistory ptsrc.arf mkarf mkarf asphistfile="/tmp/tmpw2KMX4_asphist2" outfile="spec/ptsrc.arf" sourcepixelx="3125.81758" sourcepixely="4399.81758" engrid="0.3:11.0:0.01" obsfile="repro/acisf07017_repro_evt2.fits" pbkfile="" dafile="CALDB" mirror="HRMA" detsubsys="ACIS-I2" grating="NONE" maskfile="repro/acisf07017_000N002_msk1.fits" ardlibparfile="ardlib.par" geompar="geom" verbose="1" clobber="no" unix% dmhistory ptsrc.arf mkarf action=pset unix% set egrid = `pget mkarf engrid` unix% echo $egrid 0.3:11.0:0.01
ARF created by mkwarf
The parameter of interest is egridspec:
unix% dmhistory src.arf mkwarf # dmhistory (CIAO): WARNING: Found "pixlib" library parameters # dmhistory (CIAO): WARNING: Found "ardlib" library parameters mkwarf infile="/tmp/tmpXkMzb__tdet[wmap]" outfile="spec/src.arf" weightfile="/tmp/tmp9OIw3p.wfef" spectrumfile="" egridspec="0.3:11.0:0.01" pbkfile="" threshold="0" feffile="CALDB" mskfile="repro/acisf07017_000N002_msk1.fits" asolfile="" mirror="HRMA" detsubsysmod="" dafile="CALDB" ardlibpar="ardlib" geompar="geom" clobber="yes" verbose="1" unix% dmhistory src.arf mkwarf action=pset # dmhistory (CIAO): WARNING: Found "pixlib" library parameters # dmhistory (CIAO): WARNING: Found "ardlib" library parameters unix% set egrid = `pget mkwarf egridspec` unix% echo $egrid 0.3:11.0:0.01
This value - whether manually extracted or retrieved via pget - should be used as the value for the energy parameter in mkacisrmf:
unix% pset mkacisrmf energy="0.3:11:0.01" or unix% pset mkacisrmf energy="$egrid"
- Create the RMF first
-
Since mkacisrmf can change the requested grid to match the calibration data, create the RMF first and then use it to define the energy grid when creating the ARF. This will work for both mkarf and mkwarf:
Technical Details
The mkacisrmf tool contains all the functionality of the previous tool mkrmf. Unlike its predecessor, however, mkacisrmf separates the RMF calculation process into two components: an "ideal" component which describes the CCD spectral response prior to the effects of Charge Transfer Inefficiency (CTI), and a spatially varying component which incorporates the changes in the response produced by CTI.
This new method was motivated primarily by a desire to provide a more rapid means of developing ACIS response calibration products. Accompanying the new tool is a new CCD analysis reference data (ARD) file which describes both the ideal response and the spatial variation produced by CTI. In contrast to traditional CCD FEFs, the CTI-induced spatial variations can be generated directly from numerical simulations of the CCD response obviating the need for laborious fitting at each position on the CCD. This human-intensive fitting was the primary bottleneck in generating ACIS FEFs. Once the "scatter matrix", describing the spatial variations, has been generated automatically, small scale adjustments are included to account for differences between the simulated response and the actual CCD response as measured using data from the onboard calibration source.
The algorithm contained in mkacisrmf is based upon the the algorithm in the calcrmf2 by Alexey Vikhlinin, which is described in the memo "Updates to the RMF model in the ACIS FI CCDs" (PDF). The CIAO tool is essentially a direct translation of this prototype code and includes a number of enhancements including an improved interpolation scheme to calculate the response at intermediate energies between the available calibration points. All functionality of the previous tool mkrmf is available including the ability to produce weighted response matrices for arbitrary spatial regions.