# set_dep¶

sherpa.astro.ui.set_dep(id, val=None, bkg_id=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.

• bkg_id (int or str, optional) – Set to identify which background component to set. The default value (None) means that this is for the source component of the data set.

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 source and background of the data set ‘src’:

>>> set_dep('src', y1)
>>> set_dep('src', bg1, bkg_id=1)
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2612600028514862, "perplexity": 3179.4297286749106}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-40/segments/1600401632671.79/warc/CC-MAIN-20200929060555-20200929090555-00159.warc.gz"}