convert calcium trace to spikes
Project description
Deconvolve calcium imaging data to spikes. A wrapper around Chenkov and McColgan so it’s easier to use their model and weights. Assuming you have a imageJ roi measurement csv file, and a known sample_rate of your two photon recording:
import numpy as np
from ca2spike import deconvolve
calcium_data = np.genfromtxt(file_path, delimiter=',')[1:, 1::4].T
spike_data, timestamps, new_sample_rate = deconvolve(data, sample_rate)
Here the new sample rate is just a rounded int, coz otherwise your analysis experience will suck.
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
ca2spike-0.1.3.tar.gz
(107.7 kB
view details)
File details
Details for the file ca2spike-0.1.3.tar.gz
.
File metadata
- Download URL: ca2spike-0.1.3.tar.gz
- Upload date:
- Size: 107.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9875e4eff9f4556559f480e9b0bdb1904bee0ad991c0acd912b2e9d6daca0b15 |
|
MD5 | d4c57c14e671eea8c44931b00df5e652 |
|
BLAKE2b-256 | c241cbf77db3fc2dd26e129ca9a6e3142f90cbc94221a5e5ce5260032cc3801d |