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>in_ring</TITLE>
7<META NAME="description" CONTENT="in_ring">
8<META NAME="keywords" CONTENT="subroutines">
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="subroutines.css">
27
28<LINK REL="next" HREF="sub_input_map.htm">
29<LINK REL="previous" HREF="sub_healpix_types_module.htm">
30<LINK REL="next" HREF="sub_input_map.htm">
31</HEAD>
32
33<body text="#000000" bgcolor="#FFFFFA">
34
35<DIV CLASS="navigation"><!--Navigation Panel-->
36<A
37 HREF="sub_healpix_types_module.htm">
38<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
39<A
40 HREF="sub_HEALPix_F90_subroutines.htm">
41<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
42<A
43 HREF="sub_input_map.htm">
44<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
45<A ID="tex2html380"
46  HREF="sub_TABLE_CONTENTS.htm">
47<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
48<BR>
49<B> Previous:</B> <A
50 HREF="sub_healpix_types_module.htm">healpix_types module</A>
51
52<B>Up:</B> <A
53 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A>
54
55<B> Next:</B> <A
56 HREF="sub_input_map.htm">input_map*</A>
57<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
58<!--End of Navigation Panel-->
59
60<H1><A ID="SECTION4400"></A>
61<A ID="sub:in_ring"></A>
62<BR>
63
64</H1>
65
66<P>
67<b><font size=+6><FONT COLOR="#CC0000">in_ring</FONT></font></b><hr>
68<H3>Routine to find the pixel index of all pixels on a slice of a given
69ring. The output indices can be either in the RING or NESTED scheme,
70depending on the <TT>nest</TT> keyword.</H3>
71Location in HEALPix directory tree: <a href="https://sourceforge.net/p/healpix/code/1005/tree/trunk/src/f90/mod/pix_tools.F90"><b>src/f90/mod/pix_tools.F90</b></a>&nbsp;
72
73<P>
74<hr><h1>FORMAT </h1><blockquote><h3>call <FONT COLOR="#CC0000">in_ring</FONT>(
75<A HREF="#sub:in_ring:nside">nside</A>, <A HREF="#sub:in_ring:iz">iz</A>, <A HREF="#sub:in_ring:phi0">phi0</A>, <A HREF="#sub:in_ring:dphi">dphi</A>, <A HREF="#sub:in_ring:listir">listir</A>, <A HREF="#sub:in_ring:nir">nir</A>, <A HREF="#sub:in_ring:nest">nest</A>
76)</h3></blockquote>
77
78<P>
79<hr><H1>ARGUMENTS</H1>
80
81<TABLE CELLPADDING=3 BORDER="1">
82<TR><TH ALIGN="LEFT" VALIGN="TOP" WIDTH=200><SPAN  CLASS="textbf">name&nbsp;&amp;&nbsp;dimensionality</SPAN></TH>
83<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=25><SPAN  CLASS="textbf">kind</SPAN></TH>
84<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=50><SPAN  CLASS="textbf">in/out</SPAN></TH>
85<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=175><SPAN  CLASS="textbf">description</SPAN></TH>
86</TR>
87<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>&nbsp;</TD>
88<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>&nbsp;</TD>
89<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>&nbsp;</TD>
90<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>&nbsp;</TD>
91</TR>
92<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>
93nside<A ID="sub:in_ring:nside"></A></TD>
94<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
95<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>IN</TD>
96<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>the <!-- MATH
97 $N_{\mathrm{side}}$
98 -->
99<SPAN CLASS="MATH"><I>N</I><SUB>side</SUB></SPAN> parameter of the map.</TD>
100</TR>
101<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>iz<A ID="sub:in_ring:iz"></A></TD>
102<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
103<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>IN</TD>
104<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>ring number, counted southwards from the north pole.</TD>
105</TR>
106<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>phi0<A ID="sub:in_ring:phi0"></A></TD>
107<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>DP</TD>
108<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>IN</TD>
109<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>central <SPAN CLASS="MATH"><IMG STYLE="height: 2.10ex; vertical-align: -0.55ex; " SRC="sub_img133.png"
110 ALT="$\phi$"></SPAN> position in the slice.</TD>
111</TR>
112<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>dphi<A ID="sub:in_ring:dphi"></A></TD>
113<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>DP</TD>
114<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>IN</TD>
115<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>defines the size of the slice. The slice has length <SPAN CLASS="MATH">2 x <I>dphi</I></SPAN> along the ring with center at <SPAN CLASS="MATH"><I>phi</I>0</SPAN>.</TD>
116</TR>
117<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>listir<A ID="sub:in_ring:listir"></A>(0:4*nside-1)</TD>
118<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B/ I8B</TD>
119<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>OUT</TD>
120<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>The pixel indexes in the slice.</TD>
121</TR>
122<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>nir<A ID="sub:in_ring:nir"></A></TD>
123<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
124<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>OUT</TD>
125<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>the number of pixels in the slice. <TT>nir</TT><!-- MATH
126 $\le 4N_{\mathrm{side}}$
127 -->
128<SPAN CLASS="MATH"><IMG STYLE="height: 2.04ex; vertical-align: -0.45ex; " SRC="sub_img134.png"
129 ALT="$\le 4N_{\mathrm{side}}$"></SPAN></TD>
130</TR>
131<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=200>nest<A ID="sub:in_ring:nest"></A>  (OPTIONAL)</TD>
132<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD>
133<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=50>IN</TD>
134<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=175>The pixel indexes are in the NESTED numbering
135scheme if <TT>nest</TT>=1, and in RING scheme otherwise.</TD>
136</TR>
137</TABLE>
138
139<P>
140<HR><H1>EXAMPLE:</H1>
141<tt>call in_ring(256, 10, 0, 0.1, listir, nir, nest=1)
142<BR></tt>
143<blockquote>
144Returns the NESTED pixel index of all pixels within 0.1 radians on each side of <SPAN CLASS="MATH"><IMG STYLE="height: 2.10ex; vertical-align: -0.55ex; " SRC="sub_img135.png"
145 ALT="$\phi=0$"></SPAN> on the 10th ring.
146</blockquote>
147
148<P>
149
150<hr><H1>MODULES & ROUTINES</H1><H3>This section lists the modules and routines used by <FONT COLOR="#CC0000">in_ring</FONT>.</h3>
151  <DL COMPACT><DT>
152<B><A HREF="sub_pix2xxx_ang2xxx_vec2xxx_nes.htm#sub:pix_tools">ring2nest</A></B>
153<DD>conversion from RING scheme pixel index to NESTED scheme pixel index
154 <DT>
155<B>next_in_line_nest</B>
156<DD>returns NESTED index of pixel lying to the East of the
157 current pixel and on the same ring
158  </DL>
159
160<P>
161<hr><H1>RELATED ROUTINES</H1><h3>This section lists the routines related to <b><FONT COLOR="#CC0000">in_ring</FONT></b></h3>
162
163  <DL COMPACT><DT>
164<B><A HREF="sub_pix2xxx_ang2xxx_vec2xxx_nes.htm#sub:pix_tools">pix2ang</A>, <A HREF="sub_pix2xxx_ang2xxx_vec2xxx_nes.htm#sub:pix_tools">ang2pix</A></B>
165<DD>convert between angle and pixel number.
166  <DT>
167<B><A HREF="sub_pix2xxx_ang2xxx_vec2xxx_nes.htm#sub:pix_tools">pix2vec</A>, <A HREF="sub_pix2xxx_ang2xxx_vec2xxx_nes.htm#sub:pix_tools">vec2pix</A></B>
168<DD>convert between a cartesian vector and pixel number.
169  <DT>
170<B><A HREF="sub_getdisc_ring.htm#sub:getdisc_ring">getdisc_ring</A></B>
171<DD>find all pixels within a certain radius.
172  </DL>
173
174<P>
175
176<P>
177
178
179<P>
180
181<P>
182
183<DIV CLASS="navigation"><HR>
184<!--Navigation Panel-->
185<A
186 HREF="sub_healpix_types_module.htm">
187<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
188<A
189 HREF="sub_HEALPix_F90_subroutines.htm">
190<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
191<A
192 HREF="sub_input_map.htm">
193<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
194<A ID="tex2html380"
195  HREF="sub_TABLE_CONTENTS.htm">
196<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
197<BR>
198<B> Previous:</B> <A
199 HREF="sub_healpix_types_module.htm">healpix_types module</A>
200
201<B>Up:</B> <A
202 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A>
203
204<B> Next:</B> <A
205 HREF="sub_input_map.htm">input_map*</A>
206<B> Top:</B> <a href="main.htm">Main Page</a></DIV>
207<!--End of Navigation Panel-->
208<ADDRESS>
209Version 3.50, 2018-12-10
210</ADDRESS>
211</BODY>
212</HTML>
213