Skip to content

Commit

Permalink
Merge pull request #1249 from woodmd/maps-class-rename
Browse files Browse the repository at this point in the history
Rename classes in gammapy.maps
  • Loading branch information
cdeil committed Jan 15, 2018
2 parents 6b1d12d + 6009680 commit 28dc9ac
Show file tree
Hide file tree
Showing 24 changed files with 232 additions and 259 deletions.
19 changes: 8 additions & 11 deletions docs/maps/hpxmap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ HEALPix-based Maps
==================

This page provides examples and documentation specific to the HEALPix
map classes (`~gammapy.maps.HpxMapND` and
`~gammapy.maps.HpxMapSparse`). All HEALPix classes inherit from
`~gammapy.maps.MapBase` which provides generic interface methods that can be be
map classes (`~gammapy.maps.HpxNDMap` and
`~gammapy.maps.HpxSparseMap`). All HEALPix classes inherit from
`~gammapy.maps.Map` which provides generic interface methods that can be be
used to access or update the contents of a map without reference to
its pixelization scheme.

Expand All @@ -21,10 +21,10 @@ an all-sky 2D HEALPix image:

.. code:: python
from gammapy.maps import HpxGeom, HpxMapND, HpxMap
from gammapy.maps import HpxGeom, HpxNDMap, HpxMap
# Create a HEALPix geometry of NSIDE=16
geom = HpxGeom(16, coordsys='GAL')
m = HpxMapND(geom)
m = HpxNDMap(geom)
# Equivalent factory method call
m = HpxMap.create(nside=16, coordsys='GAL')
Expand All @@ -35,25 +35,22 @@ the `~gammapy.maps.HpxMap.create` factory method:

.. code:: python
from gammapy.maps import HpxGeom, HpxMap, HpxMapND
from gammapy.maps import HpxGeom, HpxMap, HpxNDMap
from astropy.coordinates import SkyCoord
# Create a partial-sky HEALPix geometry of NSIDE=16
geom = HpxGeom(16, region='DISK(0.0,5.0,10.0)', coordsys='GAL')
m = HpxMapND(geom)
m = HpxNDMap(geom)
# Equivalent factory method call
position = SkyCoord(0.0, 5.0, frame='galactic', unit='deg')
m = HpxMap.create(nside=16, skydir=position, width=20.0)
Sparse Maps
-----------

The `~gammapy.maps.HpxMapSparse` class is a memory-efficient
The `~gammapy.maps.HpxSparseMap` class is a memory-efficient
implementation of a HEALPix map that uses a sparse data structure to
store map values. Sparse maps can be useful when working with maps
that have many empty pixels (e.g. a low-statistics counts map).
Loading

0 comments on commit 28dc9ac

Please sign in to comment.