get_num_par_frozen
- sherpa.astro.ui.get_num_par_frozen(id: IdType | None = None) int
Return the number of frozen parameters in a model expression.
The
get_num_par_frozen
function returns the number of frozen parameters in the model assigned to a data set.Added in version 4.16.1: Linked components are now included without having to include them in the model expression.
- Parameters:
id (int, str, or None, 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 frozen parameters of the components in the expression.
- Return type:
- Raises:
sherpa.utils.err.IdentifierErr – If no model expression has been set for the data set (with
set_model
orset_source
).
See also
get_num_par
Return the number of parameters.
get_num_par_thawed
Return the number of thawed parameters.
set_model
Set the source model expression for a data set.
Examples
Return the number of frozen parameters for the default data set:
>>> print(get_num_par_frozen())
Find the number of frozen parameters for the model associated with the data set called “jet”:
>>> njet = get_num_par_frozen('jet')