From 9d67738b32f7d1d00a80a00f40e7f541c8a86377 Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann <82444481+jkuhl-uni@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:10:26 +0100 Subject: [PATCH] extended extract_t0 by postfix argument, default stays .ms (#168) * extended extract_t0 by postfix argument, default stays .ms * linting --- pyerrors/input/openQCD.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyerrors/input/openQCD.py b/pyerrors/input/openQCD.py index c89f40e0..d0e3e71d 100644 --- a/pyerrors/input/openQCD.py +++ b/pyerrors/input/openQCD.py @@ -231,7 +231,7 @@ def read_rwms(path, prefix, version='2.0', names=None, **kwargs): return result -def extract_t0(path, prefix, dtr_read, xmin, spatial_extent, fit_range=5, **kwargs): +def extract_t0(path, prefix, dtr_read, xmin, spatial_extent, fit_range=5, postfix='ms', **kwargs): """Extract t0 from given .ms.dat files. Returns t0 as Obs. It is assumed that all boundary effects have @@ -263,6 +263,8 @@ def extract_t0(path, prefix, dtr_read, xmin, spatial_extent, fit_range=5, **kwar fit_range : int Number of data points left and right of the zero crossing to be included in the linear fit. (Default: 5) + postfix : str + Postfix of measurement file (Default: ms) r_start : list list which contains the first config to be read for each replicum. r_stop : list @@ -297,7 +299,7 @@ def extract_t0(path, prefix, dtr_read, xmin, spatial_extent, fit_range=5, **kwar else: known_files = [] - ls = _find_files(path, prefix, 'ms', 'dat', known_files=known_files) + ls = _find_files(path, prefix, postfix, 'dat', known_files=known_files) replica = len(ls)