set_default_id

sherpa.astro.ui.set_default_id(id)

Set the default data set identifier.

The Sherpa data id ties data, model, fit, and plotting information into a data set easily referenced by id. The default identifier, used by many commands, is changed by this command. The current setting can be found by using get_default_id.

Parameters:id (int or str) – The default data set identifier to be used by certain Sherpa functions when an identifier is not given, or set to None.

See also

get_default_id()
Return the default data set identifier.
list_data_ids()
List the identifiers for the loaded data sets.

Notes

The default Sherpa data set identifier is the integer 1.

Examples

After the following, many commands, such as set_source, will use ‘src’ as the default data set identifier:

>>> set_default_id('src')

Restore the default data set identifier.

>>> set_default_id(1)