NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


neighbours_nest


This subroutine returns the number and locations (in terms of pixel numbers) of the topological neighbours of a central pixel. The pixels are ordered in a clockwise sense about the central pixel with the southernmost pixel in first element. For the 4 pixels in the southern corners of the equatorial faces which have two equally southern neighbours the routine returns the southwestern pixel first and proceeds clockwise.


Location in HEALPix directory tree: src/f90/mod/pix_tools.f90


FORMAT

call neighbours_nest( nside, ipix, list, nneigh )


ARGUMENTS

name & dimensionality kind in/out description
       
nside I4B IN The Nside parameter of the map.
ipix I4B IN The pixel number of the central pixel.
list(8) I4B OUT On exit, the vector of neighbouring pixels. This contains nneigh relevant elements.
nneigh I4B OUT The number of neighbours (mostly 8, except at 8 sites, where there are only 7 neighbours).


EXAMPLE:

use pix_tools
integer :: n, list(1:8)
call neighbours_nest(4, 1, list, nneigh)
print*,nneigh
print*,list(1:nneigh)

This returns nneigh=8 and a vector list, which contains the pixel numbers ( 90, 0, 2, 3, 6, 4, 94, 91).


MODULES & ROUTINES

This section lists the modules and routines used by neighbours_nest.

mk_xy2pix, mk_pix2xy
precomputing arrays for the conversion of NESTED pixel numbers to Cartesian coords in each face.
pix2xy_nest, xy2pix_nest
Conversion between NESTED pixel numbers to Cartesian coords in each face.
bit_manipulation
module, containing:
invMSB, invLSB,swapLSBMSB,invswapLSBMSB
functions which manipulate the bit vector which represents the NESTED pixel numbers. They correspond to NorthWest<->SouthEast, SouthWest<->NorthEast, East<->West and North-South flips of the diamond faces, respectively.


RELATED ROUTINES

This section lists the routines related to neighbours_nest


pix2ang, ang2pix
convert between angle and pixel number.
pix2vec, vec2pix
convert between a cartesian vector and pixel number.

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650