get_dep

sherpa.ui.get_dep(id=None, filter=False)

Return the dependent axis of a data set.

Parameters:
  • id (int or str, optional) – The identifier for the data set to use. If not given then the default identifier is used, as returned by get_default_id.
  • filter (bool, optional) – Should the filter attached to the data set be applied to the return value or not. The default is False.
Returns:

axis – The dependent axis values. The model estimate is compared to these values during fitting.

Return type:

array

Raises:

sherpa.utils.err.IdentifierErr – If the data set does not exist.

See also

get_error()
Return the errors on the dependent axis of a data set.
get_indep()
Return the independent axis of a data set.
list_data_ids()
List the identifiers for the loaded data sets.

Examples

>>> load_arrays(1, [10,15,19], [4,5,9])
>>> ignore_id(1, 17, None)
>>> get_dep()
array([4, 5, 9])
>>> get_dep(filter=True)
array([4, 5])
>>> load_arrays(2, [10,15,12,19], [12,14,10,17], [4,5,9,-2], Data2D)
>>> get_dep(2)
array([ 4,  5,  9, -2])