/
pymakegriddh.html
89 lines (78 loc) · 6.9 KB
/
pymakegriddh.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>SHTOOLS - Spherical harmonic transformations</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../css/sh.css">
<link rel="icon" type="image/vnd.microsoft.icon" href="../../images/favicon.ico">
</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="http://shtools.ipgp.fr/">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="../../pytransformations.html" class="dir">Spherical Harmonic Transformations</a></p>
<h1 id="makegriddh">MakeGridDH</h1>
<p>Create a 2D map from a set of spherical harmonic coefficients using the Driscoll and Healy (1994) sampling theorem.</p>
<h1 id="usage">Usage</h1>
<p><code>griddh</code> = pyshtools.MakeGridDH(<code>cilm</code>, [<code>lmax</code>, <code>norm</code>, <code>sampling</code>, <code>csphase</code>, <code>lmax_calc</code>])</p>
<h1 id="returns">Returns</h1>
<dl>
<dt><code>griddh</code> : float, dimension (2*<code>lmax</code>+2, <code>sampling</code>*(2*<code>lmax</code>+2))</dt>
<dd>A 2D equally sampled (default) or equally spaced map in degrees of the spherical harmonic coefficients <code>cilm</code> that conforms to the sampling theorem of Driscoll and Healy (1994). The first latitudinal band corresponds to 90 N, the latitudinal band for 90 S is not included, and the latitudinal sampling interval is 180/<code>n</code> degrees. The first longitudinal band is 0 E, the longitudinal band for 360 E is not included, and the longitudinal sampling interval is 360/<code>n</code> for an equally sampled and 180/<code>m</code> for an equally spaced grid, respectively.
</dd>
</dl>
<h1 id="parameters">Parameters</h1>
<dl>
<dt><code>cilm</code> : float, dimension (2, <code>lmaxin</code>+1, <code>lmaxin</code>+1)</dt>
<dd>The real spherical harmonic coefficients of the function. The coefficients <code>cilm[0,l,m]</code> and <code>cilm[1,l,m]</code> refer to the "cosine" (<code>Clm</code>) and "sine" (<code>Slm</code>) coefficients, respectively.
</dd>
<dt><code>lmax</code> : optional, integer, default = <code>lmaxin</code></dt>
<dd>The maximum spherical harmonic degree of the function, which determines the sampling of the output grid.
</dd>
<dt><code>norm</code> : optional, integer, default = 1</dt>
<dd>1 = 4-pi (geodesy) normalized harmonics; 2 = Schmidt semi-normalized harmonics; 3 = unnormalized harmonics; 4 = orthonormal harmonics.
</dd>
<dt><code>sampling</code> : optional, integer, default = 1</dt>
<dd>If 1, the output grid contains the same number of samples in latitude as in longitude. If 2, the grid is equally spaced in degrees, having twice as many samples in longitude as latitude.
</dd>
<dt><code>csphase</code> : optional, integer, default = 1</dt>
<dd>1 = do not apply the Condon-Shortley phase factor to the associated Legendre functions; -1 = append the Condon-Shortley phase factor of (-1)^m to the associated Legendre functions.
</dd>
<dt><code>lmax_calc</code> : optional, integer, default = <code>lmax</code></dt>
<dd>The maximum spherical harmonic degree used in evaluating the function. This must be less than or equal to <code>lmax</code>, and does not affect the number of samples of the output grid.
</dd>
</dl>
<h1 id="description">Description</h1>
<p><code>MakeGridDH</code> will create a 2-dimensional map equally sampled or equally spaced in latitude and longitude from a set of input spherical harmonic coefficients. This grid conforms with the sampling theorem of Driscoll and Healy (1994) and this routine is the inverse of SHExpandDH. The function is evaluated at each longitudinal band by inverse Fourier transforming the sin and cos terms for each degree <code>l</code>, and then summing over all degrees. When evaluating the function, the maximum spherical harmonic degree that is considered is the minimum of <code>lmaxin</code>, <code>lmax</code>, and <code>lmax_calc</code> (if specified).</p>
<p>The default is to use an input grid that is equally sampled (<code>n</code> by <code>n</code>), but this can be changed to use an equally spaced grid (<code>n</code> by 2<code>n</code>) by use of the optional parameter <code>sampling</code>. The employed spherical harmonic normalization and Condon-Shortley phase convention can be set by the optional arguments <code>norm</code> and <code>csphase</code>; if not set, the default is to use geodesy 4-pi normalized harmonics that exclude the Condon-Shortley phase of (-1)^m.</p>
<p>The normalized legendre functions are calculated using the scaling algorithm of Holmes and Featherstone (2002), which are accurate to about degree 2800. The unnormalized functions are accurate only to about degree 15.</p>
<h1 id="references">References</h1>
<p>Driscoll, J.R. and D.M. Healy, Computing Fourier transforms and convolutions on the 2-sphere, Adv. Appl. Math., 15, 202-250, 1994.</p>
<p>Holmes, S. A., and W. E. Featherstone, A unified approach to the Clenshaw summation and the recursive computation of very high degree and order normalised associated Legendre functions, J. Geodesy, 76, 279- 299, 2002.</p>
<h1 id="see-also">See also</h1>
<p><a href="pyshexpanddh.html"><code>shexpanddh</code></a>, <a href="pymakegriddhc.html"><code>makegriddhc</code></a>, <a href="pyshexpanddhc.html"><code>shexpanddhc</code></a>, <a href="pymakegridglq.html"><code>makegridglq</code></a>, <a href="pyshexpandglq.html"><code>shexpandglq</code></a>, <a href="pymakegridglqc.html"><code>makegridglqc</code></a>, <a href="pyshexpandglqc.html"><code>shexpandglqc</code></a>, <a href="pymakegrid2d.html"><code>makegrid2d</code></a></p>
<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="../../pytransformations.html" class="dir">Spherical Harmonic Transformations</a></p>
<table class="footer2" summary = "SHTOOLS; Fortran and Python spherical harmonic transform software package">
<tbody>
<tr>
<td class="c1"><a href="http://www.ipgp.fr/">Institut de Physique du Globe de Paris</a></td>
<td class="c2"><a href="http://www.sorbonne-paris-cite.fr/index.php/en">University of Sorbonne Paris Cité</a></td>
<td class="c3">© 2016 <a href="https://github.com/SHTOOLS">SHTOOLS</a></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>