Skip to content

Commit

Permalink
Fix error plot_kkr
Browse files Browse the repository at this point in the history
  • Loading branch information
Raff-physics committed Nov 8, 2023
1 parent 06e112c commit 73defc9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aiida_kkr/tools/plot_kkr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,12 +1141,14 @@ def make_kkrimp_rmsplot(self, rms_all, stot_all, pks_all, rms_goal, ptitle, **kw
# plotting of convergence properties (rms etc.)
if len(rms_all) > 0:
# sort rms values and flatten array
reorder_rms = array(pks_all).argsort()
reorder_rms = array(pks_all).argsort()[::-1]
rms, niter_calcs, stot = [], [0], []
for i in array(rms_all)[reorder_rms]:
rms_all_sorted = [rms_all[i] for i in reorder_rms]
for i in rms_all_sorted:
rms += list(i)
niter_calcs.append(len(i) - 0.5)
for i in array(stot_all)[reorder_rms]:
stot_sorted = [stot_all[i] for i in reorder_rms]
for i in stot_sorted:
if i is not None:
stot += list(i)
# now plot
Expand Down

0 comments on commit 73defc9

Please sign in to comment.