MouseLand / suite2p

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

BUG: Registration module - 'suite2p.io' has no attribute 'BinaryRWFile' #1011

Closed ronfinn closed 1 year ago

ronfinn commented 1 year ago

Describe the issue:

Hi there, I am new to suite2p and I just ran into a probelm trying to run the individual Registration module. I am trying to run the Google Colab example (run_suite2p_colab_2021.ipynb) and running into an error during the registration step. I can't find a solution online that can resolve this. Thanks for any help.

Reproduce the code example:

# Read in raw tif corresponding to our example tif
f_raw = suite2p.io.BinaryRWFile(Ly=Ly, Lx=Lx, filename=fname)
# Create a binary file we will write our registered image to
f_reg = suite2p.io.BinaryRWFile(Ly=Ly, Lx=Lx, filename='registered_data.bin')

Error message:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-11-60c26bea4c52> in <cell line: 2>()
      1 # Read in raw tif corresponding to our example tif
----> 2 f_raw = suite2p.io.BinaryRWFile(Ly=Ly, Lx=Lx, filename=fname)
      3 # Create a binary file we will write our registered image to
      4 f_reg = suite2p.io.BinaryRWFile(Ly=Ly, Lx=Lx, filename='registered_data.bin')

AttributeError: module 'suite2p.io' has no attribute 'BinaryRWFile'

Version information:

suite2p v0.14.0

Context for the issue:

Just trying to work through the exampls

chriski777 commented 1 year ago

Hi @ronfinn, BinaryRWFile has been renamed to BinaryFile. Can you try rerunning after replacing each instance of BinaryRWFile with BinaryFile? We'll make sure to update the notebook to reflect this.

ronfinn commented 1 year ago

Thanks for your quick response!

h-mayorquin commented 3 weeks ago

Note that BinaryRawFile is still referenced in the documentation:

https://suite2p.readthedocs.io/en/latest/inputs.html#binaryrwfile