Computational toolbox for large scale Calcium Imaging Analysis, including movie handling, motion correction, source extraction, spike deconvolution and result visualization.
Which demo exhibits the problem (if applicable): N/A
How you installed Caiman: Dev Mode install with Mamba
Thank you for the great code.
I use CNMF.fit, then CNMF.refit, to extract components from 2-photon GCaMP7f movies.
My neurons are non-spiking, so I skip deconvolution by setting p to 0.
The issue I'll describe occurs with method_init 'greedy_roi' and 'graph_nmf'.
My input movie is nonnegative. Negative values in the temporal components are introduced in line 214 of temporal.py, in function 'update_temporal_components', in this line:
YrA = YA - AA.T.dot(Cin).T
Later, in line 124 of deconvolution.py, in function 'constrained_foopsi', those negative values are clipped to zero in this line:
c = np.maximum(fluor, 0)
What is the meaning of the negative values after the first line? I don't understand why so much of the temporal component is getting clipped at the bottom. The clipped signal does not seem to be noise (I describe why in this post to the CaImAn Discussions forum: https://github.com/flatironinstitute/CaImAn/discussions/1252)
I don't have this problem for spiking neurons because I make p nonzero, and in that case setting bas_nonneg to False prevents the clipping of meaningful signal. But making bas_nonneg False when p=0 seems to have no effect with respect to this issue.
Is it possible to make bas_nonneg=False have an effect when p=0? Or will that cause problems?
Hi.
My setup:
Thank you for the great code.
I use CNMF.fit, then CNMF.refit, to extract components from 2-photon GCaMP7f movies.
My neurons are non-spiking, so I skip deconvolution by setting p to 0.
The issue I'll describe occurs with method_init 'greedy_roi' and 'graph_nmf'.
My input movie is nonnegative. Negative values in the temporal components are introduced in line 214 of temporal.py, in function 'update_temporal_components', in this line: YrA = YA - AA.T.dot(Cin).T
Later, in line 124 of deconvolution.py, in function 'constrained_foopsi', those negative values are clipped to zero in this line: c = np.maximum(fluor, 0)
What is the meaning of the negative values after the first line? I don't understand why so much of the temporal component is getting clipped at the bottom. The clipped signal does not seem to be noise (I describe why in this post to the CaImAn Discussions forum: https://github.com/flatironinstitute/CaImAn/discussions/1252)
I don't have this problem for spiking neurons because I make p nonzero, and in that case setting bas_nonneg to False prevents the clipping of meaningful signal. But making bas_nonneg False when p=0 seems to have no effect with respect to this issue.
Is it possible to make bas_nonneg=False have an effect when p=0? Or will that cause problems?
Thank you! Carl