    Create an image data structure.

unpack_image(arg, coord='logical', dstype=DataIMG)
coord - { 'logical', 'image', 'physical', 'world', 'wcs' }, optional
dstype - optional
>>> img1 = unpack_img("img.fits") >>> set_data(img1)
>>> img = unpack_img('img.fits', 'physical')

Read in an image using Crates:

>>> cr = pycrates.read_file('broad.img') >>> idata = unpack_img(cr)

Read in an image using AstroPy:

>>> hdus = astropy.io.fits.open('broad.img') >>> idata = unpack_img(hdus)

PARAMETERS

The parameters for this function are:

Parameter
Definition
arg
Identify the 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
Ensure that the image contains the given coordinate system.
dstype
The image class to use. The default is `DataIMG` .

The return value from this function is:

The class of the returned object is controlled by the

dstype parameter.

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