create_template_model
- sherpa.models.template.create_template_model(modelname: str, names: list[str], parvals: ndarray, templates: list[TableModelBase], template_interpolator_name: str | None = 'default') TemplateModel | InterpolatingTemplateModel[source] [edit on github]
Create a TemplateModel model class.
- Parameters:
- modelname
str The name of the template model.
- namessequence
ofstr The parameters names.
- parvals
ndarray The parameter values, organised as a 2D ndarray of shape (nelem, npars), where nelem is the number of parameter values and npars the number of parameters (which must match the names parameter).
- templatessequence
ofTableModelBaseinstances The model for each set of parameters (each row of parvals). It must match the first dimension of parvals.
- template_interpolator_name
strorNone,optional The interpolator name. If None then there is no interpolation between templates.
- modelname
- Returns:
- model
TemplateModelinstance The template model (may be a subclass of TemplateModel if template_interpolator_name is not None).
- model