Last modified: December 2024

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/load_syserror.html
Jump to: Description · Examples · PARAMETERS · Notes · Bugs · See Also


AHELP for CIAO 4.17 Sherpa

load_syserror

Context: data

Synopsis

Load the systematic errors from a file.

Syntax

load_syserror(id, filename=None, bkg_id=None, *args, **kwargs)

Description

Read in a column or image from a file and use the values as the systematic errors for a data set.


Examples

Example 1

Read in the first column from 'tbl.dat':

>>> load_syserror('tbl.dat')

Example 2

Use the column labelled 'col3'

>>> load_syserror('tbl.dat', colkeys=['col3'])

Example 3

When using the Crates I/O library, the file name can include CIAO Data Model syntax, such as column selection:

>>> load_syserror('tbl.dat[cols col3]')

Example 4

Read in the first column from the file 'errors.fits' as the systematic errors for the 'core' data set:

>>> load_syserror('core', 'errors.fits')

Example 5

The data set labelled 'img' is loaded from the file 'image.fits' and the systematic errors from 'syserr.fits'. The dimensions of the two images must be the same.

>>> load_image('img', 'image.fits')
>>> load_syserror('img', 'syserr.fits')

PARAMETERS

The parameters for this function are:

Parameter Type information Definition
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` .
filename str The name of the file to read in. Supported formats depends on the I/O library in use (Crates or AstroPy) and the type of data set (e.g. 1D or 2D).
bkg_id int, str, or None, 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.
ncols int, optional The number of columns to read in (the first ncols columns in the file).
colkeys array of str, optional An array of the column name to read in. The default is none .
sep str, optional The separator character. The default is ' ' .
comment str, optional The comment character. The default is '#' .

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 `filename` parameter. If given two un-named arguments, then they are interpreted as the `id` and `filename` parameters, respectively. The remaining parameters are expected to be given as named arguments.


Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

data
dataspace1d, dataspace2d, datastack, fake, load_arf, load_arrays, load_ascii, load_bkg, load_bkg_arf, load_bkg_rmf, load_data, load_grouping, load_image, load_multi_arfs, load_multi_rmfs, load_pha, load_quality, load_rmf, load_staterror, load_table, pack_image, pack_pha, pack_table, set_syserror, unpack_arf, unpack_arrays, unpack_ascii, unpack_bkg, unpack_data, unpack_image, unpack_pha, unpack_rmf, unpack_table
filtering
load_filter
info
get_default_id, list_bkg_ids, list_data_ids
modeling
add_model, add_user_pars, load_table_model, load_template_interpolator, load_template_model, load_user_model, save_model, save_source
saving
save_arrays, save_data, save_delchi, save_error, save_filter, save_grouping, save_image, save_pha, save_quality, save_resid, save_staterror, save_syserror, save_table
statistics
load_user_stat