get_model_type¶
-
sherpa.astro.ui.
get_model_type
(model)¶ Describe a model expression.
Parameters: model (str or a sherpa.models.model.Model object) – Returns: type – The name of the model expression. Return type: str See also
create_model_component()
- Create a model component.
get_model()
- Return the model expression for a data set.
get_model_pars()
- Return the names of the parameters of a model.
get_source()
- Return the source model expression for a data set.
Examples
>>> create_model_component("powlaw1d", "pl") >>> get_model_type("pl") 'powlaw1d'
For expressions containing more than one component, the result is likely to be ‘binaryopmodel’
>>> get_model_type(const1d.norm * (polynom1d.poly + gauss1d.gline)) 'binaryopmodel'
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'