Skip to content

Commit

Permalink
Fix mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
rly committed Feb 5, 2024
1 parent e9e93f1 commit 921d44d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pynwb/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class NWBFile(MultiContainerInterface, HERDManager):
{
'attr': 'stimulus',
'add': '_add_stimulus_internal',
'type': (TimeSeries, DynamicTable, NWBDataInterface),
'type': (NWBDataInterface, DynamicTable),
'get': 'get_stimulus'
},
{
Expand Down
6 changes: 4 additions & 2 deletions src/pynwb/io/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))

Expand Down
2 changes: 1 addition & 1 deletion src/pynwb/nwb-schema
Submodule nwb-schema updated 1 files
+4 −3 core/nwb.file.yaml

0 comments on commit 921d44d

Please sign in to comment.