Last modified: December 2013

URL: http://cxc.harvard.edu/sherpa/ahelp/list_model_components.html
Jump to: Description · Example · Bugs · See Also


AHELP for CIAO 4.11 Sherpa v1

list_model_components

Context: models

Synopsis

List all models established in a Sherpa session.

Syntax

list_model_components()

Description

Sherpa allows users to construct arbitrarily complex models from model components (e.g., Gaussians, Lorentzians, XSPEC models, etc.). This function returns a list of the user-defined names of all model components that have been established in a Sherpa session (including model components that have been established but not yet assigned to a model expression to be fit to a data set). The list_model_components() function accepts no arguments.


Example

sherpa> set_source(2, xswabs.abs1 * powerlaw1d.p1)
sherpa> set_source(4, bbody.b1 + p1)
sherpa> set_source("model3", gauss1d.g1)
sherpa> list_model_components()
['p1', 'abs1', 'g1', 'b1']

In this example, set_source() is used to assign model expressions to data sets 2 and 4, as well as to set "model3" to the gauss1d model (to be fit to data set 3 at a later time).


Bugs

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

See Also

info
list_functions, list_response_ids
methods
list_iter_methods, list_methods
models
list_models, load_xscflux, load_xsclumin, load_xscpflux, load_xsgsmooth, load_xsireflect, load_xskdblur, load_xskdblur2, load_xskerrconv, load_xslsmooth, load_xspartcov, load_xsrdblur, load_xsreflect, load_xsrfxconv, load_xsrgsxsrc, load_xssimpl, load_xsvashift, load_xsvmshift, load_xsxilconv, load_xszashift, load_xszmshift, models, tablemodel, xs, xsconvolve
statistics
list_priors, list_samplers