Git Product home page Git Product logo

acor's Introduction

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

acor's People

Contributors

dfm avatar who8mylunch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

acor's Issues

Problem installing with conda install -c auto acor

I've been using conda and when I try to install acor using the instructions at https://anaconda.org/auto/acor I get the following error messages.

bash-3.2$ conda install -c auto acor
Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:

  • acor
  • pywavelets
    Use "conda info " to see the dependencies for each package.

bash-3.2$ conda info acor
bash-3.2$ conda info pywavelets

pywavelets 0.5.2 np111py27_0

file name : pywavelets-0.5.2-np111py27_0.tar.bz2
name : pywavelets
version : 0.5.2
build string: np111py27_0
build number: 0
channel : https://repo.anaconda.com/pkgs/free/osx-64
size : 4.0 MB
arch : x86_64
constrains : ()
date : 2017-03-29
license : MIT
md5 : 13879c7382f9b3bb22bd2c836910de5a
platform : darwin
subdir : osx-64
url : https://repo.anaconda.com/pkgs/free/osx-64/pywavelets-0.5.2-np111py27_0.tar.bz2
dependencies:
numpy 1.11*
python 2.7*

pywavelets 0.5.2 np111py35_0

file name : pywavelets-0.5.2-np111py35_0.tar.bz2
name : pywavelets
version : 0.5.2
build string: np111py35_0
build number: 0
channel : https://repo.anaconda.com/pkgs/free/osx-64
size : 3.9 MB
arch : x86_64
constrains : ()
date : 2017-03-29
license : MIT
md5 : a6b9d8bf43f3b75b48a3fb55070fde09
platform : darwin
subdir : osx-64
url : https://repo.anaconda.com/pkgs/free/osx-64/pywavelets-0.5.2-np111py35_0.tar.bz2
dependencies:
numpy 1.11*
python 3.5*

pywavelets 0.5.2 np111py36_0

file name : pywavelets-0.5.2-np111py36_0.tar.bz2
name : pywavelets
version : 0.5.2
build string: np111py36_0
build number: 0
channel : https://repo.anaconda.com/pkgs/free/osx-64
size : 3.9 MB
arch : x86_64
constrains : ()
date : 2017-03-29
license : MIT
md5 : cece5121bac9fdc838b381faf43df4c4
platform : darwin
subdir : osx-64
url : https://repo.anaconda.com/pkgs/free/osx-64/pywavelets-0.5.2-np111py36_0.tar.bz2
dependencies:
numpy 1.11*
python 3.6*

And so on and so forth.

acor function not showing up in module -- anaconda python 3.3

I've successfully installed acor, but when I try to use it as directed, python throws an error and doesn't think the function acor is in the acor module.

import acor
import numpy as np
a = np.random.rand(500)
acor(a)
Traceback (most recent call last):
File "", line 1, in
TypeError: 'module' object is not callable

I'm using clang, and python 3.3 via anaconda

Installation issue when numpy missing

If numpy nor acor are installed, and we install both of them by:

$ pip install -r requirements.txt

where requirements.txt:

numpy
acor

raises ImportError: no module named numpy when installing acor. Refer to pip issue 25 for details. To put it shortly, pip cannot determine even the dependencies of acor since egg_info fails

No module named '_acor'

Hi Dan,

Been using your acor for years and moved to Python 3 and a fresh install. From either pip or git clone python setup.py installs, I get this weird bug:

In [1]: from acor import acor

ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 from acor import acor

/anaconda3/lib/python3.7/site-packages/acor/acor.py in ()
3 import numpy as np
4
----> 5 import _acor
6
7

ModuleNotFoundError: No module named '_acor'

acor module error

Hi, I'm pretty new to python and am having an issue with acor that I thought I installed successfully (tried both pip install and git clone). I'm getting pretty similar errors as those listed in issue #4, and I need acor for a separate Python algorithm. I have Python 3.5.2 through Anaconda.

import acor
acor
<module 'acor' from '/localdir/anaconda3/lib/python3.5/site-packages/acor/init.py'>
import numpy as np
a= np.random.rand(500)
acor(a)
Traceback (most recent call last):
File "", line 1, in
TypeError: 'module' object is not callable

Any tips?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.