flatironinstitute / CaImAn-MATLAB

Complete Matlab pipeline for large scale calcium imaging data analysis
GNU General Public License v2.0
252 stars 147 forks source link

estimated spikes not returned by run_CNMF_patches #62

Closed jennan closed 7 years ago

jennan commented 7 years ago

Hello,

I was wondering why run_CNMF_patches do not return spikes (returns zeros), even if the user set p > 0. It seems that this behavior is enforced in the code, see https://github.com/epnev/ca_source_extraction/blob/master/run_CNMF_patches.m#L265 and is there a specific reason for that (memory consumption when using the whole dataset ?).

Thank you :-).

epnev commented 7 years ago

Hi @jennan The reason was purely computational because of the large number of components. I prefer to do some component screening prior to deconvolution outside the run_CNMF_patches, and then perform deconvolution on the sum C + YrA. But that's personal taste, you can have deconvolution inside the function. I wanted to replace the constrained_foopsi algorithm with the OASIS algorithm that solves the same problem but much faster, but haven't gotten around to do that yet.