Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Perkins
ducc
Commits
f3300038
Commit
f3300038
authored
Feb 14, 2020
by
Martin Reinecke
Browse files
enhance demo
parent
0ee1363a
Changes
1
Hide whitespace changes
Inline
Side-by-side
pysharp/demo.py
View file @
f3300038
...
...
@@ -30,11 +30,11 @@ job = pysharp.sharpjob_d()
# m<=l<=lmax.
# Symmetry: a_l,-m = (-1)**m*conj(a_l,m).
# The symmetry implies that all coefficients with m==0 are purely real-valued.
# The a_lm are stored in a 1D complex-valued array, in the following order:
# a_(0,0), a(1,0), ..., a_(lmax,0), a(1,1), a(2,1), ... a(lmax,1), ..., a(lmax, mmax)
# number of required a_lm coefficients
nalm
=
((
mmax
+
1
)
*
(
mmax
+
2
))
//
2
+
(
mmax
+
1
)
*
(
lmax
-
mmax
)
# number of real-valued random numbers to draw
nalm_r
=
nalm
*
2
-
lmax
-
1
# get random a_lm
alm
=
np
.
random
.
uniform
(
-
1.
,
1.
,
nalm
)
+
1j
*
np
.
random
.
uniform
(
-
1.
,
1.
,
nalm
)
# make a_lm with m==0 real-valued
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment