From bc044261d80a3951fdc1be856f93dbf9e983ee5c Mon Sep 17 00:00:00 2001
From: fjosw
Date: Tue, 19 Apr 2022 12:10:30 +0000
Subject: [PATCH] Documentation updated
---
docs/pyerrors/input/bdio.html | 48 +++++++++++++++++++++++------------
1 file changed, 32 insertions(+), 16 deletions(-)
diff --git a/docs/pyerrors/input/bdio.html b/docs/pyerrors/input/bdio.html
index cba56918..e8bd6210 100644
--- a/docs/pyerrors/input/bdio.html
+++ b/docs/pyerrors/input/bdio.html
@@ -516,7 +516,7 @@
if cnfg_no > kwargs.get('stop'):
break
idl.append(cnfg_no)
- print('\r%s %i' % ('Reading configuration', cnfg_no + 1), end='\r')
+ print('\r%s %i' % ('Reading configuration', cnfg_no), end='\r')
if len(idl) == 1:
no_corrs = len(corr_name)
data = []
@@ -550,18 +550,26 @@
if stop is None:
stop = idl[-1]
idl_target = range(start, stop + 1, step)
- try:
- indices = [idl.index(i) for i in idl_target]
- except ValueError as err:
- raise Exception('Configurations in file do no match target list!', err)
+
+ if set(idl) != set(idl_target):
+ try:
+ indices = [idl.index(i) for i in idl_target]
+ except ValueError as err:
+ raise Exception('Configurations in file do no match target list!', err)
+ else:
+ indices = None
result = {}
for c in range(no_corrs):
tmp_corr = []
+ tmp_data = np.asarray(data[c])
for t in range(d0 - 2):
- deltas = [np.asarray(data[c])[:, t][index] for index in indices]
+ if indices:
+ deltas = [tmp_data[:, t][index] for index in indices]
+ else:
+ deltas = tmp_data[:, t]
tmp_corr.append(Obs([deltas], [ensemble_name], idl=[idl_target]))
- result[(corr_name[c], corr_source[c]) + tuple(sorted(corr_kappa[c]))] = tmp_corr
+ result[(corr_name[c], corr_source[c]) + tuple(corr_kappa[c])] = tmp_corr
# Check that all data entries have the same number of configurations
if len(set([o[0].N for o in list(result.values())])) != 1:
@@ -709,7 +717,7 @@
if cnfg_no > kwargs.get('stop'):
break
idl.append(cnfg_no)
- print('\r%s %i' % ('Reading configuration', cnfg_no + 1), end='\r')
+ print('\r%s %i' % ('Reading configuration', cnfg_no), end='\r')
if len(idl) == 1:
no_corrs = len(corr_name)
data = []
@@ -1250,7 +1258,7 @@ adding the flag -fPIC to CC and changing the all target to
if cnfg_no > kwargs.get('stop'):
break
idl.append(cnfg_no)
- print('\r%s %i' % ('Reading configuration', cnfg_no + 1), end='\r')
+ print('\r%s %i' % ('Reading configuration', cnfg_no), end='\r')
if len(idl) == 1:
no_corrs = len(corr_name)
data = []
@@ -1284,18 +1292,26 @@ adding the flag -fPIC to CC and changing the all target to
if stop is None:
stop = idl[-1]
idl_target = range(start, stop + 1, step)
- try:
- indices = [idl.index(i) for i in idl_target]
- except ValueError as err:
- raise Exception('Configurations in file do no match target list!', err)
+
+ if set(idl) != set(idl_target):
+ try:
+ indices = [idl.index(i) for i in idl_target]
+ except ValueError as err:
+ raise Exception('Configurations in file do no match target list!', err)
+ else:
+ indices = None
result = {}
for c in range(no_corrs):
tmp_corr = []
+ tmp_data = np.asarray(data[c])
for t in range(d0 - 2):
- deltas = [np.asarray(data[c])[:, t][index] for index in indices]
+ if indices:
+ deltas = [tmp_data[:, t][index] for index in indices]
+ else:
+ deltas = tmp_data[:, t]
tmp_corr.append(Obs([deltas], [ensemble_name], idl=[idl_target]))
- result[(corr_name[c], corr_source[c]) + tuple(sorted(corr_kappa[c]))] = tmp_corr
+ result[(corr_name[c], corr_source[c]) + tuple(corr_kappa[c])] = tmp_corr
# Check that all data entries have the same number of configurations
if len(set([o[0].N for o in list(result.values())])) != 1:
@@ -1486,7 +1502,7 @@ Manually overwrite ensemble name
if cnfg_no > kwargs.get('stop'):
break
idl.append(cnfg_no)
- print('\r%s %i' % ('Reading configuration', cnfg_no + 1), end='\r')
+ print('\r%s %i' % ('Reading configuration', cnfg_no), end='\r')
if len(idl) == 1:
no_corrs = len(corr_name)
data = []