read_image¶
-
sherpa.astro.io.
read_image
(arg, coord='logical', dstype=<class 'sherpa.astro.data.DataIMG'>)[source]¶ Create an image dataset from a file.
Parameters: - arg – The name of the file or a representation of the file (the type depends on the I/O backend).
- coord ({'logical', 'physical', 'world'}, optional) – The type of axis coordinates to use. An error is raised if the file does not contain the necessary metadata for the selected coordinate system.
- dstype (optional) – The data type to create (it is expected to follow the sherpa.data.BaseData interface).
Returns: data
Return type: a sherpa.data.BaseData derived object
Examples
The following examples do not contain argument types specific to a particular I/O backend.
Create a sherpa.astro.data.DataIMG object from the FITS file
img.fits
:>>> d = read_image('img.fits')
Select the physical coordinate system from the file:
>>> d = read_image('img.fits', coord='physical')