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/eqwidth.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 eqwidth Context: sherpa

Synopsis

Computes the equivalent width of an emission or absorption line in source or background data.

Syntax

sherpa> [B]EQWIDTH [# [ID]] (<continuum_stack>,
<continuum_plus_line_stack>)

EQWIDTH is used for computing equivalent widths in source datasets,
while BEQWIDTH is used for computing equivalent widths in background
datasets.

# specifies the dataset over which the source model is evaluated. The
ID modifier is used only for computing background dataset equivalent
widths, and then if and only if the Sherpa state object variable
multiback is set to 1, i.e., if more than one background dataset is to
be associated with a single source dataset. The ID modifier may be any
unreserved string (e.g., A, foo, etc.), i.e., a string that is not a
parsable command.

<continuum_stack> represents one or more models (or user-defined model
stacks) that describe the continuum, while <continuum_plus_line_stack>
represents two or more models (or user-defined model stacks) that
describe the continuum plus line.

Description

To compute the equivalent width, an integral over the energy/wavelength range of the dataset is performed. At each point, the <continuum_stack> (C) and <continuum_plus_line_stack> ([C+L]) are evaluated; the integrand is then ([C+L] - C) / C.

The models are specified on-the-fly in the same manner that SOURCE or BACKGROUND model stacks are defined, as algebraic combinations of previously defined model components. The examples below illustrate this point. The user must specify the models in this manner, because (a) Sherpa cannot identify whether a particular model component should be associated with the continuum or with the line, and (b) multiple line components may be specified in the SOURCE model stack, so that it cannot be used in place of <continuum_plus_line_stack> to compute equivalent widths.

Equivalent widths may also be computed using the Sherpa/S-Lang module functions get_eqwidth and get_beqwidth.

Example 1

Model a continuum and emission line complex using a power-law and normalized Gaussian, then compute the equivalent width:

sherpa> SOURCE = POW[cont]+NGAUSS[eline] 
...
sherpa> FIT
...
sherpa> EQWIDTH 1 (cont,cont+eline)
EW = 0.535073 keV

Example 2

Define continuum and line model stacks; use these in the equivalent width calculation:

sherpa> BBODY[modela]
sherpa> POWLAW1D[modelb]
sherpa> NGAUSS[line1]
sherpa> NGAUSS[line2]
sherpa> NGAUSS[line3]
...
sherpa> CONT = modela+modelb
sherpa> ELINE = line1
sherpa> SOURCE = CONT + ELINE + line2 + ...
sherpa> FIT
...
sherpa> EQWIDTH 1 (CONT,CONT+ELINE)
EW = 0.454946 keV

Bugs

See the Sherpa bug pages online 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.