suite2p
suite2p copied to clipboard
manual labeling extraction
Describe the issue:
Hi,
If I run the analysis after setting the 'anatomical_only' as 3, I cannot extract any data from manual labeling. However, if I set anatomical_only as 0, I could use manual labeling extraction function with the same data set. I'm wondering this error is normal because the analysis mode is different.
Reproduce the code example:
Traceback (most recent call last):
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\menus.py", line 22, in <lambda>
loadProc.triggered.connect(lambda: io.load_dialog(parent))
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\io.py", line 179, in load_dialog
load_proc(parent)
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\io.py", line 307, in load_proc
load_to_GUI(parent, basename, output)
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\io.py", line 332, in load_to_GUI
make_masks_and_enable_buttons(parent)
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\io.py", line 97, in make_masks_and_enable_buttons
parent.xyrat = parent.ops["diameter"][0] / parent.ops["diameter"][1]
ZeroDivisionError: division by zero
1 cells added to manual GUI
Error message:
Traceback (most recent call last):
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\drawroi.py", line 415, in proc_ROI
F, Fneu, F_chan2, Fneu_chan2, spks, ops, stat = masks_and_traces(self.parent.ops, stat0, self.parent.stat)
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\drawroi.py", line 32, in masks_and_traces
stat_all = roi_stats(stat_all, ops['Ly'], ops['Lx'], aspect=ops.get('aspect', None), diameter=ops['diameter'])
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\detection\stats.py", line 230, in roi_stats
ellipse = roi.fit_ellipse(dy, dx)
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\detection\stats.py", line 180, in fit_ellipse
return fitMVGaus(self.ypix[self.soma_crop],
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\suite2p\detection\stats.py", line 296, in fitMVGaus
radii, evec = np.linalg.eig(cov)
File "<__array_function__ internals>", line 180, in eig
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\numpy\linalg\linalg.py", line 1312, in eig
_assert_finite(a)
File "C:\Users\Minju\anaconda3\envs\suite2p\lib\site-packages\numpy\linalg\linalg.py", line 209, in _assert_finite
raise LinAlgError("Array must not contain infs or NaNs")
numpy.linalg.LinAlgError: Array must not contain infs or NaNs
Version information:
suite2p v0.12.0
Context for the issue:
No response
I also have the same problem. After I manually add ROIs, it reads 1 cell added to manual GUI, 2 cells added to manual GUI etc. However, the second I click extract ROIs, i get the same error messages ending on 'numpy.linalg.LinAlgError: Array must not contain infs or NaNs.'
I am also using anatomical = 3
what are your diameters? it looks like you have two of them, were they user-inputted?
I use the GUI, and I leave the diameter as 0. Thanks so much Carsen!