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: <Please write a comprehensive title after the 'BUG: ' prefix> #1043

Closed kmahe1 closed 7 months ago

kmahe1 commented 9 months ago

Describe the issue:

I have everything installed suggested on suite2p GitHub installation for the Gun version on my Mac mini that has a M1 chip, running macOS Monterey version 12.4. When I run the sutie2p on a .tif file, it worked once but stopped working all other times. I tried uninstalling and reinstalling, but still have issues at the very end when it is just finishing the analysis and is ready to show the cell segmentation in the GUI. Please see the below attached text after running on the Gui:

Reproduce the code example:

{'data_path': ['/Users/karanmahe/Desktop/DM/Analyzed'], 'subfolders': [], 'save_path0': '/Users/karanmahe/Desktop/DM/Analyzed', 'fast_disk': '/Users/karanmahe/Desktop/DM/Analyzed', 'input_format': 'tif'}
tif
** Found 1 tifs - converting to binary **
NOTE: ScanImageTiffReader not working for this tiff type, using tifffile
>>>ERROR<<<
<tifffile.TiffPages @153656> invalid page offset 689137094
2000 frames of binary, time 1.32 sec.
4000 frames of binary, time 2.54 sec.
time 2.89 sec. Wrote 4477 frames per binary for 1 planes
>>>>>>>>>>>>>>>>>>>>> PLANE 0 <<<<<<<<<<<<<<<<<<<<<<
NOTE: not registered / registration forced with ops['do_registration']>1
      (no previous offsets to delete)
NOTE: applying default /Users/karanmahe/.suite2p/classifiers/classifier_user.npy
----------- REGISTRATION
NOTE: estimated bidiphase offset from data: 0 pixels
Reference frame, 1.46 sec.
Registered 500/4477 in 2.30s
Registered 1000/4477 in 4.48s
Registered 1500/4477 in 6.65s
Registered 2000/4477 in 8.94s
Registered 2500/4477 in 11.87s
Registered 3000/4477 in 13.84s
Registered 3500/4477 in 15.92s
Registered 4000/4477 in 18.45s
Registered 4477/4477 in 20.45s
----------- Total 23.64 sec
Registration metrics, 2.87 sec.
----------- ROI DETECTION
Binning movie in chunks of length 05
Binned movie of size [895,194,194] created in 0.24 sec.
NOTE: estimated spatial scale ~6 pixels, time epochs 1.00, threshold 5.00 
0 ROIs, score=113.13
1000 ROIs, score=8.19
2000 ROIs, score=5.15
Detected 2321 ROIs, 15.67 sec
After removing overlaps, 717 ROIs remain
----------- Total 19.16 sec.
----------- EXTRACTION
Masks created, 0.58 sec.
Extracted fluorescence from 717 ROIs in 4477 frames, 4.88 sec.
----------- Total 5.50 sec.
----------- CLASSIFICATION
['skew', 'npix_norm', 'compact']
----------- SPIKE DECONVOLUTION
----------- Total 0.14 sec.
Plane 0 processed in 51.98 sec (can open in GUI).
total = 54.91 sec.
TOTAL RUNTIME 54.91 sec
Interrupted by error (not finished)

Error message:

Interrupted by error (not finished)

Version information:

suite2p v0.14.2

Context for the issue:

I cannot use suite2p because it keeps getting interrupted by an error and I do not know what it is.

landoskape commented 8 months ago

It looks like an error was generated while processing the tiff file. Due to the way errors are handled, this will allow the code to continue, but will prevent the "finish" method (here) from opening the viewer.

You have this error -

>>>ERROR<<<
<tifffile.TiffPages @153656> invalid page offset 689137094

Can you try opening the tiff in another program? (Like FIJI or python or matlab etc) to see what's wrong with it?

chriski777 commented 8 months ago

@kmahe1, have you tried out @landoskape's suggestion? The tifffile error suggests that the .tif may be corrupted.

chriski777 commented 7 months ago

Hi @kmahe1, just checking in, have you checked out the suggestion mentioned above?

chriski777 commented 7 months ago

Hi @kmahe1, closing this issue due to inactivity. Feel free to reopen/open another issue if the problem persists!