- sherpa.astro.ui.load_syserror(id, filename=None, bkg_id=None, *args, **kwargs)
Load the systematic errors from a file.
Read in a column or image from a file and use the values as the systematic errors for a data set.
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).
ncols (int, optional) – The number of columns to read in (the first
ncolscolumns in the file).
colkeys (array of str, optional) – An array of the column name to read in. The default is
sep (str, optional) – The separator character. The default is
comment (str, optional) – The comment character. The default is
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
filenameparameter. If given two un-named arguments, then they are interpreted as the
filenameparameters, respectively. The remaining parameters are expected to be given as named arguments.
Read in the first column from ‘tbl.dat’:
Use the column labelled ‘col3’
>>> load_syserror('tbl.dat', colkeys=['col3'])
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]')
Read in the first column from the file ‘errors.fits’ as the systematic errors for the ‘core’ data set:
>>> load_syserror('core', 'errors.fits')
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')