-
Notifications
You must be signed in to change notification settings - Fork 15
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
only metadata #71
Comments
how are you currently doing it? The following should be minimal: import nd2
with nd2.ND2File('some_file.nd2') as f:
f.attributes # nd2.structures.Attributes
f.metadata # nd2.structures.Metadata
f.experiment # List[nd2.structures.ExpLoop]
f.text_info # dict of misc info
f.custom_data # mishmash of data extracted from file |
This basically how I do it, just without the context manager:
Opening the (large) file takes a few seconds, so I was assuming that image data is being prepared there already. Happy to close the issue if that's not the case. |
Oh I just noticed you’re on 0.2.2, can you update and try again? |
Yes, with 0.2.5, opening the file takes a fraction of a second instead of multiple seconds. Thanks very much! |
excellent! you might also try, with v0.3.0: import nd2
with nd2.ND2File(..., read_using_sdk=True):
# get your metadata I'd be curious to hear what you find there regarding performance. Backstory: However, that "greedy" inspection of the chunkmap was what led to your original performance hit observations. While that was fixed in 0.2.5, the new ... if we eventually find that |
cool, thanks. Yes I just tried 0.3.0 and get the following results (tested the script in duplicate):
|
Description
Is there a way to open a file only for reading metadata, without the overhead generated by preparing to read image data?
The text was updated successfully, but these errors were encountered: