Skip to content

Commit 7dd9dfe

Browse files
authored
Merge pull request #1749 from AllenInstitute/bugfix-LIMS_jobID_1056188052
WriteNWB Needs to be used by non-mesoscope data
2 parents fb96fc9 + fe71cd8 commit 7dd9dfe

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [2.3.1] = 2020-10-13
5+
6+
### Bug Fixes
7+
- (Internal) Fixed a write_nwb bug for behavior ophys experiments involving the BehaviorOphysJsonApi expecting a mesoscope-specific method.
8+
49
## [2.3.0] = 2020-10-09
510

611
### Added

allensdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838

3939

40-
__version__ = '2.3.0'
40+
__version__ = '2.3.1'
4141

4242

4343
try:

allensdk/brain_observatory/behavior/write_nwb/__main__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717

1818
class BehaviorOphysJsonApi(BehaviorOphysLimsApi):
19+
"""
20+
This class is used by both Scientifica and Mesoscope ophys experiments.
21+
"""
1922

2023
def __init__(self, data):
2124
self.data = data
@@ -96,7 +99,12 @@ def get_external_specimen_name(self):
9699
return self.data['external_specimen_name']
97100

98101
def get_imaging_plane_group(self):
99-
return self.data["imaging_plane_group"]
102+
try:
103+
# Will only contain the "imaging_plane_group" key if we are
104+
# dealing with Mesoscope data
105+
return self.data["imaging_plane_group"]
106+
except KeyError:
107+
return None
100108

101109

102110
def write_behavior_ophys_nwb(session_data, nwb_filepath):
@@ -120,7 +128,6 @@ def write_behavior_ophys_nwb(session_data, nwb_filepath):
120128
raise e
121129

122130

123-
124131
def main():
125132

126133
logging.basicConfig(format='%(asctime)s - %(process)s - %(levelname)s - %(message)s')

doc_template/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ The Allen SDK provides Python code for accessing experimental metadata along wit
9191
See the `mouse connectivity section <connectivity.html>`_ for more details.
9292

9393

94+
What's New - 2.3.1 (October 13, 2020)
95+
-----------------------------------------------------------------------
96+
As of the 2.3.1 release:
97+
98+
- (Internal) Fixed a write_nwb bug for behavior ophys experiments involving the BehaviorOphysJsonApi expecting a mesoscope-specific method.
99+
94100
What's New - 2.3.0 (October 9, 2020)
95101
-----------------------------------------------------------------------
96102
As of the 2.3.0 release:

0 commit comments

Comments
 (0)