MouseLand / suite2p

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

How to opt out of non-rigid registration? #1019

Closed shclair closed 1 year ago

shclair commented 1 year ago

Discussed in https://github.com/MouseLand/suite2p/discussions/1018

Originally posted by **shclair** August 11, 2023 Alright- I do not know much about Python, but we are trying to see if S2P will work for our data! So I am going through step by step to see what it does, but I am running into an error. It might be that I don't fully understand but if anyone can help that would be great. S2P suggests that if rigid registration does not work, then you can run nonrigid registration- which leads me to think that non-rigid registration should not be happening automatically. however the default is always set to "1" nonrigid: (bool, default: True) whether or not to perform non-rigid registration, which splits the field of view into blocks and computes registration offsets in each block separately. https://suite2p.readthedocs.io/en/latest/settings.html However, when I try to set it to 0 (false, which I might assume means do not run), then suite2p cannot finish due to an error Is anyone familiar with this? Is it possible to opt out of non-rigid registration? What am I misunderstanding? Thank you! ERROR<<< exec(code, run_globals) File “C:\Users\shcla\anaconda3\envs\suite2p\lib\site-packages\suite2p_main_.py”, line 78, in main() File “C:\Users\shcla\anaconda3\envs\suite2p\lib\site-packages\suite2p_main_.py”, line 71, in main run_s2p(ops, db) File “C:\Users\shcla\anaconda3\envs\suite2p\lib\site-packages\suite2p\run_s2p.py”, line 429, in run_s2p op = run_plane(op, ops_path=ops_path) File “C:\Users\shcla\anaconda3\envs\suite2p\lib\site-packages\suite2p\run_s2p.py”, line 292, in run_plane ops = pipeline(f_reg, f_raw, f_reg_chan2, f_raw_chan2, run_registration, ops, stat=stat) File “C:\Users\shcla\anaconda3\envs\suite2p\lib\site-packages\suite2p\run_s2p.py”, line 78, in pipeline registration_outputs = registration.register.registration_wrapper(f_reg, f_raw=f_raw, f_reg_chan2=f_reg_chan2, f_raw_chan2=f_raw_chan2, File “C:\Users\shcla\anaconda3\envs\suite2p\lib\site-packages\suite2p\registration\register.py”, line 615, in registration_wrapper yoff1, xoff1, corrXY1 = nonrigid_offsets ValueError: not enough values to unpack (expected 3, got 0) Interrupted by error (not finished) ![Screenshot 2023-08-10 152944](https://github.com/MouseLand/suite2p/assets/142034208/3787172d-9a49-467a-aded-b961461bf915)
shclair commented 1 year ago

well, I figured out that I was not using the latest version and a reinstallation (which had it's own issues thanks) solved this issue