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

Make stimulus/presentation and stimulus/templates groups (and maybe all root-level groups) optional #573

Open
rly opened this issue Mar 5, 2024 · 1 comment
Labels
category: enhancement improvements of code or code behavior priority: low alternative solution already working and/or relevant to only specific user(s)

Comments

@rly
Copy link
Contributor

rly commented Mar 5, 2024

This is the smallest of quality-of-life issues.

It would be nice if stimulus/presentation and stimulus/templates were made optional so that if empty, they are not included in the NWB file.

image image

Many (most?) NWB files do not include stimulus information. Because presentation and templates are required groups in stimulus, the stimulus group is not empty. As a result, it is not clear from looking at the raw NWB HDF5 file at the root level in common vis tools (e.g., HDFView, Neurosift) whether any stimulus data is present. I must navigate through to presentation and templates.

Similarly, but less annoying, most NWB files do not include data in the analysis group, some do not include data in acquisition, and some do not include data in processing, but all of these groups are required. (intervals, units, and scratch are already optional. general and specifications are required but always have something.) When empty, they can serve as placeholders to signal to a user that nothing is there, but at the same time, I think it would be nice/cleaner just to not have them in the first place. What do you think about making these root-level groups optional so they are only written if they have data?

@rly rly added category: enhancement improvements of code or code behavior priority: low alternative solution already working and/or relevant to only specific user(s) labels Mar 5, 2024
@oruebel
Copy link
Contributor

oruebel commented Mar 5, 2024

What do you think about making these root-level groups optional so they are only written if they have data?

My main concern is that other libraries (incl. MatNWB and PyNWB) may assume that these exist so making them optional may have unforeseen consequences.

In general, I think making them optional is a good idea to make files leaner and make it easier for external tools to create files on their own without having to create extraneous groups.

In the future, we may want to consider assigning neurodata_types to these groups to make the schema more modular, but that is a separate discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: enhancement improvements of code or code behavior priority: low alternative solution already working and/or relevant to only specific user(s)
Projects
None yet
Development

No branches or pull requests

2 participants