-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API for file handle #331
Comments
Should add the file handle as an item of the dictionary returned by |
I am scratching my head on this. What is benefits of not closing file? especially when using lazy signals (datasets larger than RAM)? Tracking through the rabbit hole I see that it has something to do with Tiffs. How with open (filepath, "rb") as fhandle:
do stuff which closes file automatically after that block of code. |
For reading data non-lazily, the file is closed when the file is finished to read. For loading lazily, the file is kept open to be able to access the data - if the file is closed, dask will complain.
This is what this discussion is about. At the moment,
Yes, only hdf5 and tif files can be closed explicitly with hyperspy. |
What if we put the original file into the metadata or added it to the signal dictionary. Would that be slightly better as we could just track the initial object.
Originally posted by @CSSFrancis in #317 (comment)
The text was updated successfully, but these errors were encountered: