get_dep¶
-
sherpa.ui.
get_dep
(id=None, filter=False)¶ Return the dependent axis of a data set.
This function returns the data values (the dependent axis) for each point or pixel in the 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]) >>> get_dep() array([4, 5, 9])
>>> x0 = [10, 15, 12, 19] >>> x1 = [12, 14, 10, 17] >>> y = [4, 5, 9, -2] >>> load_arrays(2, x0, x1, y, Data2D) >>> get_dep(2) array([ 4, 5, 9, -2])
If the
filter
flag is set then the return will be limited to the data that is used in the fit:>>> 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])