Skip to content

Commit

Permalink
Add nwb type descriptions to table's VariableDescription property
Browse files Browse the repository at this point in the history
  • Loading branch information
ehennestad committed Sep 17, 2024
1 parent 575f858 commit dfcbfe5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions +types/+util/+dynamictable/nwbToTable.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

% deal with DynamicTableRegion columns when index is false
[columns, remainingColumns] = deal(DynamicTable.colnames);
columnDescriptions = repmat({''}, 1, length(columns));

for i = 1:length(columns)
cn = columns{i};
Expand All @@ -61,6 +62,7 @@
else
cv = DynamicTable.vectordata.get(cn);
end
columnDescriptions{i} = cv.description;
if ~index && ...
(isa(cv,'types.hdmf_common.DynamicTableRegion') ||...
isa(cv,'types.core.DynamicTableRegion'))
Expand All @@ -85,3 +87,6 @@

% Update the columns order to be the same as the original
matlabTable = matlabTable(:, [{'id'}, columns]);

% Add variable descriptions
matlabTable.Properties.VariableDescriptions = [{''}, columnDescriptions];

0 comments on commit dfcbfe5

Please sign in to comment.