get_model_pars

sherpa.ui.get_model_pars(model)

Return the names of the parameters of a model.

Parameters:model (str or a sherpa.models.model.Model object) –
Returns:names – The names of the parameters in the model expression. These names do not include the name of the parent component.
Return type:list of str

See also

create_model_component()
Create a model component.
get_model()
Return the model expression for a data set.
get_model_type()
Describe a model expression.
get_source()
Return the source model expression for a data set.

Examples

>>> set_source(gauss2d.src + const2d.bgnd)
>>> get_model_pars(get_source())
['fwhm', 'xpos', 'ypos', 'ellip', 'theta', 'ampl', 'c0']