Fast and accurate cross-correlation over arbitrary time lags. https://pycorrelate.readthedocs.io
  • Python 95.7%
  • Jupyter Notebook 2.4%
  • Makefile 1.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Antonino Ingargiola ad883ad482
Add DOI badge
2019-04-29 11:26:00 +02:00
.github Initial commit 2017-07-23 16:44:56 -07:00
docs Doc: minor clarifications 2018-08-20 10:37:32 +02:00
pycorrelate make_loglags: use unique only with int bins. Update docs. 2018-08-14 12:04:09 +02:00
tests Tests: update tests with new make_loglags API 2018-08-14 12:04:39 +02:00
.editorconfig Initial commit 2017-07-23 16:44:56 -07:00
.gitattributes Add versioneer 2017-11-15 11:44:29 -08:00
.gitignore Initial commit 2017-07-23 16:44:56 -07:00
.travis.yml CI: finalize py37 support on TravisCI 2018-08-14 15:56:36 +02:00
appveyor.yml CI: try enabling py37 2018-08-14 15:49:07 +02:00
AUTHORS.rst Initial commit 2017-07-23 16:44:56 -07:00
conda_environment_dev_macos.yml Update conda development environment 2017-11-14 14:48:11 -08:00
CONTRIBUTING.rst Update CONTRIBUTING.rst 2017-09-17 06:29:45 -07:00
HISTORY.rst Update HISTORY.rst 2017-11-15 13:40:58 -08:00
LICENSE Initial commit 2017-07-23 16:44:56 -07:00
Makefile Initial commit 2017-07-23 16:44:56 -07:00
MANIFEST.in Fix MANIFEST.in to include only source files 2017-11-15 16:22:24 -08:00
README.rst Add DOI badge 2019-04-29 11:26:00 +02:00
readthedocs.yml RTD: conf 2017-07-25 22:50:09 -07:00
setup.cfg Add versioneer 2017-11-15 11:44:29 -08:00
setup.py CI: finalize py37 support on TravisCI 2018-08-14 15:56:36 +02:00
travis_pypi_setup.py Initial commit 2017-07-23 16:44:56 -07:00
versioneer.py Add versioneer 2017-11-15 11:44:29 -08:00

===========
Pycorrelate
===========

.. image:: https://zenodo.org/badge/111135296.svg
   :target: https://zenodo.org/badge/latestdoi/111135296
   
.. image:: https://img.shields.io/pypi/v/pycorrelate.svg
        :target: https://pypi.python.org/pypi/pycorrelate

.. image:: https://img.shields.io/travis/OpenSMFS/pycorrelate.svg
        :target: https://travis-ci.org/OpenSMFS/pycorrelate

.. image:: https://ci.appveyor.com/api/projects/status/72bh25lhqq1t7gp0/branch/master?svg=true
        :target: https://ci.appveyor.com/project/tritemio/pycorrelate-s45c8/branch/master

.. image:: https://readthedocs.org/projects/pycorrelate/badge/?version=latest
        :target: https://pycorrelate.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status


**Pycorrelate** computes fast and accurate cross-correlation over
arbitrary time lags.
Cross-correlations can be calculated on "uniformly-sampled" signals
or on "point-processes", such as photon timestamps.
Pycorrelate allows computing cross-correlation at log-spaced lags covering
several orders of magnitude. This type of cross-correlation is
commonly used in physics or biophysics for techniques such as
*fluorescence correlation spectroscopy* (`FCS <https://en.wikipedia.org/wiki/Fluorescence_correlation_spectroscopy>`__) or
*dynamic light scattering* (`DLS <https://en.wikipedia.org/wiki/Dynamic_light_scattering>`__).

Two types of correlations are implemented:

- `ucorrelate <https://pycorrelate.readthedocs.io/en/latest/api.html#pycorrelate.pycorrelate.ucorrelate>`__:
  the classical textbook linear cross-correlation between two signals defined at **uniformly-spaced** intervals
  (both signals having the same interval size).
  Only positive lags are computed and a max lag can be specified.
  Thanks to the limit in the computed lags, this function can be much faster than
  `numpy.correlate <https://docs.scipy.org/doc/numpy/reference/generated/numpy.correlate.html#numpy.correlate>`__.

- `pcorrelate <https://pycorrelate.readthedocs.io/en/latest/api.html#pycorrelate.pycorrelate.pcorrelate>`__:
  cross-correlation of discrete events in a point-process
  (i.e. a series of timestamps). Input arrays are timestamps (or "positions")
  of events, for example **photon arrival times**.
  This function implements the algorithm in
  `Laurence et al. Optics Letters (2006) <https://doi.org/10.1364/OL.31.000829>`__.
  This is a generalization of the multi-tau algorithm which retains
  high execution speed while allowing arbitrary time-lag bins.

Pycorrelate is implemented in Python 3 and operates on standard numpy arrays.
Execution speed is optimized using `numba <https://numba.pydata.org/>`__.

* Free software: GNU General Public License v3
* Documentation: https://pycorrelate.readthedocs.io.