Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
fjosw committed Nov 3, 2020
2 parents d9b2077 + ea9b977 commit 839a690
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions pyerrors/pyerrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 839a690

Please sign in to comment.