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 2008

URL: http://cxc.harvard.edu/sherpa4.1/eqwidth.py.html
AHELP for Sherpa 4.1

eqwidth

Context: py.sherpa

Synopsis

Calculate the equivalent width of an emission or absorption line.

Syntax

eqwidth( src, combo, [id], [bkg_id] )

Description

The eqwidth command calculates the equivalent width of an emission or absorption line in the source or background data. The equivalent width is reported in the units of the analysis, either energy or wavelength.

An integral over the energy or wavelength range of the dataset is performed to evaluate the continuum model (src) and the continuum-plus-line model (combo) at each point. The integrand is then (combo-src)/src.

  • src - model expression that describes the continuum
  • combo - model expression that describes the continuum plus the line
  • id - the id of the dataset to use; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
  • bkg_id - the id of the background to use; default is the first background dataset

The src and combo model expression components must be established, e.g. with set_source or set_model(), before they can be used by eqwidth.

Example 1

sherpa> set_model("powlaw1d.cont")
sherpa> set_model("gauss1d.eline")
sherpa> eqwidth(cont, cont+eline)
0.535073

Define 1D gaussian and powerlaw models, then use them to find the equivalent width of the line.

Example 2

sherpa>
set_source("src","bbody.bb+powlaw1d.pl+gauss1d.line1+gauss1d.line2")
sherpa> eqwidth(bb+pl, bb+pl+line1, "src")
0.454946

Model components from the source model are used to calculate the equivalent width of a line in dataset "src".

Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

Last modified: December 2008



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.