source: issm/trunk-jpl/externalpackages/mealpix/help/html/pix2vec_help.html@ 25367

Last change on this file since 25367 was 25367, checked in by adhikari, 5 years ago

NEW: matlab package for analyzing spherical harmonics based on Max Tegmark's HEALpix tool

  • Property svn:executable set to *
File size: 4.2 KB
Line 
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 <!--
7This HTML was auto-generated from MATLAB code.
8To 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
11body {
12 background-color: white;
13 margin:10px;
14}
15
16h1 {
17 color: #990000;
18 font-size: x-large;
19}
20
21h2 {
22 color: #990000;
23 font-size: medium;
24}
25
26/* Make the text shrink to fit narrow windows, but not stretch too far in
27wide windows. */
28p,h1,h2,div.content div {
29 max-width: 600px;
30 /* Hack for IE6 */
31 width: auto !important; width: 600px;
32}
33
34pre.codeinput {
35 background: #EEEEEE;
36 padding: 10px;
37}
38@media print {
39 pre.codeinput {word-wrap:break-word; width:100%;}
40}
41
42span.keyword {color: #0000FF}
43span.comment {color: #228B22}
44span.string {color: #A020F0}
45span.untermstring {color: #B20000}
46span.syscmd {color: #B28C00}
47
48pre.codeoutput {
49 color: #666666;
50 padding: 10px;
51}
52
53pre.error {
54 color: red;
55}
56
57p.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,...)
66xyz = pix2vec(nSide,pix,'Param1',Value1,...)</pre><h2>Input Arguments<a name="2"></a></h2><pre>nSide HEALPix resolution parameter
67pix (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
70xyz 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;
72nPix = nSide2nPix(nSide);
73pix0 = reshape(1:6,3,2);
74pix1 = reshape(nPix+(-5:0),3,2);
75pix = [pix0,pix1];
76xyz = pix2vec(nSide,pix);
77xyzn = pix2vec(nSide,pix,<span class="string">'nest'</span>,true);
78size(xyz)
79[xyz{1},xyz{end}]
80[xyzn{1},xyzn{end}]
81</pre><pre class="codeoutput">
82ans =
83
84 3 4
85
86
87ans =
88
89 0.0361 0.0361
90 0.0361 -0.0361
91 0.9987 -0.9987
92
93
94ans =
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&reg; 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
124nSide = 2^4;
125nPix = nSide2nPix(nSide);
126pix0 = reshape(1:6,3,2);
127pix1 = reshape(nPix+(-5:0),3,2);
128pix = [pix0,pix1];
129xyz = pix2vec(nSide,pix);
130xyzn = pix2vec(nSide,pix,'nest',true);
131size(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>
Note: See TracBrowser for help on using the repository browser.