neuroinformatics-unit / derotation

Derotate images acquired via 2-photon or 3-photon calcium imaging
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

Investigate ValueError warning coming from tiffile #19

Open lauraporta opened 3 months ago

lauraporta commented 3 months ago

Is your feature request related to a problem? Please describe. When running the pipeline, tiffile.imread raises a warning regarding a reshaping tentative failed.

Describe the solution you'd like Understand if it comes from a misuse of the package and in that way remove the warning

Describe alternatives you've considered Leaving it as it is - tiffile seams to handle whatever problem there is and returns me the correct file

Additional context Logs:

2024-07-25 16:28:26 PM INFO     2024-07-25 16:28:26 PM - INFO - MainProcess       fancylog.py:326
                                fancylog.py:326 - Starting logging                               
                       INFO     2024-07-25 16:28:26 PM - INFO - MainProcess       fancylog.py:327
                                fancylog.py:327 - Not logging multiple processes                 
                       INFO     2024-07-25 16:28:26 PM - INFO -     full_rotation_pipeline.py:122
                                MainProcess                                                      
                                full_rotation_pipeline.py:122 -                                  
                                Loading data...                                                  
2024-07-25 16:28:29 PM WARNING  2024-07-25 16:28:29 PM - WARNING - MainProcess   tifffile.py:4539
                                tifffile.py:4539 - <tifffile.TiffFile                            
                                'rotation_00001.tif'> <asarray> failed to                        
                                reshape (8258, 256, 256) to (8500, 256, 256),                    
                                raised ValueError('cannot reshape array of size                  
                                541196288 into shape (8500,256,256)') 
lauraporta commented 2 weeks ago

It kills my process on the cluster 😭