get_par¶
-
sherpa.ui.
get_par
(par)¶ Return a parameter of a model component.
Parameters: par (str) – The name of the parameter, using the format “componentname.parametername”. Returns: par – The parameter values - e.g. current value, limits, and whether it is frozen - can be changed using this object. Return type: a sherpa.models.parameter.Parameter instance Raises: sherpa.utils.err.ArgumentErr
– If the par argument is invalid: the model component does not exist or the given model has no parameter with that name.See also
set_par()
- Set the value, limits, or behavior of a model parameter.
Examples
Return the “c0” parameter of the “bgnd” model component and change it to be frozen:
>>> p = get_par('bgnd.c0') >>> p.frozen = True