Chandra X-Ray Observatory
Skip to the navigation links
Last modified: June 2010

AHELP for CIAO 4.9


Context: tools


make_instmap_weights - produces a weighted spectrum file usable with mkinstmap in order to create a weighted exposure map.


make_instmap_weights  outfile model paramvals emin emax ewidth [abund]
[xsect] [verbose] [clobber]


This tool creates a two-column ASCII file; the first column specifies the energy in keV (E_i) and the second column specifies a spectral weighting (W_i); from any Sherpa model. The spectral weight column should sum to 1. The spectral file is then used to compute the weighted instrument map as a linear combination of monochromatic maps at energies E_i with weights W_i for several energy-weight pairs. To learn more about spectral weightings and their affect on instrument maps, look at the "Calculating Spectral Weights for mkinstmap" analysis thread.

Example 1

unix% make_instmap_weights weights.txt "xsphabs.abs1*powlaw1d.p1"
paramvals="abs1.nh=2.2;p1.gamma=1.6" emin=0.5 emax=10.0 ewidth=0.25

Create a spectral weights table, weights.txt, using an absorbed power-law with spectral index of 1.6 and neutral hydrogen column density of 2.2E+22 cm**-2 between 0.5-10.0 keV, with 0.25 keV energy bins. Note that parameter values must be separated by a semi-colon and that the paramvals name had to be given on the command line since its value containined the "=" character.

The output file (weights.txt) can be used as the value for the spectrumfile parameter of mkinstmap.

Example 2

unix% make_instmap_weights weights.txt "xszphabs.abs1*xsapec.apec1"
s1.redshift" xsect="vern" abund="wilm"

Create a spectral weights table using a XSpec redshifted, absorbed APEC plasma model. The redshift of the plasma model is linked to the photoelectric absorption redshift parameter and the plasma temperature is set to 6.4 keV. The XSpec solar abundance, used in plasma models, is set to Wilms, Allen & McCray (2000, ApJ 542, 914) and the photoelectric cross-section is set to Verner et al. (1996, ApJ 465, 487).


name type ftype def min max reqd
outfile file output       yes
model string         yes
paramvals string         yes
emin real   INDEF     yes
emax real   INDEF     yes
ewidth real   INDEF     yes
abund string   angr     no
xsect string   bcmc     no
verbose integer   3 0 5 no
clobber boolean   no     no

Detailed Parameter Descriptions

Parameter=outfile (file required filetype=output default=)

The name of the spectral weights file to create.

The weights file created listing the energy bin center in keV in the first column and normalized weighting in the second column.

Parameter=model (string required default=)

Sherpa model used to derive spectral weighting.

Any Sherpa model(s) may be used to determine a spectral weighting, as long as the model is entered as a string. For example: "xsphabs.abs1*powlaw1d.p1".

Parameter=paramvals (string required default=)

Sherpa model parameters used to derive spectral weighting.

Model parameters listed as a string, with each parameter seperated by a semi-colon. For example: "abs1.nh=1.3;p1.gamma=1.7".

Parameter=emin (real required default=INDEF)

Lower bound of model energy range in keV.

Parameter=emax (real required default=INDEF)

Upper bound of model energy range in keV.

Parameter=ewidth (real required default=INDEF)

Width of each energy bin in keV.

Parameter=abund (string not required default=angr)

Set XSpec solar abundance.

Sets the elemental abundance table used in XSpec plasma-code models.

Parameter=xsect (string not required default=bcmc)

Set XSpec photoelectric cross-section.

Set the photoelectric cross-section used in XSpec absorption models.

Parameter=verbose (integer not required default=3 min=0 max=5)

Verbose can be from 0 to 5, generating different amounts of output.

Parameter=clobber (boolean not required default=no)

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

About Contributed Software

This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see the installation instructions page for help on installing the package.


There are no known bugs for this tool.

See Also

acis_bkgrnd_lookup, acis_fef_lookup, acis_set_ardlib, addresp, aprates, asphist, combine_grating_spectra, combine_spectra, dither_region, dmarfadd, dmextract, eff2evt, fullgarf, hrc_bkgrnd_lookup, mean_energy_map, mkacisrmf, mkarf, mkexpmap, mkgarf, mkgrmf, mkinstmap, mkpsfmap, mkrmf, mkwarf, psextract, psf_project_ray, readout_bkg, rmfimg, sky2tdet, specextract

Last modified: June 2010
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.