get_num_par_thawed¶
- sherpa.astro.ui.get_num_par_thawed(id=None)¶
Return the number of thawed parameters in a model expression.
The get_num_par_thawed function returns the number of thawed parameters in the model assigned to a data set.
- Parameters
id (int or str, optional) – The data set containing the model expression. If not given then the default identifier is used, as returned by get_default_id.
- Returns
npar – The number of parameters in the model expression. This sums up all the thawed parameters of the components in the expression.
- Return type
int
- Raises
sherpa.utils.err.IdentifierErr – If no model expression has been set for the data set (with set_model or set_source).
See also
get_num_par
Return the number of parameters.
get_num_par_frozen
Return the number of frozen parameters.
set_model
Set the source model expression for a data set.
Examples
Return the number of thawed parameters for the default data set:
>>> print(get_num_par_thawed())
Find the number of thawed parameters for the model associated with the data set called “jet”:
>>> njet = get_num_par_thawed('jet')