flatironinstitute / CaImAn

Computational toolbox for large scale Calcium Imaging Analysis, including movie handling, motion correction, source extraction, spike deconvolution and result visualization.
https://caiman.readthedocs.io
GNU General Public License v2.0
639 stars 370 forks source link

What is the best way to estimate event rate in 1p using CaImAn? #1408

Open programerkotik opened 1 month ago

programerkotik commented 1 month ago

I'd like to obtain a reliable estimate of the event rate (number of calcium peaks per unit time). What would be the best way to do this using CaImAn? I have already fitted the model and computed dF/F.

Thank you! Anna

pgunn commented 1 month ago

Hello, Probably the best way to do this is to save the traces in C (there's some code in demo_pipeline showing how to do that) to a pandas dataframe or a file and after that, it should be pretty easy to iterate over the bodies you care about (or all of them) and calculate a rate.