-
Notifications
You must be signed in to change notification settings - Fork 106
/
pyshcoeffs.html
196 lines (154 loc) · 5.82 KB
/
pyshcoeffs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>SHTOOLS - Python SHCoeffs Class</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/sh.css">
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico">
<link rel="icon" type="image/vnd.microsoft.icon" href="images/favicon.ico">
<meta name="description" content="SHTOOLS Python class for spherical harmonic coefficients.">
</head>
<body>
<div class="main">
<p class="centeredimage"><img src="images/logo.jpg" width=894 height=135 alt="SHTOOLS --- Tools for working with spherical harmonics"></p>
<table class="menu">
<tbody>
<tr>
<td><a href="../index.html">HOME</a></td>
<td><a href="https://github.com/SHTOOLS/SHTOOLS/releases">DOWNLOAD</a></td>
<td class="selected"><a href="documentation.html">DOCUMENTATION</a></td>
<td><a href="faq.html">FAQ</a> </td>
</tr>
</tbody>
</table>
<p class="dir">
> <a href="../index.html" class="dir">Home</a> > <a href="documentation.html" class="dir">Documentation</a> > <a href="python-routines.html" class="dir">Python</a> > <a href="pyclasses.html" class="dir">Classes</a></p>
<h1 class="nomarginbot">SHCoeffs</h1>
<table class="pyclass">
<tbody>
<tr>
<td class="head">Subclasses</td>
</tr>
<tr>
<td class="left"><tt>SHRealCoeffs</tt></td>
<td class="right">Real spherical harmonic coefficient class.</td>
</tr>
<tr>
<td class="left"><tt>SHComplexCoeffs</tt></td>
<td class="right">Complex spherical harmonic coefficient class.</td>
</tr>
<tr>
<td class="head">Initialization</td>
</tr>
<tr>
<td class="left"><tt>x = SHCoeffs.from_array()</tt></td>
<td class="right">Initialize using coefficients from an array.</td>
</tr>
<tr>
<td class="left"><tt>x = SHCoeffs.from_random()</tt></td>
<td class="right">Initialize using random coefficients with a prescribed power spectrum.</td>
</tr>
<tr>
<td class="left"><tt>x = SHCoeffs.from_zeros()</tt></td>
<td class="right">Initialize with coefficients set to zero.</td>
</tr>
<tr>
<td class="left"><tt>x = SHCoeffs.from_file()</tt></td>
<td class="right">Initialize using coefficients from a file.</td>
</tr>
<tr>
<td class="head">Class attributes</td>
</tr>
<tr>
<td class="left"><tt>lmax</tt></td>
<td class="right">The maximum spherical harmonic degree of the coefficients.</td>
</tr>
<tr>
<td class="left"><tt>coeffs</tt></td>
<td class="right">The raw coefficients with the specified normalization and phase conventions.</td>
</tr>
<tr>
<td class="left"><tt>normalization</tt></td>
<td class="right">The normalization of the coefficients: <tt>'4pi'</tt>, <tt>'ortho'</tt>, or <tt>'schmidt'</tt>.</td>
</tr>
<tr>
<td class="left"><tt>csphase</tt></td>
<td class="right">Defines whether the Condon-Shortley phase is used (<tt>1</tt>) or not (<tt>-1</tt>).</td>
</tr>
<tr>
<td class="left"><tt>mask</tt></td>
<td class="right">A boolean mask that is <tt>True</tt> for the permissible values of degree <tt>l</tt> and order <tt>m</tt>.</td>
</tr>
<tr>
<td class="left"><tt>kind</tt></td>
<td class="right">The coefficient data type: either <tt>'complex'</tt> or <tt>'real'</tt>.</td>
</tr>
<tr>
<td class="head">Class methods</td>
</tr>
<tr>
<td class="left"><tt>to_file()</tt></td>
<td class="right">Save raw spherical harmonic coefficientsto a text or binary file.</td>
</tr>
<tr>
<td class="left"><tt>to_array()</tt></td>
<td class="right">Return an array of spherical harmonics coefficients with a different normalization convention.</td>
</tr>
<tr>
<td class="left"><tt>degrees()</tt></td>
<td class="right">Return an array listing the spherical harmonic degrees from <tt>0</tt> to <tt>lmax</tt>.</td>
</tr>
<tr>
<td class="left"><tt>spectrum()</tt></td>
<td class="right">Return the spectrum of the function.</td>
</tr>
<tr>
<td class="left"><tt>set_coeffs()</tt></td>
<td class="right">Set coefficients in-place to specified values.</td>
</tr>
<tr>
<td class="left"><tt>rotate()</tt></td>
<td class="right">Rotate the coordinate system used to express the spherical harmonics coefficients and return a new class instance.</td>
</tr>
<tr>
<td class="left"><tt>convert()</tt></td>
<td class="right">Return a new class instance using a different normalization convention.</td>
</tr>
<tr>
<td class="left"><tt>expand()</tt></td>
<td class="right">Evaluate the coefficients either on a spherical grid and return an SHGrid class instance, or for a list of latitude and longitude coordinates.</td>
</tr>
<tr>
<td class="left"><tt>copy()</tt></td>
<td class="right">Return a copy of the class instance.</td>
</tr>
<tr>
<td class="left"><tt>plot_spectrum()</tt></td>
<td class="right">Plot the spectrum as a function of spherical harmonic degree.</td>
</tr>
<tr>
<td class="left"><tt>plot_spectrum2d()</tt></td>
<td class="right">Plot the spectrum of all spherical-harmonic coefficients.</td>
</tr>
<tr>
<td class="left"><tt>info()</tt></td>
<td class="right">Print a summary of the data stored in the SHCoeffs instance.</td>
</tr>
</tbody>
</table>
<br>
<p class="dir">
> <a href="../index.html" class="dir">Home</a> > <a href="documentation.html" class="dir">Documentation</a> > <a href="python-routines.html" class="dir">Python</a> > <a href="pyclasses.html" class="dir">Classes</a></p>
<table class="footer2">
<tbody>
<tr>
<td class="c1"><a href="https://lagrange.oca.eu/?lang=en">Laboratoire Lagrange</a></td>
<td class="c2"><a href="https://www.oca.eu/?lang=en">Observatoire de la Côte d'Azur</a></td>
<td class="c3">© 2017 <a href="https://github.com/SHTOOLS">SHTOOLS</a></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>