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

bas_nonneg=False when p=0 #1361

Open wienecke opened 5 months ago

wienecke commented 5 months ago

Hi.

My setup:

  1. Operating System: MacOS
  2. Hardware type, RAM: M1 Pro, 16 GB
  3. Python Version: 3.11.8
  4. Caiman version: 1.10.5
  5. Which demo exhibits the problem (if applicable): N/A
  6. How you installed Caiman: Dev Mode install with Mamba

Thank you for the great code.

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