set_xsxset

sherpa.astro.xspec.set_xsxset(name: str, value: str) → None[source] [edit on github]

Set a X-Spec model setting.

Set variables used by X-Spec models. It is equivalent to the X-Spec xset command [1], but only for setting the model database settings. See set_xsabund, set_xscosmo, and set_xsxsect for the other settings.

Parameters:
namestr

The name of the setting. It is converted to upper case before being used. There is no check that the name is valid.

valuestr

The new value of the setting. It must be given as a string. If it is the empty string then the name is removed from the model settings.

Notes

The available settings are listed at [1]. Not all the X-Spec model types are supported by Sherpa - for instance X-Spec “mixing models” - so changing some of these settings will make no difference. The X-Spec chatter setting can be increased with set_xschatter if it is not clear if a setting is being used.

The model settings are stored so that they can be included in the output of sherpa.astro.ui.save_all.

Setting the name argument to “INITIALIZE” will clear the settings, but this is deprecated and the clear_xsxset routine must be used instead.

References

[1] (1,2)

https://heasarc.gsfc.nasa.gov/xanadu/xspec/manual/XSabund.html Note that this may refer to a newer version than the compiled version used by Sherpa; use get_xsversion to check.

Examples

>>> set_xsxset('NEIVERS', '2.0')
>>> set_xsxset('NEIAPECROOT', '/data/spectral/modelData/APEC_nei_v11')
>>> set_xsxset('POW_EMIN', '0.5')
>>> set_xsxset('POW_EMAX', '2.0')