Beispiel #1
0
def ring2nest(nside, ipix):
    """Convert pixel number from RING ordering to NESTED ordering.

    Parameters
    ----------
    nside : int, scalar or array-like
      the healpix nside parameter
    ipix : int, scalar or array-like
      the pixel number in RING scheme

    Returns
    -------
    ipix : int, scalar or array-like
      the pixel number in NESTED scheme

    See Also
    --------
    nest2ring, reorder
    
    Examples
    --------
    >>> import healpy as hpy
    >>> hpy.ring2nest(16, 1504)
    1130

    >>> hpy.ring2nest(2, range(10))
    array([ 3,  7, 11, 15,  2,  1,  6,  5, 10,  9])
    
    >>> hpy.ring2nest([1, 2, 4, 8], 11)
    array([ 11,  13,  61, 253])
    """
    return pixlib._ring2nest(nside, ipix)
Beispiel #2
0
def ring2nest(nside, ipix):
    """Convert pixel number from RING ordering to NESTED ordering.

    Parameters
    ----------
    nside : int, scalar or array-like
      the healpix nside parameter
    ipix : int, scalar or array-like
      the pixel number in RING scheme

    Returns
    -------
    ipix : int, scalar or array-like
      the pixel number in NESTED scheme

    See Also
    --------
    nest2ring, reorder
    
    Examples
    --------
    >>> import healpy as hp
    >>> hp.ring2nest(16, 1504)
    1130

    >>> hp.ring2nest(2, range(10))
    array([ 3,  7, 11, 15,  2,  1,  6,  5, 10,  9])
    
    >>> hp.ring2nest([1, 2, 4, 8], 11)
    array([ 11,  13,  61, 253])
    """
    check_nside(nside)
    return pixlib._ring2nest(nside, ipix)
Beispiel #3
0
def ring2nest(nside, ipix):
    """Convert pixel number from ring scheme number to nest scheme number.

    Input:
      - nside: the nside to work with
      - ipix: the pixel number (can be an array) in ring scheme
    Return:
      - a pixel number or an array of pixel numbers in nest scheme
    """
    return pixlib._ring2nest(nside, ipix)
def ring2nest(nside, ipix):
    """Convert pixel number from ring scheme number to nest scheme number.

    Input:
      - nside: the nside to work with
      - ipix: the pixel number (can be an array) in ring scheme
    Return:
      - a pixel number or an array of pixel numbers in nest scheme
    """
    return pixlib._ring2nest(nside, ipix)