    Load an image as a data set.

load_image(id, arg=None, coord='logical', dstype=DataIMG)
id - int or str, optional
coord - { 'logical', 'image', 'physical', 'world', 'wcs' }
dstype - optional

Load the image from the file "img.fits" into the default data set:

>>> load_image('img.fits')

Set the 'bg' data set to the contents of the file "img_bg.fits":

>>> load_image('bg', 'img_bg.fits')

Load in the data from the file 'src.img' and set the coordinate system to the physical system of the file:

>>> load_image('src.img', coord='physical')

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The identifier for the data set to use. If not given then the default identifier is used, as returned by

`get_default_id` .
arg
Identify the image data: a file name, or a data structure representing the data to use, as used by the I/O backend in use by Sherpa: an imagecrate for crates, as used by CIAO, or a list of AstroPy HDU objects.
coord
The coordinate system to use. The 'image' option is the same as 'logical', and 'wcs' the same as 'world'.
dstype
The data class to use. The default is `DataIMG` .

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

Changes in CIAO

Setting coord to a value other than 'logical' will now correctly change the coordinate setting for `DataIMG` datasets.

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

December 2023