MouseLand / suite2p

cell detection in calcium imaging recordings
http://www.suite2p.org
GNU General Public License v3.0
334 stars 239 forks source link

BUG: module 'suite2p' has no attribute 'default_ops' #1078

Closed ronfinn closed 4 months ago

ronfinn commented 5 months ago

Describe the issue:

HI there,

I am trying to run the example notebook on https://github.com/MouseLand/suite2p/blob/main/jupyter/run_suite2p_colab_2023.ipynb

and I am running into the following error: module 'suite2p' has no attribute 'default_ops'

I have tried some of the other solution I could find on here such as

from suite2p import default_ops

and I get:


ImportError Traceback (most recent call last) Cell In[24], line 1 ----> 1 from suite2p import default_ops

ImportError: cannot import name 'default_ops' from 'suite2p' (unknown location)

Any suggestions on how I can fix this or investigate it further?

Thanks in advance for any help.

Reproduce the code example:

ops = suite2p.default_ops()
ops['batch_size'] = 200 # we will decrease the batch_size in case low RAM on computer
ops['threshold_scaling'] = 2.0 # we are increasing the threshold for finding ROIs to limit the number of non-cell ROIs found (sometimes useful in gcamp injections)
ops['fs'] = 13 # sampling rate of recording, determines binning for cell detection
ops['tau'] = 1.25 # timescale of gcamp to use for deconvolution
print(ops)

Error message:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[25], line 1
----> 1 ops = suite2p.default_ops()
      2 ops['batch_size'] = 200 # we will decrease the batch_size in case low RAM on computer
      3 ops['threshold_scaling'] = 2.0 # we are increasing the threshold for finding ROIs to limit the number of non-cell ROIs found (sometimes useful in gcamp injections)

AttributeError: module 'suite2p' has no attribute 'default_ops'

Version information:

!suite2p --version suite2p v0.14.3

Context for the issue:

No response

chriski777 commented 4 months ago

Hi @ronfinn, sorry for the late reply. Are you running this locally or on Google Colab? If you're running it locally, I'd first make sure that you're in the proper environment that has the latest version of suite2p installed. What does suite2p.__file__ return in your notebook? Does the output match where the latest version of suite2p is installed?

chriski777 commented 4 months ago

Closing this issue due to inactivity. @ronfinn, feel free to reopen if this issue has not been solved yet.