-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
category: proposalproposed enhancements or new featuresproposed enhancements or new featurespriority: lowalternative solution already working and/or relevant to only specific user(s)alternative solution already working and/or relevant to only specific user(s)
Milestone
Description
What would you like to see added to PyNWB?
This is a comment that I have gotten from various users: reading and nwbfile is not as easy as it could be.
At the moment, when I google "how to read and nwbfile", the results show a suggestion to use NWBHDF5IO. This is also what we have on the tutorial.
While the IO approach is flexible, powerful, and follows good practices (i.e., it can be used as a context manager) it also suffers from what I think are several problems that detract from usability:
- It has too many options: path, file, region, mode, manager, etc.
- It is hard to remember the name to import.
- It does not read zarr.
- It requires two method calls, first instantiating the IO and then using read on the IO.
What solution would you like?
I think that we could provide users with a simple entry point that covers most cases and leave the IO approach as the power tool behind the scenes:
from pynwb import read_nwb
nwbfile = read_nwb(file_path)I think the name is easier to remember and intuitive about what it does.
For simplicity, this function should:
- Work only paths
- Always on read mode
- Open both zarr and hdf5.
- load_namespaces=True
- If we are ambitious we can have a default streaming choice if a link to dandi s3 asset is passed.
Downsides?
Do you have any interest in helping implement the feature?
Yes.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Have you checked the Contributing document?
- Have you ensured this change was not already requested?
rly
Metadata
Metadata
Assignees
Labels
category: proposalproposed enhancements or new featuresproposed enhancements or new featurespriority: lowalternative solution already working and/or relevant to only specific user(s)alternative solution already working and/or relevant to only specific user(s)