Last modified: December 2023

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/get_model_type.html
Jump to: · Examples · PARAMETERS · Bugs · See Also


AHELP for CIAO 4.16 Sherpa

get_model_type

Context: modeling

Synopsis

Describe a model expression.

Syntax

get_model_type(model)

model - str or a sherpa.models.model.Model object

Examples

Example 1

>>> create_model_component("powlaw1d", "pl")
>>> get_model_type("pl")
'powlaw1d'

Example 2

For expressions containing more than one component, the result is likely to be 'binaryopmodel'

>>> get_model_type(const1d.norm * (polynom1d.poly + gauss1d.gline))
'binaryopmodel'

Example 3

For sources with some form of an instrument model - such as a PSF convolution for an image or a PHA file with response information from the ARF and RMF - the response can depend on whether the expression contains this extra information or not:

>>> get_model_type(get_source('spec'))
'binaryopmodel'
>>> get_model_type(get_model('spec'))
'rspmodelpha'

PARAMETERS

The parameter for this function is:

Parameter
model

Return value

The return value from this function is:

type -- The name of the model expression.


Bugs

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

See Also

modeling
get_model, get_model_pars, get_source