Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2016

URL: http://cxc.harvard.edu/sherpa/ahelp/xs.html
AHELP for CIAO 4.9 Sherpa v1

xs

Context: models

Synopsis

XSPEC model functions.

Description

Sherpa includes the "additive" and "multiplicative" models of XSPEC version 12.9.0o, and are available by adding the prefix "xs" before the XSPEC model name (in lower case). As examples: in Sherpa, the XSPEC phabs model is called "xsphabs" and the vapec model is "xsvapec".

The additive (atable) and multiplicative (mtable) XSPEC-style table models are supported by the load_table_model command.

Important Note:

XSPEC models based on physical processes (e.g. line models such as raymond or absorption models such as wabs) assume that the dataspace is defined in keV. On the other hand, Sherpa models are always calculated based on the input data scale. Thus when XSPEC models are combined with Sherpa models, the user should be careful to ensure that both components have the same dataspace units; otherwise, calculated model amplitudes may be incorrect.

These models also expect that the x-values will always be energy bins. When the analysis setting is using non-energy bins and an XSPEC model is defined, Sherpa converts the bins to energy before sending them to the XSPEC model. After the XSPEC model finishes, Sherpa converts back to the original units. Sherpa also scales the model values appropriately (e.g., if counts/keV came out of the XSPEC model and Sherpa is working with wavelength, then Sherpa scales the output of the XSPEC model to counts/Angstrom).

Unavailable XSPEC Models

The "etable" XSPEC components, the convolution components, and the mixing-model components are NOT included in CIAO.

The nlapec model

The nlapec model - added in XSPEC 12.9.0 - is not available in CIAO 4.9. It can be simulated by using the "xsapec" model and the APECNOLINES xset option; for example

sherpa> set_source(xsphabs.gal * xsapec.src)
sherpa> set_xsxset('APECNOLINES', 'on')

Available XSPEC Models

The available XSPEC models are listed below. Refer to the ahelp page for each model (e.g. "ahelp xsabsori") or the XSPEC User's Guide for more information. Note that the ahelp files describe the version of the XSPEC model included in CIAO, while the XSPEC User's Guide may reference a newer version with different options.

