Quality metric from spike trains
Project description
slidingRefractory
Code to perform a new test of whether neurons have contaminated refractory periods, with a sliding window
Python
Installation
Install using pip:
pip install slidingRP
Install using sources in development mode. First clone the repository.
cd slidingRefractory
pip install -e .
Minimal working example
from pathlib import Path
import numpy as np
import pandas as pd
from slidingRP import metrics
# get the small test datasets from the github repository first
repo_path = "/home/ibladmin/Documents/PYTHON/int-brain-lab/slidingRefractory"
TEST_DATA_PATH = Path(repo_path).joinpath("test-data", "integration")
params = {'sampleRate': 30000, 'binSizeCorr': 1 / 30000}
spikes = pd.read_parquet(TEST_DATA_PATH.joinpath('spikes.pqt'))
table = metrics.slidingRP_all(spikes.times, spikes.clusters, **params)
assert np.allclose(pd.read_parquet(TEST_DATA_PATH.joinpath("rp_table.pqt")), pd.DataFrame(table), equal_nan=True)
Contribute
Run unit tests
pytest python/test_*
Upload package
rm -fR dist
rm -fR build
python setup.py sdist bdist_wheel
twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slidingRP-1.1.0.tar.gz
(35.5 kB
view hashes)
Built Distribution
slidingRP-1.1.0-py3-none-any.whl
(40.2 kB
view hashes)
Close
Hashes for slidingRP-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea2ce105fb8cd0e3ba51ce59bd09a8d857aa1a033f40ae148143ac973bbbb516 |
|
MD5 | 5ea5f2588f68ad4de8a3aff0e8d4c569 |
|
BLAKE2b-256 | f44d79bf16f0b41d3122818b83a1e1d1aadf455eb77e5e9a9504edc7e72f08ec |