Skip to content
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

editing nwb file -- is the recommended way to use h5py? #1874

Closed
magland opened this issue Mar 27, 2024 · 1 comment
Closed

editing nwb file -- is the recommended way to use h5py? #1874

magland opened this issue Mar 27, 2024 · 1 comment

Comments

@magland
Copy link
Contributor

magland commented Mar 27, 2024

Tagging @yarikoptic who is also interested

Suppose I want to modify something in an existing nwb file, like modifying the subject information).

Apologies if this is covered in a different issue. I did a quick search and came across this issue:
#1773

and this notebook
https://gist.github.com/rly/be7bee420b482b9ddcd084f57cc4115e

It seems this is not possible using pynwb. So do we use h5py manually instead? In that case it requires special knowledge of the spec to know that we are not breaking the validation. Is this the recommended approach?

@CodyCBakerPhD
Copy link
Collaborator

See this tutorial: https://pynwb.readthedocs.io/en/stable/tutorials/advanced_io/plot_editing.html#sphx-glr-tutorials-advanced-io-plot-editing-py

For anything outside of that, h5py must be used. With extreme caution. It's easy to create an invalid or even corrupt NWB file this way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants