Return 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 returned by this command and can be changed by set_default_id.

Returns:id – The default data set identifier used by certain Sherpa functions when an identifier is not given, or set to None.
Return type:int or str

See also

List the identifiers for the loaded data sets.
Set the default data set identifier.


The default Sherpa data set identifier is the integer 1.


Display the default identifier:

>>> print(get_default_id())

Store the default identifier and use it as an argument to call another Sherpa routine:

>>> defid = get_default_id()
>>> load_arrays(defid, x, y)