***
Wartungsfenster jeden ersten Mittwoch vormittag im Monat
***
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jackknife
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E138 Institute of Solid State Physics
E138-01 Computational Materials Science
Software
jackknife
Commits
51df3615
Commit
51df3615
authored
5 years ago
by
Patrick Kappl
Browse files
Options
Downloads
Patches
Plain Diff
Add outer product of self-energies
parent
73d72b8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
adga.py
+17
-0
17 additions, 0 deletions
adga.py
main.py
+3
-1
3 additions, 1 deletion
main.py
with
20 additions
and
1 deletion
adga.py
+
17
−
0
View file @
51df3615
...
...
@@ -178,3 +178,20 @@ class Adga(object):
output_file
.
close
()
susceptibilities
=
np
.
array
(
susceptibilities
)
return
susceptibilities
[:,
0
,
0
,
:,
:,
0
,
:]
def
outer_product_of_self_energies
(
a
,
b
):
"""
Return the outer product of ``a`` and ``b`` in the frequency
index.
:arg a: self-energy as 3D numpy array
:arg b: self-energy as 3D numpy array
:return: 4D numpy array :math:`c_{(i)(j)kl}=a_{(i)(j)k}b_{(i)(j)l}`
"""
result_shape
=
list
(
a
.
shape
)
result_shape
.
append
(
a
.
shape
[
-
1
])
result
=
np
.
empty
(
result_shape
)
for
i
in
range
(
len
(
a
)):
for
j
in
range
(
len
(
a
[
0
])):
result
[
i
,
j
]
=
np
.
outer
(
a
[
i
,
j
,:],
np
.
conjugate
(
b
[
i
,
j
,:]))
return
result
This diff is collapsed.
Click to expand it.
main.py
+
3
−
1
View file @
51df3615
...
...
@@ -60,7 +60,9 @@ else:
# %%
# Do the Jackknife estimation
jackknife
=
jk
.
Jackknife
(
x_generator
,
n
,
f
,
general
[
"
output_file_prefix
"
],
jackknife
=
jk
.
Jackknife
(
x_generator
,
n
,
f
,
adga
.
outer_product_of_self_energies
,
general
[
"
output_file_prefix
"
],
strtobool
(
general
[
"
store_output_samples
"
]))
jackknife
.
do_estimation
()
jackknife
.
write_results_to_file
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment