From d0c40686b0eddcb4d071b418e1c29b3af58e00a6 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Thu, 11 Jan 2024 15:37:35 -0800 Subject: [PATCH] Update OptogeneticSeries to allow 2D data (#1812) Co-authored-by: Steph Prince <40640337+stephprince@users.noreply.github.com> --- CHANGELOG.md | 2 +- src/pynwb/nwb-schema | 2 +- src/pynwb/ogen.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce8e3dec6..c2f32d315 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### Enhancements and minor changes - Added support for NWB schema 2.7.0. - ... - - ... + - Modified `OptogeneticSeries` to allow 2D data, primarily in extensions of `OptogeneticSeries`. @rly [#1812](https://github.com/NeurodataWithoutBorders/pynwb/pull/1812) - ... - ... - For `NWBHDF5IO()`, change the default of arg `load_namespaces` from `False` to `True`. @bendichter [#1748](https://github.com/NeurodataWithoutBorders/pynwb/pull/1748) diff --git a/src/pynwb/nwb-schema b/src/pynwb/nwb-schema index b4f8838cb..b8806738f 160000 --- a/src/pynwb/nwb-schema +++ b/src/pynwb/nwb-schema @@ -1 +1 @@ -Subproject commit b4f8838cbfbb7f8a117bd7e0aad19133d26868b4 +Subproject commit b8806738fa0d125970459628d81e0c18da896a1f diff --git a/src/pynwb/ogen.py b/src/pynwb/ogen.py index f410b4235..af11842e4 100644 --- a/src/pynwb/ogen.py +++ b/src/pynwb/ogen.py @@ -37,8 +37,9 @@ class OptogeneticSeries(TimeSeries): __nwbfields__ = ('site',) @docval(*get_docval(TimeSeries.__init__, 'name'), # required - {'name': 'data', 'type': ('array_data', 'data', TimeSeries), 'shape': (None, ), # required - 'doc': 'The data values over time. Must be 1D.'}, + {'name': 'data', 'type': ('array_data', 'data', TimeSeries), # required + 'shape': [(None, ), (None, None)], + 'doc': 'The data values over time.'}, {'name': 'site', 'type': OptogeneticStimulusSite, # required 'doc': 'The site to which this stimulus was applied.'}, *get_docval(TimeSeries.__init__, 'resolution', 'conversion', 'timestamps', 'starting_time', 'rate',