Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexus: fix module overwrite bug in qmca #2802

Merged
merged 1 commit into from
Nov 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions nexus/bin/qmca
Original file line number Diff line number Diff line change
Expand Up @@ -1218,12 +1218,12 @@ QMCA examples:
adata = obj()
ns=0
for series in serieslist:
np = 0
npf = 0
for prefix in sorted(data.keys()):
pdata = data[prefix]
w = weights[np]
w = weights[npf]
d = pdata[series]
if np==0:
if npf==0:
avg = d.copy()
di = d.info
avg.info.set(
Expand All @@ -1235,7 +1235,7 @@ QMCA examples:
avg.zero()
#end if
avg.accumulate(d,w)
np+=1
npf+=1
#end for
avg.normalize()
file_list.append(avg.info.filepath)
Expand Down Expand Up @@ -1277,12 +1277,12 @@ QMCA examples:
#end if
#end if
for series in serieslist:
np = 0
npf = 0
for prefix in sorted(prefixes):
pdata = data[prefix]
w = weights[np]
w = weights[npf]
d = pdata[series]
if np==0:
if npf==0:
avg = d.copy()
di = d.info
avg.info.set(
Expand All @@ -1294,7 +1294,7 @@ QMCA examples:
avg.zero()
#end if
avg.accumulate(d,w)
np+=1
npf+=1
#end for
avg.normalize()
file_list.append(avg.info.filepath)
Expand Down Expand Up @@ -1433,11 +1433,11 @@ QMCA examples:
for quantity in quantities:
for mode in range(len(modes)):
if modes[mode]:
np = 0
npf = 0
for prefix in prefix_list:
first_prefix = np==0
last_prefix = np==len(self.data)-1
np+=1
first_prefix = npf==0
last_prefix = npf==len(self.data)-1
npf+=1
if first_prefix or not opt.overlay:
fig = plt.figure()
ax = fig.add_subplot(111)
Expand Down