Calculate the equivalent width of an emission or absorption line.
eqwidth( src, combo, [id], [bkg_id] )
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.
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.
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".
- py.sherpa
-
add_user_pars,
calc_chisqr,
calc_energy_flux,
calc_model_sum,
calc_photon_flux,
calc_source_sum,
calc_stat,
clean,
contour_model,
contour_ratio,
contour_resid,
create_model_component,
delete_bkg_model,
delete_model,
delete_model_component,
delete_psf,
get_bkg_plot,
get_model,
get_model_autoassign_func,
get_model_plot,
get_num_par,
get_order_plot,
get_par,
get_pileup_model,
get_ratio,
get_resid,
get_source,
image_model,
image_source,
integrate,
link,
list_model_ids,
load_table_model,
load_user_model,
plot_model,
plot_source,
reset,
set_bkg_model,
set_model,
set_model_autoassign_func,
set_pileup_model,
set_source
|