From 921d44d8714dd6ca4ff217d651db1a5f14241241 Mon Sep 17 00:00:00 2001 From: rly Date: Mon, 5 Feb 2024 10:51:12 -0800 Subject: [PATCH] Fix mapper --- src/pynwb/file.py | 2 +- src/pynwb/io/file.py | 6 ++++-- src/pynwb/nwb-schema | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pynwb/file.py b/src/pynwb/file.py index 7af0588e4..3389946ae 100644 --- a/src/pynwb/file.py +++ b/src/pynwb/file.py @@ -177,7 +177,7 @@ class NWBFile(MultiContainerInterface, HERDManager): { 'attr': 'stimulus', 'add': '_add_stimulus_internal', - 'type': (TimeSeries, DynamicTable, NWBDataInterface), + 'type': (NWBDataInterface, DynamicTable), 'get': 'get_stimulus' }, { diff --git a/src/pynwb/io/file.py b/src/pynwb/io/file.py index b5e737532..1908c6b31 100644 --- a/src/pynwb/io/file.py +++ b/src/pynwb/io/file.py @@ -31,9 +31,11 @@ def __init__(self, spec): self.unmap(stimulus_spec) self.unmap(stimulus_spec.get_group('presentation')) self.unmap(stimulus_spec.get_group('templates')) - self.map_spec('stimulus', stimulus_spec.get_group('presentation').get_neurodata_type('TimeSeries')) - self.map_spec('stimulus', stimulus_spec.get_group('presentation').get_neurodata_type('DynamicTable')) + # map "stimulus" to NWBDataInterface and DynamicTable and unmap the spec for TimeSeries because it is + # included in the mapping to NWBDataInterface + self.unmap(stimulus_spec.get_group('presentation').get_neurodata_type('TimeSeries')) self.map_spec('stimulus', stimulus_spec.get_group('presentation').get_neurodata_type('NWBDataInterface')) + self.map_spec('stimulus', stimulus_spec.get_group('presentation').get_neurodata_type('DynamicTable')) self.map_spec('stimulus_template', stimulus_spec.get_group('templates').get_neurodata_type('TimeSeries')) self.map_spec('stimulus_template', stimulus_spec.get_group('templates').get_neurodata_type('Images')) diff --git a/src/pynwb/nwb-schema b/src/pynwb/nwb-schema index c7de87a69..738ba3e81 160000 --- a/src/pynwb/nwb-schema +++ b/src/pynwb/nwb-schema @@ -1 +1 @@ -Subproject commit c7de87a6963f7b6b1d172fd6fc23db58652a6f2e +Subproject commit 738ba3e8139118413c683051ba114d8f5fea92cf