-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
This is related to
catalystneuro/neuroconv#995
Check out the lines:
roiextractors/src/roiextractors/extractors/tiffimagingextractors/tiffimagingextractor.py
Lines 59 to 65 in 7592bba
| except ValueError: | |
| warn( | |
| "memmap of TIFF file could not be established. Reading entire matrix into memory. " | |
| "Consider using the ScanImageTiffExtractor for lazy data access." | |
| ) | |
| with tifffile.TiffFile(self.file_path) as tif: | |
| self._video = tif.asarray() |
Sometimes this will fail because there is not enough memory.
Two options:
- You can wrap this into something like this:
https://github.com/catalystneuro/neuroconv/blob/ef656a0f13607ec661b091b9569e326fc91af8db/src/neuroconv/tools/spikeinterface/spikeinterface.py#L520-L548
Where we provide a friendlier error message and the suggestion that is currently a warning.
- Another option is to delay this intialization until
get_videogets 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.
Metadata
Metadata
Assignees
Labels
No labels