[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>pix2vec</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="pix2vec_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>pix2vec</h1><!--introduction--><p>Convert MEALPix pixel numbers to cartesian location vectors</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">Example</a></li><li><a href="#5">See also</a></li><li><a href="#6">Requires</a></li></ul></div><h2>Syntax<a name="1"></a></h2><pre>[x,y,z] = pix2vec(nSide,pix,'Param1',Value1,...)
|
---|
| 66 | xyz = pix2vec(nSide,pix,'Param1',Value1,...)</pre><h2>Input Arguments<a name="2"></a></h2><pre>nSide HEALPix resolution parameter
|
---|
| 67 | pix (optional) numeric array of pixel numbers</pre><pre>Param Value
|
---|
| 68 | 'nest' indexing scheme is nested (true | {false})</pre><h2>Return Arguments<a name="3"></a></h2><pre>x,y,z size(pix) size(pix) numeric array of unit vector coordinate
|
---|
| 69 | components corresponding to pixels pix
|
---|
| 70 | xyz size(pix) size(pix) cell array of cartesian unit vectors
|
---|
| 71 | corresponding to pixels pix</pre><h2>Example<a name="4"></a></h2><pre class="codeinput">nSide = 2^4;
|
---|
| 72 | nPix = nSide2nPix(nSide);
|
---|
| 73 | pix0 = reshape(1:6,3,2);
|
---|
| 74 | pix1 = reshape(nPix+(-5:0),3,2);
|
---|
| 75 | pix = [pix0,pix1];
|
---|
| 76 | xyz = pix2vec(nSide,pix);
|
---|
| 77 | xyzn = pix2vec(nSide,pix,<span class="string">'nest'</span>,true);
|
---|
| 78 | size(xyz)
|
---|
| 79 | [xyz{1},xyz{end}]
|
---|
| 80 | [xyzn{1},xyzn{end}]
|
---|
| 81 | </pre><pre class="codeoutput">
|
---|
| 82 | ans =
|
---|
| 83 |
|
---|
| 84 | 3 4
|
---|
| 85 |
|
---|
| 86 |
|
---|
| 87 | ans =
|
---|
| 88 |
|
---|
| 89 | 0.0361 0.0361
|
---|
| 90 | 0.0361 -0.0361
|
---|
| 91 | 0.9987 -0.9987
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 | ans =
|
---|
| 95 |
|
---|
| 96 | 0.7065 0.7065
|
---|
| 97 | 0.7065 -0.7065
|
---|
| 98 | 0.0417 -0.0417
|
---|
| 99 |
|
---|
| 100 | </pre><h2>See also<a name="5"></a></h2><p>ang2pix, pix2ang, vec2pix</p><h2>Requires<a name="6"></a></h2><p>nest2ring</p><p>Copyright 2010-2011 Lee Samuel Finn. <a href="mealpix_notices.html">Terms of Use</a>.</p><p class="footer"><br>
|
---|
| 101 | Published with MATLAB® 7.12<br></p></div><!--
|
---|
| 102 | ##### SOURCE BEGIN #####
|
---|
| 103 | %% pix2vec
|
---|
| 104 | % Convert MEALPix pixel numbers to cartesian location vectors
|
---|
| 105 |
|
---|
| 106 | %% Syntax
|
---|
| 107 | % [x,y,z] = pix2vec(nSide,pix,'Param1',Value1,...)
|
---|
| 108 | % xyz = pix2vec(nSide,pix,'Param1',Value1,...)
|
---|
| 109 |
|
---|
| 110 | %% Input Arguments
|
---|
| 111 | % nSide HEALPix resolution parameter
|
---|
| 112 | % pix (optional) numeric array of pixel numbers
|
---|
| 113 | %
|
---|
| 114 | % Param Value
|
---|
| 115 | % 'nest' indexing scheme is nested (true | {false})
|
---|
| 116 |
|
---|
| 117 | %% Return Arguments
|
---|
| 118 | % x,y,z size(pix) size(pix) numeric array of unit vector coordinate
|
---|
| 119 | % components corresponding to pixels pix
|
---|
| 120 | % xyz size(pix) size(pix) cell array of cartesian unit vectors
|
---|
| 121 | % corresponding to pixels pix
|
---|
| 122 |
|
---|
| 123 | %% Example
|
---|
| 124 | nSide = 2^4;
|
---|
| 125 | nPix = nSide2nPix(nSide);
|
---|
| 126 | pix0 = reshape(1:6,3,2);
|
---|
| 127 | pix1 = reshape(nPix+(-5:0),3,2);
|
---|
| 128 | pix = [pix0,pix1];
|
---|
| 129 | xyz = pix2vec(nSide,pix);
|
---|
| 130 | xyzn = pix2vec(nSide,pix,'nest',true);
|
---|
| 131 | size(xyz)
|
---|
| 132 | [xyz{1},xyz{end}]
|
---|
| 133 | [xyzn{1},xyzn{end}]
|
---|
| 134 |
|
---|
| 135 | %% See also
|
---|
| 136 | % ang2pix, pix2ang, vec2pix
|
---|
| 137 |
|
---|
| 138 | %% Requires
|
---|
| 139 | % nest2ring
|
---|
| 140 |
|
---|
| 141 | %%
|
---|
| 142 | % Copyright 2010-2011 Lee Samuel Finn. <mealpix_notices.html Terms of Use>.
|
---|
| 143 | ##### SOURCE END #####
|
---|
| 144 | --></body></html> |
---|