Skip to content

Commit

Permalink
deploy: 7bf0705
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 5, 2023
1 parent ff71085 commit 25c3bf5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 76 deletions.
19 changes: 0 additions & 19 deletions harmonic_methods.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,6 @@ <h1 class="title">Module <code>sleplet.harmonic_methods</code></h1>
<section>
<h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="sleplet.harmonic_methods.compute_random_signal"><code class="name flex">
<span>def <span class="ident">compute_random_signal</span></span>(<span>L: int, rng: numpy.random._generator.Generator, *, var_signal: float) ‑> numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128]]</span>
</code></dt>
<dd>
<div class="desc"><p>Generates a normally distributed random signal of a
complex signal with mean <code>0</code> and variance <code>1</code>.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>L</code></strong></dt>
<dd>The spherical harmonic bandlimit.</dd>
<dt><strong><code>rng</code></strong></dt>
<dd>The random number generator object.</dd>
<dt><strong><code>var_signal</code></strong></dt>
<dd>The variance of the signal.</dd>
</dl>
<h2 id="returns">Returns</h2>
<p>The coefficients of a random signal on the sphere.</p></div>
</dd>
<dt id="sleplet.harmonic_methods.invert_flm_boosted"><code class="name flex">
<span>def <span class="ident">invert_flm_boosted</span></span>(<span>flm: numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128]], L: int, resolution: int, *, reality: bool = False, spin: int = 0) ‑> numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128 | numpy.float64]]</span>
</code></dt>
Expand Down Expand Up @@ -149,7 +131,6 @@ <h1>Index</h1>
</li>
<li><h3><a href="#header-functions">Functions</a></h3>
<ul class="">
<li><code><a title="sleplet.harmonic_methods.compute_random_signal" href="#sleplet.harmonic_methods.compute_random_signal">compute_random_signal</a></code></li>
<li><code><a title="sleplet.harmonic_methods.invert_flm_boosted" href="#sleplet.harmonic_methods.invert_flm_boosted">invert_flm_boosted</a></code></li>
<li><code><a title="sleplet.harmonic_methods.mesh_forward" href="#sleplet.harmonic_methods.mesh_forward">mesh_forward</a></code></li>
<li><code><a title="sleplet.harmonic_methods.mesh_inverse" href="#sleplet.harmonic_methods.mesh_inverse">mesh_inverse</a></code></li>
Expand Down
73 changes: 16 additions & 57 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ <h4 id="sifting-convolution-on-the-sphere-fig-1">Sifting Convolution on the Sphe
for ell in range(2, 0, -1):
f = sleplet.functions.HarmonicGaussian(128, l_sigma=10**ell, m_sigma=10)
flm = f.translate(alpha=0.75 * np.pi, beta=0.125 * np.pi)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(flm, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
f_sphere = s2fft.inverse(flm, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(
f_sphere,
f.L,
Expand All @@ -93,9 +91,7 @@ <h4 id="sifting-convolution-on-the-sphere-fig-2">Sifting Convolution on the Sphe

f = sleplet.functions.Earth(128)
flm = sleplet.harmonic_methods.rotate_earth_to_south_america(f.coefficients, f.L)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(flm, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
f_sphere = s2fft.inverse(flm, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(f_sphere, f.L, &quot;fig_2&quot;).execute()
</code></pre>
<h4 id="sifting-convolution-on-the-sphere-fig-3">Sifting Convolution on the Sphere: Fig. 3</h4>
Expand All @@ -111,9 +107,7 @@ <h4 id="sifting-convolution-on-the-sphere-fig-3">Sifting Convolution on the Sphe
g = sleplet.functions.Earth(128)
flm = f.convolve(f.coefficients, g.coefficients.conj())
flm_rot = sleplet.harmonic_methods.rotate_earth_to_south_america(flm, f.L)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(flm_rot, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
f_sphere = s2fft.inverse(flm_rot, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(f_sphere, f.L, f&quot;fig_3_ell_{ell}&quot;).execute()
</code></pre>
<h3 id="slepian-scale-discretised-wavelets-on-the-sphere">Slepian Scale-Discretised Wavelets on the Sphere</h3>
Expand All @@ -134,9 +128,7 @@ <h4 id="slepian-scale-discretised-wavelets-on-the-sphere-fig-3">Slepian Scale-Di
# a
f = sleplet.functions.Earth(128, smoothing=2)
flm = sleplet.harmonic_methods.rotate_earth_to_south_america(f.coefficients, f.L)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(flm, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
f_sphere = s2fft.inverse(flm, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(f_sphere, f.L, &quot;fig_3_a&quot;, normalise=False).execute()
# b
region = sleplet.slepian.Region(mask_name=&quot;south_america&quot;)
Expand Down Expand Up @@ -264,9 +256,7 @@ <h4 id="slepian-scale-discretised-wavelets-on-the-sphere-fig-9">Slepian Scale-Di
# a
f = sleplet.functions.Earth(128, smoothing=2)
flm = sleplet.harmonic_methods.rotate_earth_to_africa(f.coefficients, f.L)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(flm, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
f_sphere = s2fft.inverse(flm, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(f_sphere, f.L, &quot;fig_9_a&quot;, normalise=False).execute()
# b
region = sleplet.slepian.Region(mask_name=&quot;africa&quot;)
Expand Down Expand Up @@ -545,12 +535,7 @@ <h5 id="fig-21">Fig. 2.1</h5>
for ell in range(5):
for m in range(ell + 1):
f = sleplet.functions.SphericalHarmonic(128, ell=ell, m=m)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(f.coefficients, f.L),
f.L,
method=&quot;jax&quot;,
sampling=&quot;mwss&quot;,
)
f_sphere = s2fft.inverse(f.coefficients, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(
f_sphere,
f.L,
Expand All @@ -575,16 +560,12 @@ <h5 id="fig-22">Fig. 2.2</h5>

# a
f = sleplet.functions.ElongatedGaussian(128, p_sigma=0.1, t_sigma=0.1)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(f.coefficients, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
f_sphere = s2fft.inverse(f.coefficients, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(f_sphere, f.L, &quot;fig_2_2_a&quot;, annotations=[]).execute()
# b-d
for a, b, g in [(0, 0, 0.25), (0, 0.25, 0.25), (0.25, 0.25, 0.25)]:
glm_rot = f.rotate(alpha=a * np.pi, beta=b * np.pi, gamma=g * np.pi)
g_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(glm_rot, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
g_sphere = s2fft.inverse(glm_rot, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(
g_sphere,
f.L,
Expand All @@ -611,12 +592,7 @@ <h5 id="fig-25">Fig. 2.5</h5>

for j in [None, *list(range(4))]:
f = sleplet.functions.AxisymmetricWavelets(128, B=3, j_min=2, j=j)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(f.coefficients, f.L),
f.L,
method=&quot;jax&quot;,
sampling=&quot;mwss&quot;,
)
f_sphere = s2fft.inverse(f.coefficients, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(
f_sphere,
f.L,
Expand Down Expand Up @@ -646,15 +622,11 @@ <h5 id="fig-31">Fig. 3.1</h5>

# a
f = sleplet.functions.Gaussian(128)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(f.coefficients, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
f_sphere = s2fft.inverse(f.coefficients, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(f_sphere, f.L, &quot;fig_3_1_a&quot;, annotations=[]).execute()
# b
glm_trans = f.translate(alpha=0.75 * np.pi, beta=0.125 * np.pi)
g_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(glm_trans, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
g_sphere = s2fft.inverse(glm_trans, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(g_sphere, f.L, &quot;fig_3_1_b&quot;, annotations=[]).execute()
</code></pre>
<h5 id="fig-32">Fig. 3.2</h5>
Expand All @@ -669,15 +641,11 @@ <h5 id="fig-32">Fig. 3.2</h5>

# a
f = sleplet.functions.SquashedGaussian(128)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(f.coefficients, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
f_sphere = s2fft.inverse(f.coefficients, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(f_sphere, f.L, &quot;fig_3_2_a&quot;, annotations=[]).execute()
# b
glm_trans = f.translate(alpha=0.75 * np.pi, beta=0.125 * np.pi)
g_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(glm_trans, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
g_sphere = s2fft.inverse(glm_trans, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(g_sphere, f.L, &quot;fig_3_2_b&quot;, annotations=[]).execute()
</code></pre>
<h5 id="fig-33">Fig. 3.3</h5>
Expand All @@ -692,15 +660,11 @@ <h5 id="fig-33">Fig. 3.3</h5>

# a
f = sleplet.functions.ElongatedGaussian(128)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(f.coefficients, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
f_sphere = s2fft.inverse(f.coefficients, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(f_sphere, f.L, &quot;fig_3_3_a&quot;, annotations=[]).execute()
# b
glm_trans = f.translate(alpha=0.75 * np.pi, beta=0.125 * np.pi)
g_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(glm_trans, f.L), f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;
)
g_sphere = s2fft.inverse(glm_trans, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(g_sphere, f.L, &quot;fig_3_3_b&quot;, annotations=[]).execute()
</code></pre>
<h5 id="fig-34">Fig. 3.4</h5>
Expand All @@ -714,12 +678,7 @@ <h5 id="fig-34">Fig. 3.4</h5>

for ell in range(2, 0, -1):
f = sleplet.functions.HarmonicGaussian(128, l_sigma=10**ell, m_sigma=10)
f_sphere = s2fft.inverse(
s2fft.samples.flm_1d_to_2d(f.coefficients, f.L),
f.L,
method=&quot;jax&quot;,
sampling=&quot;mwss&quot;,
)
f_sphere = s2fft.inverse(f.coefficients, f.L, method=&quot;jax&quot;, sampling=&quot;mwss&quot;)
sleplet.plotting.PlotSphere(
f_sphere,
f.L,
Expand Down

0 comments on commit 25c3bf5

Please sign in to comment.