matnwb
matnwb copied to clipboard
do not write empty groups
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