Skip to main content

pymuvr

Overview

build status

A Python package for the fast calculation of Multi-unit Van Rossum neural spike train metrics, with the kernel-based algorithm described in Houghton and Kreuz, On the efficient calculation of Van Rossum distances (Network: Computation in Neural Systems, 2012, 23, 48-58). This package started out as a Python wrapping of the original C++ implementation given by the authors of the paper, and evolved from there with bugfixes and improvements.

Documentation

Full documentation is hosted at http://pymuvr.readthedocs.org/.

Requirements

  • Python 2.7 or 3.x.

  • NumPy>=1.7.

  • C++ development tools and Standard Library (package build-essential on Debian).

  • Python development tools (package python-dev on Debian).

Installation

To install the latest release, run:

pip install pymuvr

If you prefer installing from git, use:

git clone https://github.com/epiasini/pymuvr.git
cd pymuvr
python setup.py install

Usage

The module exposes two functions:

pymuvr.distance_matrix(observations1, observations2, cos, tau)
pymuvr.square_distance_matrix(observations, cos, tau)

distance_matrix calculates the ‘bipartite’ (rectangular) dissimilarity matrix between the multi-unit trains in observations1 and those in observations2.

square_distance_matrix calculates the ‘all-to-all’ dissimilarity matrix between each pair of trains in parallel_trains. It’s an optimised form of distance_matrix(observations, observations, cos, tau).

They both return their results as a 2D numpy array.

The observations arguments must be thrice-nested lists of spiketimes, in such a way that observations[i][j][k] represents the time of the kth spike of the jth cell of the ith observation. cos and tau are the usual parameters for the multiunit Van Rossum metric.

See examples/benchmark_versus_spykeutils.py for an example of usage comparing the performance of pymuvr with the pure Python implementation of the multiunit Van Rossum distance in spykeutils.

License

This package is licensed under version 3 of the GPL or any later version. See COPYING for details.

Getting the source

Source code for pymuvr is hosted at https://github.com/epiasini/pymuvr.

Metadata

Release files for pymuvr 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymuvr 1.2.0
File Size Uploaded
pymuvr-1.2.0.tar.gz 54.1 kB Details

Release files / pymuvr-1.2.0.tar.gz

Download URL pymuvr-1.2.0.tar.gz
Size 54.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8b5b3f3ef0f33cf27e5f6eb7048cb4f7d3cedbcea9a5d3f8921246560f34bf3a
BLAKE2b-256 checksum
How to use checksums
8f6bc8544dd346b60762666c8237224303cc909846d29c4a852eded4c3f3d243
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.3.3

1 release file

1.3.2

1.3.0

1 release file

This release

1.2.0 This release

1 release file

1.1.0

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page