matnwb icon indicating copy to clipboard operation
matnwb copied to clipboard

do not write empty groups

Open bendichter opened this issue 5 years ago • 0 comments
trafficstars

When you write an NWB file, it automatically writes all of the modality-specific groups in /general: extracellular_ephys, intracellular_ephys, optogenetics, and optophysiology. Currently, all of these groups are written, even though they are empty and the schema defines them as optional. This is not ideal, because it creates clutter in the file with HDF5 groups that are empty and irrelevant to the given data. This is also a difference between PyNWB and MatNWB that might confuse users. Would it be possible to only write groups if they are not empty?

cc @chrapkiewicz

bendichter avatar Aug 06 '20 21:08 bendichter