Last modified: December 2023

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/list_model_components.html
AHELP for CIAO 4.16 Sherpa

list_model_components

Context: models

Synopsis

List the names of all the model components.

Syntax

list_model_components()

Description

Models are created either directly - by using the form mname.mid , where mname is the name of the model, such as gauss1d , and mid is the name of the component - or with the `create_model_component` function, which accepts mname and mid as separate arguments. This function returns all the mid values that have been created.


Examples

Example 1

The gal and pl model components are created - as versions of the xsphabs and powlaw1d model types - which means that the list of model components returned as mids will contain both strings.

>>> set_model(xsphabs.gal * powlaw1d.pl)
>>> mids = list_model_components()
>>> 'gal' in mids
True
>>> 'pl' in mids
True

Example 2

The model component does not need to be included as part of a source expression for it to be included in the output of this function:

>>> create_model_component('gauss2d', 'gsrc')
>>> 'gsrc' in list_model_components()
True

PARAMETERS

This function has no parameters

Return value

The return value from this function is:

ids -- The identifiers for all the model components that have been created. They do not need to be associated with a source expression (i.e. they do not need to have been included in a call to `set_model` ).


Bugs

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

See Also

info
get_functions, list_functions, list_model_ids, list_response_ids
methods
list_iter_methods, list_methods
modeling
create_model_component, delete_model_component
models
list_models, models, tablemodel, xs
statistics
list_priors, list_samplers