About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/mkinstmap.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 mkinstmap Context: tools

Synopsis

Generate a Chandra instrument map (effective area vs. detector position)

Syntax

mkinstmap  outfile spectrumfile monoenergy pixelgrid obsfile detsubsys
grating maskfile [mirror] [pbkfile] [dafile] [ardlibparfile] [geompar]
[verbose] [clobber]

Description

'mkinstmap' generates an instrument map used in the analysis of imaging observations. An image in detector coordinates, the instrument map is essentially the product of the mirror effective area projected onto the detector surface with the detector quantum efficiency (QE); the units are those of effective area [cm**(2) counts/photon]. The instrument map also incorporates bad pixels and ACIS windows (if any) by setting the efficiency to zero at the appropriate locations on the detector. When computing a zeroth order grating instrument map, the 0th order grating efficiency is also included.

The input calibration data (QEs, effective areas, 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 `mkinstmap'. 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 quantum efficiency 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. If necessary, 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 the ACIS calibration web page

At present, the ARDLIB does not support the use of time-dependent bad-pixel files. This applies to the creation of instrument maps for merged observations, when the number and distribution of bad pixels changes between observations. Typically the changes in bad pixels are small enough that a single bad-pixel file may be used.

For a quantitative definition of the instrument map, see Davis (2001) [ApJ 548, 1010].

Example 1

mkinstmap outfile="acis_i3_instmap.fits" \
monoenergy=1.5 \
pixelgrid="1:1024:#1024,1:1024:#1024" \
obsfile="asphist_i3.fits[asphist]" \
detsubsys="ACIS-I3"

Computes a 1024x1024 instrument map for 1.5 keV photons incident on ACIS-I3 and writes it to acis_i3_instmap.fits. By default, this instrument map includes a position-dependent QE correction for optical blocking filter contamination appropriate for the observation start date (TSTART) obtained from the header of the obsfile.

Example 2

mkinstmap outfile=instmap_1.7kev_7.fits \
monoenergy=1.7 detsubsys=ACIS-7 \
pixelgrid="1:1024:#1024,1:1024:#1024" \
obsfile="asphist_7.fits[asphist]" maskfile=acisf01838_000N001_msk1.fits\
pbkfile=acisf084245776N001_pbk0.fits dafile=CALDB

Computes a 1024x1024 instrument map for 1.7 keV photons incident on ACIS-7. The pbkfile and dafile parameters are set to apply the dead area correction.

Example 3

mkinstmap outfile="acis_s3_nc.fits" \
spectrumfile=spec.dat \
pixelgrid="1:1024:#128,1:1024:#128" \
obsfile="asphist_s3.fits[asphist]" \
detsubsys="ACIS-S3;CONTAM=NO"

Computes a 128x128 weighted instrument map for ACIS-S3 which excludes the QE correction due to the buildup of contamination on the ACIS optical blocking filter. The result is a weighted sum of monochromatic instrument maps computed using photon energies and map weights given in the file spec.dat.

Example 4

mkinstmap outfile="acis_s3_shell1.fits" \
pixelgrid="1:1024:#128,1:1024:#128" \
obsfile="asphist_s3.fits[asphist]" \
mirror="HRMA;AREA=1" \
detsubsys="ACIS-S3"

Computes a 128x128 instrument map for ACIS-S3 which includes only the effects of the detector QE. This is useful way to obtain an image of the QE uniformity of a particular device.

Example 5

mkinstmap outfile="hrc_i_ideal_instmap.fits" \
pixelgrid="1:16384:#128,1:16384:#128" \
obsfile="asphist.fits[asphist]" \
detsubsys="HRC-I;IDEAL"

Computes a 128x128 instrument map for the full HRC-I that does not include the effects of the detector quantum efficiency (QE), and writes it to hrc_i_ideal_instmap.fits

In this case, the output instrument map is an image of the mirror effective area. This example illustrates the flexibility provided through the use of ARDLIB qualifiers and options.

Parameters

name type ftype def reqd
outfile file input   yes
spectrumfile file input NONE yes
monoenergy real input 1.0 yes
pixelgrid string input   yes
obsfile file input   yes
detsubsys string input   yes
grating string input NONE yes
maskfile file input NONE yes
mirror string input HRMA  
pbkfile string input    
dafile string input    
ardlibparfile string input ardlib.par  
geompar string   geom  
verbose integer   0  
clobber boolean   no  

Detailed Parameter Descriptions

Parameter=outfile (file required filetype=input)

The name of the output instrument map file.

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

The name of the input file containing spectral weights (if any). If the value of this parameter is "NONE", then a monochromatic instrument map will be computed. Otherwise, a weighted instrument map will be computed using the user-provided spectral weights.

Currently, this file must be a simple ASCII file that consists of 2 columns: The first column specifies the energy in keV (E_i) and the second column specifies a spectral weighting (W_i). The weighted instrument map is then computed via:

weightedinstmap = SUM(over i) W_i * QE(E_i) * Area (E_i)

In other words, a weighted instrument map is a linear combination of monochromatic maps at energies E_i with weights W_i. The spectral weights (W_i) are usually defined such that they sum to one.

Before using this option, make sure that you fully understand how the resulting instrument map, and consequently the exposure map relates to your source. Otherwise, the result may not be what you want. Further information is available in the "Introduction to Exposure Maps" document.

Parameter=monoenergy (real required filetype=input default=1.0)

The energy, in keV, for which the instrument map will be computed. This parameter is used only if the value of `SpectrumFile' is "NONE".

Parameter=pixelgrid (string required filetype=input)

This string specifies the detector region and the resolution of the output instrument map image. The recommended format is "x0:x1:#nx,y0:y1:#n2", where x0, x1, y0, y1, nx, and ny are positive integers. This specifies the region on the detector with pixel coordinates (X,Y) satisfying the conditions x0<=X<=x1 and y0<=Y<=y1, and indicates that the region is to be regridded to nx by ny pixels in the output image.

For example, to compute a 1024x1024 instrument map for an ACIS chip, use "1:1024:#1024,1:1024:#1024". To compute a 128x128 instrument map for the HRC-I, use "1:16384:#128,1:16384:#128". The latter will produce an instrument map with a LINEAR WCS to map the 128x128 pixels in the instrument map to the the 16384x16384 detector pixel plane. Since the instmap contains WCS, it is not necessary that the pixel grid should match the eventual output of mkexpmap.

It is useful to remember that each ACIS chip consists of 1024x1024 pixels. The HRC-I pixel plane consists of 16384x16384 pixels, and each HRC-S MCP is mapped to a 4096x16456 pixel plane.

Parameter=obsfile (file required filetype=input)

The name of a FITS file containing keywords which specify the mission, detector, SIM offsets, observation date, etc. An aspect histogram file is recommended, but a level 1 event file would suffice.

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 exposure map is to be computed. For Chandra, it must specify one of the following detector subsystems:

HRC-I
HRC-S1, HRC-S2, HRC-S3
ACIS-I0, ACIS-I1, ACIS-I2, ACIS-I3
ACIS-S0, ACIS-S1, ACIS-S2, ACIS-S3, ACIS-S4, ACIS-S5
ACIS-0, ACIS-1, ACIS-2, ACIS-3,
ACIS-4, ACIS-5, ACIS-6, ACIS-7, ACIS-8, ACIS-9

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

QE=value
UNIFORM (forces QE to be uniform)
CONTAM=yes|no
IDEAL (equivalent to "QE=1;UNIFORM;CONTAM=NO")
TIME=value (in seconds since MJDREF)
CHIP=value (CHIP=4 ==> ACIS-4 (ACIS-S0))
WINDOW=xmin,ymin,xmax,ymax
REGION=BOX(xcenter,ycenter,xsize,ysize)
REGION=RECTANGLE(xmin,xmax,ymin,ymax)

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 instrument map. If the value of this parameter is NONE, then a standard imaging instrument map will be computed. Otherwise, the value must be either HETG or LETG causing the corresponding zeroth order to be computed.

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=mirror (string filetype=input default=HRMA)

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

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

For example, 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=pbkfile (string 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.

Since the pbkfile contents are observation-dependent, there is no default other than "NONE". In this case, no dead area correction is applied, and dafile is assumed to have the value "NONE". If pbkfile is set to a valid file, then the dafile parameter must also refer to a calibration file.

The pbkfile parameter is ignored for HRC data.

Parameter=dafile (string filetype=input)

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 took, "pbkfile". If dafile=NONE, then pbkfile=NONE is assumed.

The dafile parameter is ignored for HRC data.

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

The name of the parameter file to be used by ARDLIB. Typically, "ardlib.par" will be used.

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 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.

CHANGES IN CIAO 3.4

Parameter Changes

Two new hidden parameters have been added to mkinstmap to allow the ACIS dead area correction to be taken into account: "pbkfile" and "dafile". By default, the correction is "off", i.e. both parameters are set to "NONE". See the individual parameter descriptions for more information.

Notes

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

Bugs

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

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



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-2004. All rights reserved.