[25367] | 1 |
|
---|
| 2 | <!DOCTYPE html
|
---|
| 3 | PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|
| 4 | <html><head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
---|
| 6 | <!--
|
---|
| 7 | This HTML was auto-generated from MATLAB code.
|
---|
| 8 | To make changes, update the MATLAB code and republish this document.
|
---|
| 9 | --><title>inRing</title><meta name="generator" content="MATLAB 7.12"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2011-02-19"><meta name="DC.source" content="inRing_help.m"><style type="text/css">
|
---|
| 10 |
|
---|
| 11 | body {
|
---|
| 12 | background-color: white;
|
---|
| 13 | margin:10px;
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | h1 {
|
---|
| 17 | color: #990000;
|
---|
| 18 | font-size: x-large;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | h2 {
|
---|
| 22 | color: #990000;
|
---|
| 23 | font-size: medium;
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | /* Make the text shrink to fit narrow windows, but not stretch too far in
|
---|
| 27 | wide windows. */
|
---|
| 28 | p,h1,h2,div.content div {
|
---|
| 29 | max-width: 600px;
|
---|
| 30 | /* Hack for IE6 */
|
---|
| 31 | width: auto !important; width: 600px;
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | pre.codeinput {
|
---|
| 35 | background: #EEEEEE;
|
---|
| 36 | padding: 10px;
|
---|
| 37 | }
|
---|
| 38 | @media print {
|
---|
| 39 | pre.codeinput {word-wrap:break-word; width:100%;}
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | span.keyword {color: #0000FF}
|
---|
| 43 | span.comment {color: #228B22}
|
---|
| 44 | span.string {color: #A020F0}
|
---|
| 45 | span.untermstring {color: #B20000}
|
---|
| 46 | span.syscmd {color: #B28C00}
|
---|
| 47 |
|
---|
| 48 | pre.codeoutput {
|
---|
| 49 | color: #666666;
|
---|
| 50 | padding: 10px;
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | pre.error {
|
---|
| 54 | color: red;
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | p.footer {
|
---|
| 58 | text-align: right;
|
---|
| 59 | font-size: xx-small;
|
---|
| 60 | font-weight: lighter;
|
---|
| 61 | font-style: italic;
|
---|
| 62 | color: gray;
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | </style></head><body><div class="content"><h1>inRing</h1><!--introduction--><p>Return list of pixels in a ring or ring section</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Syntax</a></li><li><a href="#2">Input Arguments</a></li><li><a href="#3">Return Arguments</a></li><li><a href="#4">Description</a></li><li><a href="#5">Example</a></li><li><a href="#6">See also</a></li><li><a href="#7">Requires</a></li></ul></div><h2>Syntax<a name="1"></a></h2><pre>pixList = inRing(nSide, nRing, phi0, dPhi, 'Param1', Value1, ...);</pre><h2>Input Arguments<a name="2"></a></h2><pre>nSide HEALPix resolution parameter
|
---|
| 66 | nRing Ring number (1 <= nRing <= 4*nSide-1)
|
---|
| 67 | phi0, dPhi (optional) Ring section longitudes [phi-dPhi,phi+dPhi]</pre><pre>Param Value
|
---|
| 68 | 'nest' return pixels with nested indexing (true | {false})
|
---|
| 69 | 'strict' return only pixels whose center is in longitude range
|
---|
| 70 | (true | {false})</pre><h2>Return Arguments<a name="3"></a></h2><pre>pixList size(nRing) cell array of pixels in ring defined by nRing,
|
---|
| 71 | phi0, dPhi</pre><h2>Description<a name="4"></a></h2><pre>nRing may be a numeric array, in which case phi0, dPhi and nest may each
|
---|
| 72 | be either scalar or a size(nRing) array. If strict is false (default)
|
---|
| 73 | then all pixels intersected by longitude range are included in pixList.</pre><h2>Example<a name="5"></a></h2><pre class="codeinput"><span class="comment">% All pixels in ring 2 of nSide = 4 pixelization (ring indexed)</span>
|
---|
| 74 | pix = inRing(4,2);
|
---|
| 75 | pix{:}
|
---|
| 76 |
|
---|
| 77 | <span class="comment">% Same, but nested indexing</span>
|
---|
| 78 | pix = inRing(4,2,<span class="string">'nest'</span>,true);
|
---|
| 79 | pix{:}
|
---|
| 80 | nest2ring(4,pix{:})
|
---|
| 81 |
|
---|
| 82 | <span class="comment">% Pixels in rings [2,4;8,10;12,14] and the longitude band</span>
|
---|
| 83 | <span class="comment">% [7*pi/4,9*pi/4]</span>
|
---|
| 84 | nRing = [2,3;5,12;13,14];
|
---|
| 85 | pix = inRing(4,nRing,2*pi,pi/4);
|
---|
| 86 | pix{1}
|
---|
| 87 | pix{end}
|
---|
| 88 |
|
---|
| 89 | <span class="comment">% Same, with strict selection</span>
|
---|
| 90 | pix = inRing(4,nRing,2*pi,pi/4,<span class="string">'strict'</span>,true);
|
---|
| 91 | pix{1}
|
---|
| 92 | pix{end}
|
---|
| 93 | </pre><pre class="codeoutput">
|
---|
| 94 | ans =
|
---|
| 95 |
|
---|
| 96 | 5 6 7 8 9 10 11 12
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | ans =
|
---|
| 100 |
|
---|
| 101 | 65 16 15 32 31 48 47 64
|
---|
| 102 |
|
---|
| 103 |
|
---|
| 104 | ans =
|
---|
| 105 |
|
---|
| 106 | 137 1 5 2 7 3 9 4
|
---|
| 107 |
|
---|
| 108 |
|
---|
| 109 | ans =
|
---|
| 110 |
|
---|
| 111 | 12 5 6
|
---|
| 112 |
|
---|
| 113 |
|
---|
| 114 | ans =
|
---|
| 115 |
|
---|
| 116 | 188 181 182
|
---|
| 117 |
|
---|
| 118 |
|
---|
| 119 | ans =
|
---|
| 120 |
|
---|
| 121 | 12 5
|
---|
| 122 |
|
---|
| 123 |
|
---|
| 124 | ans =
|
---|
| 125 |
|
---|
| 126 | 188 181
|
---|
| 127 |
|
---|
| 128 | </pre><h2>See also<a name="6"></a></h2><p>ringNum</p><h2>Requires<a name="7"></a></h2><p>ring2z, pix2vec</p><p>Copyright 2010-2011 Lee Samuel Finn. <a href="mealpix_notices.html">Terms of Use</a>.</p><p class="footer"><br>
|
---|
| 129 | Published with MATLAB® 7.12<br></p></div><!--
|
---|
| 130 | ##### SOURCE BEGIN #####
|
---|
| 131 | %% inRing
|
---|
| 132 | % Return list of pixels in a ring or ring section
|
---|
| 133 |
|
---|
| 134 | %% Syntax
|
---|
| 135 | % pixList = inRing(nSide, nRing, phi0, dPhi, 'Param1', Value1, ...);
|
---|
| 136 |
|
---|
| 137 | %% Input Arguments
|
---|
| 138 | % nSide HEALPix resolution parameter
|
---|
| 139 | % nRing Ring number (1 <= nRing <= 4*nSide-1)
|
---|
| 140 | % phi0, dPhi (optional) Ring section longitudes [phi-dPhi,phi+dPhi]
|
---|
| 141 | %
|
---|
| 142 | % Param Value
|
---|
| 143 | % 'nest' return pixels with nested indexing (true | {false})
|
---|
| 144 | % 'strict' return only pixels whose center is in longitude range
|
---|
| 145 | % (true | {false})
|
---|
| 146 |
|
---|
| 147 | %% Return Arguments
|
---|
| 148 | % pixList size(nRing) cell array of pixels in ring defined by nRing,
|
---|
| 149 | % phi0, dPhi
|
---|
| 150 |
|
---|
| 151 | %% Description
|
---|
| 152 | % nRing may be a numeric array, in which case phi0, dPhi and nest may each
|
---|
| 153 | % be either scalar or a size(nRing) array. If strict is false (default)
|
---|
| 154 | % then all pixels intersected by longitude range are included in pixList.
|
---|
| 155 |
|
---|
| 156 | %% Example
|
---|
| 157 |
|
---|
| 158 | % All pixels in ring 2 of nSide = 4 pixelization (ring indexed)
|
---|
| 159 | pix = inRing(4,2);
|
---|
| 160 | pix{:}
|
---|
| 161 |
|
---|
| 162 | % Same, but nested indexing
|
---|
| 163 | pix = inRing(4,2,'nest',true);
|
---|
| 164 | pix{:}
|
---|
| 165 | nest2ring(4,pix{:})
|
---|
| 166 |
|
---|
| 167 | % Pixels in rings [2,4;8,10;12,14] and the longitude band
|
---|
| 168 | % [7*pi/4,9*pi/4]
|
---|
| 169 | nRing = [2,3;5,12;13,14];
|
---|
| 170 | pix = inRing(4,nRing,2*pi,pi/4);
|
---|
| 171 | pix{1}
|
---|
| 172 | pix{end}
|
---|
| 173 |
|
---|
| 174 | % Same, with strict selection
|
---|
| 175 | pix = inRing(4,nRing,2*pi,pi/4,'strict',true);
|
---|
| 176 | pix{1}
|
---|
| 177 | pix{end}
|
---|
| 178 |
|
---|
| 179 |
|
---|
| 180 | %% See also
|
---|
| 181 | % ringNum
|
---|
| 182 |
|
---|
| 183 | %% Requires
|
---|
| 184 | % ring2z, pix2vec
|
---|
| 185 |
|
---|
| 186 | %%
|
---|
| 187 | % Copyright 2010-2011 Lee Samuel Finn. <mealpix_notices.html Terms of Use>.
|
---|
| 188 | ##### SOURCE END #####
|
---|
| 189 | --></body></html> |
---|