<xspecname> Description
absori Ionized absorber
acisabs Decay in the ACIS quantum efficiency
agauss Gaussian line profile in wavelength-space
apec APEC thermal plasma model
bapec APEC thermal plasma model with velocity broadening
bbody Blackbody spectrum
bbodyrad Blackbody spectrum with norm proportional to surface area
bexrav E-folded broken power law reflected from neutral matter
bexriv E-folded broken power law reflected from ionized matter
bkn2pow Broken power law, two break energies
bknpower Broken power law
bmc Comptonization by relativistically moving matter
bremss Thermal bremsstrahlung
bvapec APEC thermal plasma model with variable abundances and velocity broadening as a free parameter
bvvapec APEC thermal plasma model with variable abundances and velocity broadening as a free parameter (contains more abundance parameters than bvapec)
c6mekl 6th-order Chebyshev polynomial DEM using mekal
c6pmekl Exponential of 6th-order Chebyshev polynomial DEM using mekal
c6pvmkl Variable abundance version of c6pmekl
c6vmekl Variable abundance version of c6mekl
cabs Compton scattering (non-relativistic)
cemekl Multi-temperature mekal
cevmkl Multi-temperature vmeka
cflow Cooling flow model
compbb Comptonized blackbody spectrum after Nishimura et al. (1986)
compls Comptonization spectrum after Lamb and Sanford (1979)
compmag Thermal and bulk Comptonization for cylindrical accretion onto the polar cap of a magnetized neutron star
compps Comptonization spectrum after Poutanen and Svenson
compst Comptonization spectrum after Sunyaev and Titarchuk (1980)
comptb Thermal and bulk Comptonization of a seed blackbody-like spectrum
compth Component of Paolo Coppi's thermal/non-thermal hot plasma emission model
comptt Comptonization spectrum after Titarchuk (1994)
constant Energy-independent multiplicative factor
cplinear Non-physical piecewise-linear model for low count background spectra
cutoffpl Power law with high energy exponential cutoff
cyclabs Cyclotron absorption line
disk Disk model
diskbb Multiple blackbody disk model
diskir Irradiated inner and outer disk
diskline Line emission from relativistic accretion disk
diskm Disk model with gas pressure viscosity
disko Modified blackbody disk model
diskpbb Accretion disk, power law dependence for T(r)
diskpn Accretion disk around a black hole
dust Dust scattering out of the beam
edge Absorption edge
eplogpar Log-parabolic blazar model with nFn normalization
eqpair Component of Paolo Coppi's thermal/non-thermal hot plasma emission model
eqtherm Component of Paolo Coppi's thermal/non-thermal hot plasma emission model
equil Equilibrium ionization collisional plasma model from Borkowski
expabs Low-energy exponential cutoff
expdec Exponential decay
expfac Exponential factor
ezdiskbb Multiple blackbody disk model with zero-torque inner boundary
gabs Multiplicative gaussian absorption line
gadem Plasma emission, multi-temperature with gaussian distribution of emission measure
gaussian Simple gaussian line profile
gnei Generalized single ionization NEI plasma model
grad GR accretion disk around a black hole
grbm Gamma-ray burst model
heilin Voigt absorption profiles for He I series
highecut High energy cutoff
hrefl Simple reflection model good up to 15 keV
kerrbb Multi-temp blackbody for thin accretion disk around a Kerr black hole
kerrd Optically thick accretion disk around a Kerr black hole
kerrdisk Accretion disk line emission with BH spin as free parameter
laor Line from accretion disk around a black hole
laor2 Accretion disk with broken-power law emissivity, black hole emission line
logpar Log-parabolic blazar model
lorentz Lorentzian line profile
lyman Voigt absorption profiles for H I or He II Lyman series
meka Mewe-Gronenschild-Kaastra thermal plasma (1992)
mekal Mewe-Kaastra-Liedahl thermal plasma (1995)
mkcflow Cooling flow model based on mekal
nei Simple nonequilibrium ionization plasma model
notch Notch line absorption
npshock Plane-parallel shock with ion and electron temperatures
nsa Spectra in the X-ray range (0.05-10 keV) emitted from a hydrogen atmosphere of a neutron star
nsagrav Neutron star hydrogen atmosphere model for different g
nsatmos Neutron star hydrogen atmosphere model with electron conduction and self-irradiation
nsmax Neutron star magnetic atmosphere
nsmaxg Neutron star with a magnetic atmosphere
nsx Neutron star with a non-magnetic atmosphere
nteea Pair plasma model
nthcomp Thermally comptonized continuum
optxagn Colour temperature corrected disc and energetically coupled Comptonisation model for AGN
optxagnf Colour temperature corrected disc and energetically coupled Comptonisation model for AGN
pcfabs Partial covering fraction absorption
pegpwrlw Power law with pegged normalization
pexmon Neutral Compton reflection with self-consistent Fe and Ni lines
pexrav Exponentially cutoff power law reflected from neutral matter
pexriv Exponentially cutoff power law reflected from ionized matter
phabs Photo-electric absorption
plabs Absorption model with power law dependence on energy
plcabs Cutoff power law observed through dense, cold matter
posm Positronium continuum
powerlaw Simple photon power law
pshock Constant temperature, plane-parallel shock plasma model
pwab Extension of partial covering fraction absorption into a power-law distribution of covering fraction
raymond Raymond-Smith thermal plasma
redden IR/optical/UV extinction from Cardelli et al. (1989)
redge Recombination edge
refsch E-folded power law reflected from an ionized relativistic disk
rnei Non-equilibrium recombining collisional plasma model
sedov Sedov model with electron and ion temperatures
sirf Self-irradiated funnel
smedge Smoothed absorption edge
spexpcut Super-exponential cutoff absorption
spline Spline multiplicative factor
srcut Synchrotron radiation from cutoff electron distribution
sresc Synchrotron radiation from escape-limited electron distribution
sss_ice Einstein Observatory SSS ice absorption
step Step function convolved with gaussian
swind1 Absorption by partially ionized material with large velocity shear
tbabs Calculates the absorption of X-rays by the ISM
tbgrain Calculates the absorption of X-rays by the ISM with variable hydrogen to H2 ratio and grain parameters
tbvarabs Calculates the absorption of X-rays by the ISM, allowing user to vary all abundances, depletion factors, and grain properties
uvred UV reddening
vapec APEC thermal plasma model with variable abundances
varabs Photoelectric absorption with variable abundances
vbremss Thermal bremsstrahlung spectrum with variable H/He
vequil Ionization equilibrium collisional plasma model with variable abundances
vgadem Plasma emission, multi-temperature with gaussian distribution of emission measure
vgnei Non-equilibrium ionization collisional plasma model with variable abundances
vmcflow Cooling flow model based on vmekal
vmeka M-G-K thermal plasma with variable abundances
vmekal M-K-L thermal plasma with variable abundances
vnei Non-equilibrium ionization collisional plasma model with variable abundances
vnpshock Plane-parallel shock plasma model with separate ion and electron temperatures and variable abundances
vphabs Photoelectric absorption with variable abundances
vpshock Constant temperature, plane-parallel shock plasma model with variable abundances
vraymond Raymond-Smith thermal plasma with variable abundances
vsedov Sedov model with separate ion and electron temperatures and variable abundances
vvapec APEC thermal plasma model with variable abundances (more abundance parameters than vapec)
vrnei Non-equilibrium recombining collisional plasma model with variable abundances
vvgnei Non-equilibrium ionization collisional plasma model with variable abundances for all elements with Z <= 30
vvnei Non-equlibrium ionization collisional plasma model with variable abundances for all elements with Z <= 30
vvnpshock Plane-parallel shock plasma model with separate ion and electron temperatures and variable abundances for all elements with Z <= 30
vvpshock Constant temperature, plane-parallel shock plasma model
vvrnei Non-equilibrium recombining collisional plasma model with variable abundances for all elements with Z <= 30
vvsedov Sedov model with separate ion and electron temperatures and variable abundances for all elements with Z <= 30
wabs Photoelectric absorption (Morrison and McCammon)
wndabs Photoelectric absorption with low energy window
xion Reflected spectra of a photo-ionized accretion disk or ring
zagauss Redshifted Gaussian line profile in wavelength-space
zbabs EUV ISM attenuation model
zbbody Redshifted blackbody
zbremss Redshifted thermal bremsstrahlung
zdust Extinction by dust grains
zedge Redshifted absorption edge
zgauss Redshifted gaussian
zhighect Redshifted high energy cutoff
zigm UV/Optical attenuation by the intergalactic medium
zpcfabs Redshifted partial covering absorption
zphabs Redshifted photoelectric absorption
zpowerlw Redshifted power law
zredden Redshifted version of redden
zsmdust Extinction by dust grains in starburst galaxies
ztbabs Calculates the absorption of X-rays by the ISM for modeling redshifted absorption. Does not include a dust component.
zvarabs Redshifted photoelectric absorption with variable abundances
zvfeabs Redshifted absorption with variable iron abundance
zvphabs Redshifted photoelectric absorption with variable abundances
zwabs Redshifted "Wisconsin absorption"
zwndabs Redshifted photoelectric absorption with low energy window
zxipcf Partial covering absorption by partially ionized material

