Skip to the navigation links
Last modified: 25 September 2018

URL: http://cxc.harvard.edu/sherpa/bugs/delete_model_component.html

Bugs: delete_model_component


Bugs

The command fails with a KeyError.

There is a bug in delete_model_component in Sherpa which causes it to fail with a KeyError: dataset_id

sherpa> set_source(xsphabs.abs1*powlaw1d.pl)
sherpa> delete_model_component("pl") 
KeyError: 1

While an error is thrown, the model component is successfully deleted.

sherpa> set_source(xsphabs.abs1*powlaw1d.p1)
sherpa> list_model_components()
          ['abs1', 'p1']
sherpa> delete_model_component("p1")
KeyError: 1
sherpa> list_model_components()
          ['abs1']