Compute monochromatic for energy band given input spectrum and responses.
find_mono_energy arffile rmffile model paramvals band [metric] [energy] [verbose]
`find_mono_energy' can be used to compute a monochromatic energy appropriate for a specified energy band, spectral model, and instrument response. The script provides two options to compute the appropriate energy: either a spectrum weighted average value, or the energy where the spectrum is maximum.
unix% find_mono_energy acis.arf acis.rmf \ model="xsphabs.abs1*xspowerlaw.pwrlaw" \ paramvals="pwrlaw.PhoIndex=2.0;abs1.nH=0.1" \ band=2.0:10.0 metric=mean
In this example, we find the monochromatic energy for an energy band that goes from 2.0 to 10.0 keV, using an ACIS ARF and RMF as inputs. We use an absorbed powerlaw as the spectral model and the output energy is computed as the spectrum weighted mean energy.
unix% find_mono_energy acis.arf acis.rmf \ model="const1d.flat" paramvals= \ band=soft metric=max
In this example we use a flat/constant spectral model so the only weights are the effective area coming from ARF. We also use the CSC soft energy with energy limits going from 0.5 to 1.2 keV, and compute the monochromatic energy as the energy with the maximum spectrum, or in this case the maximum effective area in the band.
Not that in this case the result does not depend on the normalization of the model (flat.c0), so we use the default value by clearing out the paramvals parameter.
Detailed Parameter Descriptions
Parameter=arffile (file required)
Input ARF file
The input ARF file is used to setup the energy grid the spectral model is evaluated over. The spectrum is weighted by the effective area in the ARF.
Parameter=rmffile (file required)
Input RMF file
The response matrix contains the mapping from spectral energy to observed pulse height channel. The spectrum is convolved with the RMF. Typically the RMF will have a minimal effect on the spectral weights unless the energy band is very narrow.
Parameter=model (string required)
Sherpa model expression
The spectral model is used to compute the weights used to compute the monochromatic energy.
A constant model can be used to produce weights which only include the effective area from the ARF.
Parameter=paramvals (string required)
The parameter values for the spectral model.
This parameter contains the list of model parameter values, following the same scheme as modelflux, namely "id.parameter=value" settings separated by semi-colons. The id values are the names given in the model expression and ahelp on these names will list the available parameters.
Parameter=band (string required)
Desired energy band
The monochromatic energy is computed for a specific energy band.
Users can specify the band as a colon separate pair of values, eg
or can specify the band using the CSC nomenclature
|Band name||Minimum Energy||Maximum Energy|
Parameter=metric (string default=mean)
Metric used to compute the monochromatic energy
There are two options to compute the monochromatic energy
- metric=mean : The monochromatic energy is computed as the spectrum weighted mean energy.
- metric=max : The monochromatic energy is taken to be the energy where the spectrum is maximum.
The output monochromatic energy
The tool stores the value of the monochromatic energy in its own parameter file in the "energy" parameter. If there is a problem with the script, the energy parameter will be left blank.
The tool will also report the monochromatic energy to the terminal (if verbose>0).
Parameter=verbose (integer default=1 min=0 max=5)
Amount of tool chatter
Changes in the scripts 4.14.0 (December 2021) release
This script is new.
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 this page for installation instructions - such as how to ensure that the parameter file is available.
See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.
Refer to the CIAO bug pages for an up-to-date listing of known issues.
- asphist, dither_region
- acis_bkgrnd_lookup, hrc_bkgrnd_lookup, readout_bkg
- combine_grating_spectra, combine_spectra, specextract
- acis_fef_lookup, acis_set_ardlib, addresp, dmarfadd, eff2evt, fullgarf, make_instmap_weights, mean_energy_map, mkacisrmf, mkarf, mkexpmap, mkgarf, mkgrmf, mkinstmap, mkpsfmap, mkrmf, mkwarf, psf_project_ray, rmfimg