Parameter names

Sherpa uses names, rather than numbers, to access parameter values (e.g. to set them, change whether a parameter is frozen, adjust the limits, or access the latest value). Prior to XSPEC version 12.9.0, the parameter names for the XSPEC models were not guaranteed to be valid Python symbols, and so Sherpa has converted the problematic names. The names used by Sherpa are given in the ahelp page for the model - e.g. ahelp xspowerlaw - and by printing the model component:

sherpa> set_source(xsphabs.gal * xspowerlaw.pl)
sherpa> print(gal)
xsphabs.gal
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   gal.nH       thawed            1            0       100000 10^22 atoms / cm^2
sherpa> print(pl)
xspowerlaw.pl
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   pl.PhoIndex  thawed            1           -2            9           
   pl.norm      thawed            1            0        1e+24           

Note that the parameter names have not been updated to match the changes made in XSPEC 12.9.0.

Changing the chatter level of XSPEC models

The default chatter level for XSPEC models - i.e. how much information they will print to the screen when evaluated - is set to 0, which is lower than the default value used by XSPEC itself (10). To check that the model is being evaluated correctly - e.g. in case of a probem - then the set_xschatter routine can be used to change the level. For example:

sherpa> set_xschatter(10)
sherpa> plot_fit()
sherpa> set_xschatter(0)

The current XSPEC chatter level is returned by the get_xschatter level.

The Python docstrings for these functions provide more information, and can be read with the help() function:

sherpa> help(set_xschatter)
sherpa> help(get_xschatter)

Checking the XSPEC module version

The X-Spec module contains the get_xsversion routine, which returns a string containing the XSPEC patch level used in Sherpa. As an example:

sherpa> import sherpa.astro.xspec as xspec
sherpa> print(xspec.get_xsversion())
12.9.0o

