Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
kwant
kwant
Commits
f8331485
Verified
Commit
f8331485
authored
Aug 17, 2020
by
Anton Akhmerov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linter error fixes
parent
4413cb95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
kwant/kpm.py
kwant/kpm.py
+3
-4
No files found.
kwant/kpm.py
View file @
f8331485
...
...
@@ -326,8 +326,7 @@ class SpectralDensity:
if
energy_resolution
:
if
energy_resolution
<=
0
:
raise
ValueError
(
"'energy_resolution' must be positive"
.
format
(
energy_resolution
))
raise
ValueError
(
"'energy_resolution' must be positive"
)
# factor of 1.6 comes from the fact that we use the
# Jackson kernel when calculating the FFT, which has
# maximal slope π/2. Rounding to 1.6 ensures that the
...
...
@@ -1099,7 +1098,7 @@ def jackson_kernel(moments):
<https://arxiv.org/abs/cond-mat/0504627>`_.
"""
n_moments
,
*
extra_shape
=
moments
.
shape
n_moments
=
len
(
moments
)
m
=
np
.
arange
(
n_moments
)
kernel_array
=
((
n_moments
-
m
+
1
)
*
np
.
cos
(
np
.
pi
*
m
/
(
n_moments
+
1
))
+
...
...
@@ -1121,7 +1120,7 @@ def lorentz_kernel(moments, l=4):
The additional parameter ``l`` controls the decay of the kernel.
"""
n_moments
,
*
extra_shape
=
moments
.
shape
n_moments
=
len
(
moments
)
m
=
np
.
arange
(
n_moments
)
kernel_array
=
np
.
sinh
(
l
*
(
1
-
m
/
n_moments
))
/
np
.
sinh
(
l
)
...
...
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