get_indep

sherpa.ui.get_indep(id=None)

Return the independent axes 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.
Returns:axis – The independent axis values. These are the values at which the model is evaluated during fitting.
Return type:tuple of arrays
Raises:sherpa.utils.err.IdentifierErr – If the data set does not exist.

See also

get_dep()
Return the dependent axis of a data set.
list_data_ids()
List the identifiers for the loaded data sets.

Examples

For a one-dimensional data set, the X values are returned:

>>> load_arrays(1, [10,15,19], [4,5,9])
>>> get_indep()
(array([10, 15, 19]),)

For a 2D data set the X0 and X1 values are returned:

>>> load_arrays(2, [10,15,12,19], [12,14,10,17], [4,5,9,-2], Data2D)
>>> get_indep(2)
(array([10, 15, 12, 19]), array([12, 14, 10, 17]))