SkyImageList¶
-
class
gammapy.image.
SkyImageList
(images=None, meta=None)[source]¶ Bases:
collections.UserList
List of
SkyImage
objects.This is a simple class that provides
- FITS I/O
- Dict-like access by string image name keys in addition to list-like access by integer index.
Examples
Load the image collection from a FITS file:
>>> from gammapy.image import SkyImage, SkyImageList >>> images = SkyImageList.read('$GAMMAPY_EXTRA/datasets/fermi_survey/all.fits.gz')
Which images are available?
>>> images.names
Access one image by list index or image name string key:
>>> images[0] >>> images['counts'] >>> images['counts'].show('ds9')
Print some summary info about the images:
>>> print(images)
Remove and append an image:
>>> del images['background'] >>> images.