pyobs 1.5.0

A Python3 library to analyse data generated from (Monte Carlo) Markov chains.

The software is hosted on GitHub and is distributed under the GNU GPLv2 license.

Features

  • object-oriented for easy manipulation of data

  • FFT acceleration for calculation of autocorrelations

  • minimal memory footprint for large data sets and memory monitoring system

  • support for master-field setup, ie autocorrelations in more than one dimension

  • support for systematic errors and external input data

  • flexible interface for fits

  • support for linear algebra operations (e.g. matrix inverse, eigenvalue problem, etc..)

Citation

If you use this library in your publications cite it in BibTex format with

@software{mattia_bruno_2023_8428049,
  author       = {Mattia Bruno},
  title        = {mbruno46/pyobs: v1.5.0},
  month        = oct,
  year         = 2023,
  publisher    = {Zenodo},
  version      = {v1.5.0},
  doi          = {10.5281/zenodo.7546850},
  url          = {https://doi.org/10.5281/zenodo.7546850}
}

For citations in other formats check out the Zenodo webpage.

Please also consider citing:

Authors

Copyright (C) 2020-2024, Mattia Bruno

Installation

pyobs can be installed in three different ways. After installation it can be imported like any other package

>>> import pyobs
>>> help(pyobs.observable)
  • pip install from remote repository

$ pip install git+https://github.com/mbruno46/pyobs.git@master#egg=pyobs
$ # for upgrading
$ pip install -U git+https://github.com/mbruno46/pyobs.git@master#egg=pyobs
  • pip install from local repository

$ git clone git+https://github.com/mbruno46/pyobs.git
$ pip install ./pyobs
  • developer mode

$ pip install -e ./pyobs

The library can alternatively be used without installation by adding the appropriate path to sys. In this case it is recommended to recompile the C++ extensions manually with python setup.py build_ext.

>>> import sys
>>> sys.path.append('/path/to/pyobs/directory/')
>>> import pyobs

Note that recompiling the C++ extensions might be necessary also after pulling the latest commits, in the developer mode.

Python Environments

Virtual environments can be used to create a copy of the python distribution in the home directory where the user can freely install additional packages, including pyobs.

$ cd $HOME
$ python3.6 -m venv mypy

The environment can be activated, meaning that pip and python commands will be automatically identified with those in the environment

$ source mypy/bin/activate
$ pip install numpy jupyter notebook

Alternatively, just use the full path

$ cd mypy/bin
$ ./pip install numpy
$ ./pip install git+https://github.com/mbruno46/pyobs.git@master#egg=pyobs

Changelog

All notable changes to this project will be documented in this file. The format is based on Keep a changelog.

[Unreleased]

Added
  • jackknife error support

  • exponential tail

Fixed
  • a

  • b

[1.5.1] - xx.03.2024

Added
  • support for complex observables via complex_observable class (binary operations @, *, unary operations inv, eig, T)

Fixed
  • fixed bug in chiexp for combined fits

  • faster index search in transform.py for large observables

[1.5.0] - 10.10.2023

Added
  • added support for expected chi square

Fixed
  • improved error estimation and plotting in presence of holes

  • minor bugs fixed (I/O xml)

[1.4.1] - 18.01.2023

Fixed
  • fixed bug in transform (roll, sort..)

  • improved behavior under roundoff errors

  • fixed compatibility issues with numpy>=1.24.0

[1.4.0] - 20.08.2022

Added
  • finite volume 2to2 quantization condition

  • write support for xml.gz format

  • documentation updated

Fixed - several minor bugs fixed

version 1.3.0, 06.02.2022:
  • added utility functions (tensor_remove, import_string)

  • minor bugs fixed

  • added support xml and bdio format (dobs-tools, ALPHA Collab.)

  • interface for synthetic autocorrelated data changed

  • several bugs fixed

version 1.2.0, 21.07.2021:
  • added support for binning of Monte Carlo data, and blocking for master-field data

  • added support for linting of code

  • performance improvements for slicing/indexing/extending observables

version 1.1.0, 08.05.2021:
  • added support for root finder, basic interpolation, cumsum

  • fixed documentation bugs

  • minor improvements to mfit

  • added support for variance and cov. matrix (data.py rewritten)

version 1.0.1, 10.11.2020:
  • added IO with binary file format (default), based on bison

  • performance improvements in create and derobs

  • additional gradient class for optimization of element-wise operations

  • minor bug fixes

version 1.0.0-alpha, 11.10.2020:
  • IO with json file format supported

  • pip install supported

  • error of the error and 4th moment bias supported

  • support for code coverage and automatic unit tests

  • flexible fit modules (Levenberg-Marquardt minimizer)

  • documentation and tutorials

  • symbolic differentiation for fit functions

  • support for eigenvalue/eigenvectors (including non-symmetric case)

  • support for exp, log, cosh, arccosh, besselk

  • fast C++ extensions for master-field case

  • overloaded basic math operations (+,-,*,/)

  • tensor operations: unary support (sum, trace), matmul via @ operand

  • basic tensor manipulation (reshape, concatenate) and getitem

  • FFT for autocorrelations

  • support for external data with known covariances and systematic errors

  • memory management system, utility functions

  • random module for generation of autocorrelated data sets