davecwright3 / acor

Estimate the autocorrelation time of time-series data very quickly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ACOR

This is an updated, maintained fork of the original acor package. Below is the original README with the appropriate changes to the name and source locations.

This is a direct port of a C++ routine by Jonathan Goodman (NYU) called ACOR that estimates the autocorrelation time of time series data very quickly.

Dan Foreman-Mackey (NYU) made a few surface changes to the interface in order to write a Python wrapper (with the permission of the original author).

Installation

Just run

pip install encor

with sudo if you really need it.

Otherwise, download the source code as a tarball or clone the git repository from GitHub:

git clone https://github.com/davecwright3/acor.git

Then run

cd acor
python -m pip install .

to compile and install the module acor in your Python path. The only dependency is NumPy (including the python-dev and python-numpy-dev packages which you might have to install separately on some systems).

Usage

Given some time series x, you can estimate the autocorrelation time (tau) using:

import acor
tau, mean, sigma = acor.acor(x)

References

About

Estimate the autocorrelation time of time-series data very quickly

License:MIT License


Languages

Language:C 82.3%Language:Python 16.7%Language:Makefile 1.0%