https://github.com/dfm/acor
Estimate the autocorrelation time of time-series data very quickly
https://github.com/dfm/acor
Last synced: about 1 year ago
JSON representation
Estimate the autocorrelation time of time-series data very quickly
- Host: GitHub
- URL: https://github.com/dfm/acor
- Owner: dfm
- License: mit
- Created: 2011-12-08T01:01:49.000Z (over 14 years ago)
- Default Branch: main
- Last Pushed: 2023-06-18T15:53:53.000Z (almost 3 years ago)
- Last Synced: 2025-03-27T10:21:33.378Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 25.4 KB
- Stars: 33
- Watchers: 3
- Forks: 19
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.md
Awesome Lists containing this project
README
ACOR
====
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 acor
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/dfm/acor.git
Then run ::
cd acor
python setup.py 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
----------
* http://www.math.nyu.edu/faculty/goodman/software/acor/index.html
* http://www.stat.unc.edu/faculty/cji/Sokal.pdf