set_dep¶
-
sherpa.ui.
set_dep
(id, val=None)¶ Set the dependent axis of a data set.
Parameters: - id (int or str, optional) – The data set to use. If not given then the default identifier is used, as returned by get_default_id.
- val (array) – The array of values for the dependent axis.
See also
dataspace1d()
- Create the independent axis for a 1D data set.
dataspace2d()
- Create the independent axis for a 2D data set.
get_dep()
- Return the dependent axis of a data set.
load_arrays()
- Create a data set from array values.
Notes
The function does not follow the normal Python standards for parameter use, since it is designed for easy interactive use. When called with a single un-named argument, it is taken to be the val parameter. If given two un-named arguments, then they are interpreted as the id and val parameters, respectively.
Examples
Create a 1D data set with values at (0,4), (2,10), (4,12), (6,8), (8,2), and (10,12):
>>> dataspace1d(0, 10, 2, dstype=Data1D) >>> set_dep([4, 10, 12, 8, 2, 12])
Set the values for the data set ‘src’:
>>> set_dep('src', y1)