From 445476beb8e3ffcbb183004d3a664e46df928a88 Mon Sep 17 00:00:00 2001 From: Simon Kuberski Date: Wed, 9 Feb 2022 11:56:47 +0100 Subject: [PATCH] Bugfix in openQCD routines: r_stop was excluded instead of being the last element --- pyerrors/input/openQCD.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyerrors/input/openQCD.py b/pyerrors/input/openQCD.py index 81b9eec3..91ab6cf7 100644 --- a/pyerrors/input/openQCD.py +++ b/pyerrors/input/openQCD.py @@ -195,7 +195,7 @@ def read_rwms(path, prefix, version='2.0', names=None, **kwargs): r_stop_index.append(len(configlist[-1]) - 1) else: try: - r_stop_index.append(configlist[-1].index(r_stop[rep])) + r_stop_index.append(configlist[-1].index(r_stop[rep]) + 1) except ValueError: raise Exception('Config %d not in file with range [%d, %d]' % ( r_stop[rep], configlist[-1][0], configlist[-1][-1])) from None @@ -393,7 +393,7 @@ def extract_t0(path, prefix, dtr_read, xmin, spatial_extent, fit_range=5, **kwar r_stop_index.append(len(configlist[-1]) - 1) else: try: - r_stop_index.append(configlist[-1].index(r_stop[rep])) + r_stop_index.append(configlist[-1].index(r_stop[rep]) + 1) except ValueError: raise Exception('Config %d not in file with range [%d, %d]' % ( r_stop[rep], configlist[-1][0], configlist[-1][-1])) from None @@ -716,7 +716,7 @@ def read_qtop(path, prefix, c, dtr_cnfg=1, version="openQCD", **kwargs): r_stop_index.append(len(configlist[-1]) - 1) else: try: - r_stop_index.append(configlist[-1].index(r_stop[rep])) + r_stop_index.append(configlist[-1].index(r_stop[rep]) + 1) except ValueError: raise Exception('Config %d not in file with range [%d, %d]' % ( r_stop[rep], configlist[-1][0], configlist[-1][-1])) from None