Bugs

For a list of known bugs and issues with the XSPEC models, please visit the XSPEC bugs page.

To check the X-Spec version used by Sherpa, use the get_xsversion routine from the xspec module:

sherpa> from sherpa.astro.xspec import get_xsversion
sherpa> get_xsversion()
'12.9.0o'

See Also

models
absorptionedge, absorptiongaussian, absorptionlorentz, absorptionvoigt, accretiondisk, atten, bbody, bbodyfreq, beta1d, beta2d, blackbody, box1d, box2d, bpl1d, bremsstrahlung, brokenpowerlaw, ccm, const1d, const2d, cos, delta1d, delta2d, dered, devaucouleurs2d, disk2d, edge, emissiongaussian, emissionlorentz, emissionvoigt, erf, erfc, exp, exp10, fm, gauss1d, gauss2d, hubblereynolds, jdpileup, linebroad, list_model_components, list_models, lmc, load_xscflux, load_xsgsmooth, load_xsireflect, load_xskdblur, load_xskdblur2, load_xskerrconv, load_xslsmooth, load_xspartcov, load_xsrdblur, load_xsreflect, load_xssimpl, load_xszashift, load_xszmshift, log, log10, logabsorption, logemission, logparabola, lorentz1d, lorentz2d, models, normbeta1d, normgauss1d, normgauss2d, opticalgaussian, poisson, polynom1d, polynom2d, polynomial, powerlaw, powlaw1d, recombination, scale1d, scale2d, schechter, seaton, sersic2d, shell2d, sigmagauss2d, sin, sm, smc, sqrt, stephi1d, steplo1d, tablemodel, tan, xgal, xsabsori, xsacisabs, xsagauss, xsapec, xsbapec, xsbbody, xsbbodyrad, xsbexrav, xsbexriv, xsbkn2pow, xsbknpower, xsbmc, xsbremss, xsbvapec, xsbvvapec, xsc6mekl, xsc6pmekl, xsc6pvmkl, xsc6vmekl, xscabs, xscemekl, xscevmkl, xscflow, xscompbb, xscompls, xscompmag, xscompps, xscompst, xscomptb, xscompth, xscomptt, xsconstant, xsconvolve, xscplinear, xscutoffpl, xscyclabs, xsdisk, xsdiskbb, xsdiskir, xsdiskline, xsdiskm, xsdisko, xsdiskpbb, xsdiskpn, xsdust, xsedge, xseplogpar, xseqpair, xseqtherm, xsequil, xsexpabs, xsexpdec, xsexpfac, xsezdiskbb, xsgabs, xsgadem, xsgaussian, xsgnei, xsgrad, xsgrbm, xsheilin, xshighecut, xshrefl, xskerrbb, xskerrd, xskerrdisk, xslaor, xslaor2, xslogpar, xslorentz, xslyman, xsmeka, xsmekal, xsmkcflow, xsnei, xsnotch, xsnpshock, xsnsa, xsnsagrav, xsnsatmos, xsnsmax, xsnsmaxg, xsnsx, xsnteea, xsnthcomp, xsoptxagn, xsoptxagnf, xspcfabs, xspegpwrlw, xspexmon, xspexrav, xspexriv, xsphabs, xsplabs, xsplcabs, xsposm, xspowerlaw, xspshock, xspwab, xsraymond, xsredden, xsredge, xsrefsch, xsrnei, xssedov, xssirf, xssmedge, xsspexpcut, xsspline, xssrcut, xssresc, xssss_ice, xsstep, xsswind1, xstbabs, xstbgrain, xstbvarabs, xsuvred, xsvapec, xsvarabs, xsvbremss, xsvequil, xsvgadem, xsvgnei, xsvmcflow, xsvmeka, xsvmekal, xsvnei, xsvnpshock, xsvphabs, xsvpshock, xsvraymond, xsvrnei, xsvsedov, xsvvapec, xsvvgnei, xsvvnei, xsvvnpshock, xsvvpshock, xsvvrnei, xsvvsedov, xswabs, xswndabs, xsxion, xszagauss, xszbabs, xszbbody, xszbremss, xszdust, xszedge, xszgauss, xszhighect, xszigm, xszpcfabs, xszphabs, xszpowerlw, xszredden, xszsmdust, xsztbabs, xszvarabs, xszvfeabs, xszvphabs, xszwabs, xszwndabs, xszxipcf

Last modified: December 2016
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:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.