-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I just wanted to check in on this statement from the README:
Matlab: The Matlab extension is under development.
Similar statements appear in the documentation:
The ndx-hed extension is not currently supported in MATLAB, although support is planned in the future.
and
The ndx-hed extension for MATLAB is under development and not available.
There was a recent update in MatNWB allowing quick installation of registered extensions. With the most recent release (v2.9.0) of MatNWB (on MATLAB's search path) the following command will install and generate type classes for the ndx-hed extension for use in MATLAB:
nwbInstallExtension("ndx-hed")I tested it and it works fine.
I have also tried to run the Quickstart example from the README in MatNWB and that seems to work as well:
nwb = NwbFile( ...
'session_description', "Example session with HED annotations", ...
'identifier', "example_session_001", ...
'session_start_time', datetime('now','TimeZone','local'));
hedMeta = types.ndx_hed.HedLabMetaData( ...
'hed_schema_version', '8.4.0');
nwb.general.set('hed', hedMeta);
% Build the trials TimeIntervals
trials = types.core.TimeIntervals(...
'description', 'Trials with HED annotations', ...
'colnames', {'start_time', 'stop_time'});
hedCol = types.ndx_hed.HedTags(...
'description', 'HED annotations for trials (ndx-hed)', ...
'data', []);
trials.addColumn('HED', hedCol)
trials.addRow( ...
'start_time', 0.0, ...
'stop_time', 1.0, ...
'HED', "Experimental-trial, (Sensory-event, Visual-presentation)");
% Attach and save
nwb.intervals_trials = trials;
outPath = "example_session_001_with_ndx_hed.nwb";
nwbExport(nwb, outPath);If you are aware of problems/issues related to using the extension in MatNWB, please let us now by following up here, or raising an issue on the MatNWB repo