Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
xQML
xQML
Commits
e81ad1d7
Commit
e81ad1d7
authored
Jul 30, 2018
by
Julien
Browse files
PEP8 for spin_functions.py
parent
b8c0a65b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
spin_functions.py
spin_functions.py
+3
-3
No files found.
spin_functions.py
View file @
e81ad1d7
...
@@ -36,12 +36,12 @@ def dlss(z, s1, s2, lmax):
...
@@ -36,12 +36,12 @@ def dlss(z, s1, s2, lmax):
print
(
"error spins, s1<|s2|"
)
print
(
"error spins, s1<|s2|"
)
return
return
# sign = -1 if (s1 + s2) and 1 else 1
#
Conv:
sign = -1 if (s1 + s2) and 1 else 1
sign
=
(
-
1
)
**
(
s1
-
s2
)
sign
=
(
-
1
)
**
(
s1
-
s2
)
fs1
=
math
.
factorial
(
2.0
*
s1
)
fs1
=
math
.
factorial
(
2.0
*
s1
)
fs1ps2
=
math
.
factorial
(
1.0
*
s1
+
s2
)
fs1ps2
=
math
.
factorial
(
1.0
*
s1
+
s2
)
fs1ms2
=
math
.
factorial
(
1.0
*
s1
-
s2
)
fs1ms2
=
math
.
factorial
(
1.0
*
s1
-
s2
)
num
=
(
1.0
+
z
)
**
(
0.5
*
(
s1
+
s2
))
*
(
1.0
-
z
)
**
(
0.5
*
(
s1
-
s2
))
num
=
(
1.0
+
z
)
**
(
0.5
*
(
s1
+
s2
))
*
(
1.0
-
z
)
**
(
0.5
*
(
s1
-
s2
))
# Initialise the recursion (l = s1 + 1)
# Initialise the recursion (l = s1 + 1)
d
[
s1
]
=
sign
/
2.0
**
s1
*
np
.
sqrt
(
fs1
/
fs1ps2
/
fs1ms2
)
*
num
d
[
s1
]
=
sign
/
2.0
**
s1
*
np
.
sqrt
(
fs1
/
fs1ps2
/
fs1ms2
)
*
num
...
@@ -51,7 +51,7 @@ def dlss(z, s1, s2, lmax):
...
@@ -51,7 +51,7 @@ def dlss(z, s1, s2, lmax):
d
[
s1
+
1
]
=
(
2
*
s1
+
1.0
)
*
(
z
-
s2
/
(
s1
+
1.0
))
*
d
[
s1
]
/
rhoSSL1
d
[
s1
+
1
]
=
(
2
*
s1
+
1.0
)
*
(
z
-
s2
/
(
s1
+
1.0
))
*
d
[
s1
]
/
rhoSSL1
# Build the recursion for l > s1 + 1
# Build the recursion for l > s1 + 1
for
l
in
np
.
arange
(
s1
+
1
,
lmax
,
1
)
:
for
l
in
np
.
arange
(
s1
+
1
,
lmax
,
1
):
l1
=
l
+
1.0
l1
=
l
+
1.0
numSSL
=
(
l
*
l
*
1.0
-
s1
*
s1
)
*
(
l
*
l
*
1.0
-
s2
*
s2
)
numSSL
=
(
l
*
l
*
1.0
-
s1
*
s1
)
*
(
l
*
l
*
1.0
-
s2
*
s2
)
rhoSSL
=
np
.
sqrt
(
numSSL
)
/
(
l
*
1.0
)
rhoSSL
=
np
.
sqrt
(
numSSL
)
/
(
l
*
1.0
)
...
...
Write
Preview
Markdown
is supported
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