gammapy/maps/hpx.py
def local_to_global(self, idx_local):
        """Compute a local index (partial-sky) from a global (all-sky) index.

        Returns
        -------
        idx_global : tuple
            A tuple of pixel index vectors with global HEALPIX pixel indices
        """
        if self._ipix is None:
            return idx_local

        if self.nside.size > 1:
            idx = ravel_hpx_index(idx_local, self._npix)
        else:
            idx_tmp = tuple(
                [idx_local[0]] + [np.zeros(t.shape, dtype=int) for t in idx_local[1:]]
            )
            idx = ravel_hpx_index(idx_tmp, self._npix)

        idx_global = unravel_hpx_index(self._ipix[idx], self._maxpix)
        return idx_global[:1] + tuple(idx_local[1:])
Compute a local index (partial-sky) from a global (all-sky) index.

        Returns
        -------
        idx_global : tuple
            A tuple of pixel index vectors with global HEALPIX pixel indices
        
Compute a local index (partial-sky) from a global (all-sky) index.
Returns

idx_global : tuple
A tuple of pixel index vectors with global HEALPIX pixel indices
Compute a local index ( partial - sky ) from a global ( all - sky ) index . Returns idx_global : tuple A tuple of pixel index vectors with global HEALPIX pixel indices
def local_to_global(self, idx_local):
        if self._ipix is None:
            return idx_local
        if self.nside.size > 1:
            idx = ravel_hpx_index(idx_local, self._npix)
        else:
            idx_tmp = tuple(
                [idx_local[0]] + [np.zeros(t.shape, dtype=int) for t in idx_local[1:]]
            )
            idx = ravel_hpx_index(idx_tmp, self._npix)
        idx_global = unravel_hpx_index(self._ipix[idx], self._maxpix)
        return idx_global[:1] + tuple(idx_local[1:])
def local_to_global ( self , idx_local ) : if self . _ipix is None : return idx_local if self . nside . size > 1 : idx = ravel_hpx_index ( idx_local , self . _npix ) else : idx_tmp = tuple ( [ idx_local [ 0 ] ] + [ np . zeros ( t . shape , dtype = int ) for t in idx_local [ 1 : ] ] ) idx = ravel_hpx_index ( idx_tmp , self . _npix ) idx_global = unravel_hpx_index ( self . _ipix [ idx ] , self . _maxpix ) return idx_global [ : 1 ] + tuple ( idx_local [ 1 : ] )
Compute a local index (partial-sky) from a global (all-sky) index.
Compute a local index ( partial - sky ) from a global ( all - sky ) index .
"""Compute a local index (partial-sky) from a global (all-sky) index.

        Returns
        -------
        idx_global : tuple
            A tuple of pixel index vectors with global HEALPIX pixel indices
        """
self
idx_local