get_par
- sherpa.astro.ui.get_par(par: str | Parameter) Parameter
Return a parameter of a model component.
- Parameters:
- par
str The name of the parameter, using the format “componentname.parametername”.
- par
- Returns:
- par
asherpa.models.parameter.Parameterinstance The parameter values - e.g. current value, limits, and whether it is frozen - can be changed using this object.
- par
- Raises:
sherpa.utils.err.ArgumentErrIf the
parargument is invalid: the model component does not exist or the given model has no parameter with that name.
See also
set_parSet 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