Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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

Download files

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

Files for ca2spike, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size ca2spike-0.1.3.tar.gz (107.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page