From fc853f81c089bd81bde010dd9254f6b3bd36b9e1 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Mon, 26 Oct 2020 10:09:18 +0100 Subject: [PATCH 1/3] Errorbars in plot_corrs are now centered around marker. --- pyerrors/pyerrors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyerrors/pyerrors.py b/pyerrors/pyerrors.py index 22632754..a87185d7 100644 --- a/pyerrors/pyerrors.py +++ b/pyerrors/pyerrors.py @@ -1137,7 +1137,8 @@ def plot_corrs(observables, **kwargs): y[i] = observables[j][i].value y_err[i] = observables[j][i].dvalue - plt.errorbar(x, y, yerr=y_err, ls='none', fmt='o', capsize=3, markersize=5, label=label[j]) + plt.errorbar(x, y, yerr=y_err, ls='none', fmt='o', capsize=3, + markersize=5, lw=1, label=label[j]) if kwargs.get('logscale'): plt.yscale('log') From 97fc279eed7a210ef736cc19cd38ccfdcbfa6d8a Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Tue, 3 Nov 2020 15:09:07 +0100 Subject: [PATCH 2/3] Bug in covariance fixed that appeared when working with several replica of different length. --- pyerrors/pyerrors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyerrors/pyerrors.py b/pyerrors/pyerrors.py index a87185d7..6c6a1130 100644 --- a/pyerrors/pyerrors.py +++ b/pyerrors/pyerrors.py @@ -852,12 +852,12 @@ def covariance(obs1, obs2, correlation=False, **kwargs): r_length.append(len(obs1.deltas[r_name])) - gamma += np.sum(obs1.deltas[r_name] * obs2.deltas[r_name]) / len(obs1.deltas[r_name]) + gamma += np.sum(obs1.deltas[r_name] * obs2.deltas[r_name]) e_N = np.sum(r_length) tau_combined = (obs1.e_tauint[e_name] + obs2.e_tauint[e_name]) / 2 - dvalue += gamma * (1 + 1 / e_N) / e_N * 2 * tau_combined + dvalue += gamma / e_N * (1 + 1 / e_N) / e_N * 2 * tau_combined if np.abs(dvalue / obs1.dvalue / obs2.dvalue) > 1.0: dvalue = np.sign(dvalue) * obs1.dvalue * obs2.dvalue From ea9b9776125882b376e42bf661489349219fa2bd Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Tue, 3 Nov 2020 15:12:18 +0100 Subject: [PATCH 3/3] Hotfix 1.0.1 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f29e06c..2b1c17ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## [1.0.1] - 2020-11-03 +### Fixed +- Bug in pyerrors.covariance fixed that appeared when working with several + replica of different length. + ## [1.0.0] - 2020-10-13 ### Added - Compatibility with the BDIO Native format outlined [here](https://ific.uv.es/~alramos/docs/ADerrors/tutorial/). Read and write function added to input.bdio diff --git a/setup.py b/setup.py index 237db485..3eeda16d 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup(name='pyerrors', - version='1.0.0', + version='1.0.1', description='Error analysis for lattice QCD', author='Fabian Joswig', author_email='fabian.joswig@wwu.de',