Open h-mayorquin opened 2 months ago
Note that (2) still wouldn't be viable in this users case since it would trick them into thinking everything is working until they attempt to create a file (initialization of the interface will work quickly without error on NeuroConv, meaning the GUIDE will let them input metadata and all that)
Unless you know of how to load only a partial amount of the tiff file as an array (corresponding to the range of the get_traces
call) in that case?
There is a lot of functionality to do this in the library: https://github.com/cgohlke/tifffile/blob/d173acd27afcc26f58c489fe6b74bb831e308f93/tifffile/tifffile.py#L4383-L4393
Sadly it is not very well documented.
I am pretty sure we could work it out though if it needs be
However, there was this concerning thing a while back that puts me pause in that direction https://stackoverflow.com/questions/72581592/what-to-do-when-gohlkes-python-wheel-service-shuts-down
Which prompted: https://github.com/catalystneuro/roiextractors/issues/171
Exactly, I think best long term solution is to refactor the base tiff library to use something that is more memory friendly from the start
https://github.com/denisecailab/minian had some good examples of this as I recall
Good point!
This is related to https://github.com/catalystneuro/neuroconv/issues/995
Check out the lines: https://github.com/catalystneuro/roiextractors/blob/7592bbac765f19bcbf57b398c979fb9ee1f6c283/src/roiextractors/extractors/tiffimagingextractors/tiffimagingextractor.py#L59-L65
Sometimes this will fail because there is not enough memory.
Two options:
Where we provide a friendlier error message and the suggestion that is currently a warning.
get_video
gets called. This is likely to be a small call and the error and will avoid most problems.I suggest 1 because is easier but I think memmaps should not be dangling with the object so I think 2 is better long-term. We had some problems because of this in spikeinterface.