1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> 2 3<!--Converted with LaTeX2HTML 2018.3 (Released July 19, 2018) --> 4<HTML lang="EN"> 5<HEAD> 6<TITLE>neighbours_nest</TITLE> 7<META NAME="description" CONTENT="neighbours_nest"> 8<META NAME="keywords" CONTENT="idl"> 9<META NAME="resource-type" CONTENT="document"> 10<META NAME="distribution" CONTENT="global"> 11 12<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> 13<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> 14<META NAME="Generator" CONTENT="LaTeX2HTML v2018.3"> 15 <link rel='apple-touch-icon' sizes='180x180' href='images/favicons/apple-touch-icon.png?v=2017'> 16 <link rel='icon' type='image/png' sizes='32x32' href='images/favicons/favicon-32x32.png?v=2017'> 17 <link rel='icon' type='image/png' sizes='16x16' href='images/favicons/favicon-16x16.png?v=2017'> 18 <link rel='manifest' href='images/favicons/manifest.json?v=2017'> 19 <link rel='mask-icon' href='images/favicons/safari-pinned-tab.svg?v=2017' color='#5bbad5'> 20 <link rel='shortcut icon' href='images/favicons/favicon.ico?v=2017'> 21 <meta name='apple-mobile-web-app-title' content='HEALPix'> 22 <meta name='application-name' content='HEALPix'> 23 <meta name='msapplication-config' content='images/favicons/browserconfig.xml?v=2017'> 24 <meta name='theme-color' content='#ffffff'> 25 26<LINK REL="STYLESHEET" HREF="idl.css"> 27 28<LINK REL="next" HREF="idl_neighbours_ring.htm"> 29<LINK REL="previous" HREF="idl_mollview.htm"> 30<LINK REL="next" HREF="idl_neighbours_ring.htm"> 31</HEAD> 32 33<body text="#000000" bgcolor="#FFFFFA"> 34 35<DIV CLASS="navigation"><!--Navigation Panel--> 36<A 37 HREF="idl_mollview.htm"> 38<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A> 39<A 40 HREF="idl_HEALPix_IDL_subroutines.htm"> 41<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A> 42<A 43 HREF="idl_neighbours_ring.htm"> 44<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A> 45<A ID="tex2html365" 46 HREF="idl_TABLE_CONTENTS.htm"> 47<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A> 48<BR> 49<B> Previous:</B> <A 50 HREF="idl_mollview.htm">mollview</A> 51 52<B>Up:</B> <A 53 HREF="idl_HEALPix_IDL_subroutines.htm">HEALPix/IDL subroutines</A> 54 55<B> Next:</B> <A 56 HREF="idl_neighbours_ring.htm">neighbours_ring</A> 57<B> Top:</B> <a href="main.htm">Main Page</a></DIV> 58<!--End of Navigation Panel--> 59 60<H1><A ID="SECTION4600"></A> 61<A ID="idl:neighbours_nest"></A> 62<BR> 63 64</H1> 65 66<P> 67<b><font size=+6><FONT COLOR="#CC0000">neighbours_nest</FONT></font></b><hr> 68<H3>This IDL facility returns the number and indices of the topological immediate neighbours 69of a central pixel. The pixels 70are ordered in a clockwise sense (when watching the sphere from the outside) 71about the central pixel with the 72southernmost pixel in first element. For the four pixels in the southern 73corners of the 74equatorial faces which have two equally southern neighbours the 75routine returns the southwestern pixel first and proceeds clockwise.</H3> 76Location in HEALPix directory tree: <a href="https://sourceforge.net/p/healpix/code/1005/tree/trunk/src/idl/toolkit/neighbours_nest.pro"><b>src/idl/toolkit/neighbours_nest.pro</b></a> 77 78<P> 79<hr><h1>FORMAT </h1><h3>IDL> 80neighbours_nest (<A HREF="#idl:neighbours_nest:Nside">Nside</A>, <A HREF="#idl:neighbours_nest:Ipix0">Ipix0</A>, <A HREF="#idl:neighbours_nest:Listpix">Listpix</A>[,<A HREF="#idl:neighbours_nest:Nneigh">Nneigh</A>]) 81</h3> 82 83<P> 84<hr> 85<H1>QUALIFIERS</H1> 86 87 <DL COMPACT><DT> 88<B>Nside</B> 89<DD><A ID="idl:neighbours_nest:Nside"></A> <b>HEALPix</b> resolution parameter (scalar integer), 90 should be a valid Nside (power of 2) 91 <DT> 92<B>Ipix0</B> 93<DD><A ID="idl:neighbours_nest:Ipix0"></A>NESTED-scheme index of central pixel in [0,12*Nside<SPAN CLASS="MATH"><SUP><i>2</i></SUP></SPAN>-1] 94 <DT> 95<B>Listpix</B> 96<DD><A ID="idl:neighbours_nest:Listpix"></A>output: list of neighbouring pixel (NESTED scheme index) of 97size <TT>Nneigh</TT> 98 <DT> 99<B>Nneigh</B> 100<DD><A ID="idl:neighbours_nest:Nneigh"></A>optional output: number of neighbours of pixel <TT>#Ipix0</TT>. 101 Usually 8, sometimes 7 (for 8 particular pixels) or 6 (if Nside=1) 102 </DL> 103 104<P> 105<hr> 106<H1>DESCRIPTION</H1> 107<blockquote> 108neighbours_nest calls <TT>pix2xy_nest</TT> to find location of central pixel within the pixelation 109base-face, and then <TT>xy2pix_nest</TT> to find neighbouring pixels within the same 110face, or one of the bit manipulation routines if the neighbouring pixel 111is on a different base-face. 112</blockquote> 113 114<P> 115<hr><H1>RELATED ROUTINES</H1><h3>This section lists the routines related to <b><FONT COLOR="#CC0000">neighbours_nest</FONT></b></h3> 116 117 <DL COMPACT><DT> 118<B>idl</B> 119<DD>version 6.4 or more is necessary to run neighbours_nest . 120 <DT> 121<B><A HREF="idl_neighbours_ring.htm#idl:neighbours_ring">neighbours_ring</A></B> 122<DD>returns topological immediate 123neighbouring pixels of a given central pixel, using RING indexing. 124 <DT> 125<B><A HREF="idl_query_disc.htm#idl:query_disc">query_disc</A>, 126 <A HREF="idl_query_polygon.htm#idl:query_polygon">query_polygon</A>,</B> 127<DD><DT> 128<B><A HREF="idl_query_strip.htm#idl:query_strip">query_strip</A>, <A HREF="idl_query_triangle.htm#idl:query_triangle">query_triangle</A></B> 129<DD>render the list of pixels enclosed 130 respectively in a given disc, polygon, latitude strip and triangle 131 <DT> 132<B><A HREF="idl_pix2xxx_ang2xxx_vec2xxx_nes.htm#idl:pix_tools">nest2ring</A>, <A HREF="idl_pix2xxx_ang2xxx_vec2xxx_nes.htm#idl:pix_tools">ring2nest</A></B> 133<DD>conversion between NESTED and RING indices 134 </DL> 135 136<P> 137<HR><H1>EXAMPLE:</H1> 138<tt><TABLE CELLPADDING=3> 139<TR><TD ALIGN="LEFT">neighbours_nest , 4, 1, list, nneigh</TD> 140<TD ALIGN="LEFT"> </TD> 141</TR> 142<TR><TD ALIGN="LEFT">print,nneigh,list</TD> 143<TD ALIGN="LEFT"> </TD> 144</TR> 145</TABLE></tt> 146<blockquote> 147will return:8 90 0 2 3 6 4 94 91, 148listing the NESTED-indexed 8 neighbors of pixel #1 for Nside=4 149</blockquote> 150 151<P> 152 153<P> 154 155<P> 156 157<DIV CLASS="navigation"><HR> 158<!--Navigation Panel--> 159<A 160 HREF="idl_mollview.htm"> 161<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A> 162<A 163 HREF="idl_HEALPix_IDL_subroutines.htm"> 164<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A> 165<A 166 HREF="idl_neighbours_ring.htm"> 167<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A> 168<A ID="tex2html365" 169 HREF="idl_TABLE_CONTENTS.htm"> 170<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A> 171<BR> 172<B> Previous:</B> <A 173 HREF="idl_mollview.htm">mollview</A> 174 175<B>Up:</B> <A 176 HREF="idl_HEALPix_IDL_subroutines.htm">HEALPix/IDL subroutines</A> 177 178<B> Next:</B> <A 179 HREF="idl_neighbours_ring.htm">neighbours_ring</A> 180<B> Top:</B> <a href="main.htm">Main Page</a></DIV> 181<!--End of Navigation Panel--> 182<ADDRESS> 183Version 3.50, 2018-12-10 184</ADDRESS> 185</BODY> 186</HTML> 187