-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
category: proposaldiscussion of proposed enhancements or new featuresdiscussion of proposed 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)topic: matnwb-apirelated to improving the matnwb apirelated to improving the matnwb api
Description
What would you like to see added to MatNWB?
Many NWB types are containers for other types, with two examples being ProcessingModule
and Fluorescence
.
The syntax for setting/getting data for these containers is cumbersome:
ophys_module = types.core.ProcessingModule('description', 'contains optical physiology data')
ophys_module.nwbdatainterface.set('ImageSegmentation', img_seg);
and
fluorescence = types.core.Fluorescence();
fluorescence.roiresponseseries.set('RoiResponseSeries', roi_response_series);
ophys_module.nwbdatainterface.set('Fluorescence', fluorescence);
A simpler way of doing this would be:
ophys_module = types.core.ProcessingModule('description', 'contains optical physiology data')
ophys_module('ImageSegmentation') = img_seg;
and
fluorescence = types.core.Fluorescence();
fluorescence('RoiResponseSeries') = roi_response_series;
ophys_module('Fluorescence') = fluorescence;
A similar suggestion was raised in pynwb (issue #1993) and it would be great to mirror this on the matnwb side.
Edge cases to consider:
- Spaces in neurodata type names. Use matlab.lang.makeValidName('my dataset') and internal mapping of names
- Reading datatypes where name is the same as the generated property name in matnwb. (See issue [Bug]: Constructing "container" class with name-value pair where name matches property name does not work #676 )
- Type with multiple un-named subgroups (currently only relevant for ProcessingModule). What if the same name is added to more than one subgroup? Is this related to this comment?
Is your feature request related to a problem?
No response
What solution would you like?
Redefine container classes to have dictionary
/Set
like behavior, while also restricting the types it is allowed to hold
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 ensured this change was not already requested?
bendichter
Metadata
Metadata
Assignees
Labels
category: proposaldiscussion of proposed enhancements or new featuresdiscussion of proposed 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)topic: matnwb-apirelated to improving the matnwb apirelated to improving the matnwb api