delete_model_component¶
- sherpa.astro.ui.delete_model_component(name)¶
Delete a model component.
- Parameters
name (str) – The name used to refer to this instance, or component, of the model. The corresponding Python variable will be deleted by this function.
See also
create_model_componentCreate a model component.
delete_modelDelete the model expression for a data set.
list_modelsList the available model types.
list_model_componentsList the names of all the model components.
set_modelSet the source model expression for a data set.
set_model_autoassign_funcSet the method used to create model component identifiers.
Notes
It is an error to try to delete a component that is part of a model expression - i.e. included as part of an expression in a set_model or set_source call. In such a situation, use the delete_model function to remove the source expression before calling delete_model_component.
Examples
If a model instance called
plhas been created - e.g. bycreate_model_component('powlaw1d', 'pl')- then the following will remove it:>>> delete_model_component('pl')