Skip to main content

Fast and accurate timestamps correlation in python.

Project description

Pycorrelate

https://img.shields.io/pypi/v/pycorrelate.svg https://img.shields.io/travis/tritemio/pycorrelate.svg 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) or dynamic light scattering (DLS).

Two types of correlations are implemented:

  • ucorrelate: the classical text-book linear cross-correlation between two signals defined at uniformly spaced intervals. Only positive lags are computed and a max lag can be specified. Thanks to the limit in the computed lags, this function is much faster than numpy.correlate.

  • pcorrelate: cross-correlation of discrete events in a point-process. In this case input arrays can be timestamps or positions of “events”, for example photon arrival times. This function implements the algorithm in Laurence et al. Optics Letters (2006). 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.

History

0.1.0 (2017-07-23)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycorrelate-0.1.0.tar.gz (965.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page