Maps#
- class gammapy.maps.Maps(**kwargs)#
Bases:
collections.abc.MutableMappingA Dictionary containing Map objects sharing the same geometry.
This class simplifies handling and I/O of maps collections.
For maps with different geometries, use a regular dict.
Attributes Summary
geomMap geometry (
Geom)Methods Summary
clear()from_geom(geom, names[, kwargs_list])Create map dictionary from geometry.
from_hdulist(hdulist[, hdu_bands])Create map dictionary from list of HDUs.
get(k[,d])items()keys()pop(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem()as a 2-tuple; but raise KeyError if D is empty.
read(filename)Read map dictionary from file.
setdefault(k[,d])to_hdulist([hdu_bands])Convert map dictionary to list of HDUs.
update([E, ]**F)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values()write(filename[, overwrite])Write map dictionary to file.
Attributes Documentation
Methods Documentation