Skip to content

Commit dba6d09

Browse files
authored
Merge pull request #204 from NeurodataWithoutBorders/schema_2.2.4
Update to Schema 2.2.4
2 parents b0c6920 + 95a4d7e commit dba6d09

File tree

9 files changed

+194
-157
lines changed

9 files changed

+194
-157
lines changed

+tests/+system/ElectrodeGroupIOTest.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
classdef ElectrodeGroupIOTest < tests.system.PyNWBIOTest
22
methods
33
function addContainer(testCase, file) %#ok<INUSL>
4-
dev = types.core.Device();
4+
% Device description is for pynwb compatibility
5+
dev = types.core.Device('description', 'dev1 description');
56
file.general_devices.set('dev1', dev);
67
eg = types.core.ElectrodeGroup( ...
78
'description', 'a test ElectrodeGroup', ...

+tests/+system/ImagingPlaneIOTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
classdef ImagingPlaneIOTest < tests.system.PyNWBIOTest
22
methods
33
function addContainer(testCase, file) %#ok<INUSL>
4-
dev = types.core.Device();
4+
dev = types.core.Device('description', 'dev1 description');
55
oc = types.core.OpticalChannel( ...
66
'description', 'a fake OpticalChannel', ...
77
'emission_lambda', 3.14);

+tests/+system/PhotonSeriesIOTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
classdef PhotonSeriesIOTest < tests.system.PyNWBIOTest & tests.system.AmendTest
22
methods
33
function addContainer(testCase, file) %#ok<INUSL>
4-
dev = types.core.Device();
4+
dev = types.core.Device('description', 'dev1 description');
55

66
oc = types.core.OpticalChannel( ...
77
'description', 'a fake OpticalChannel', ...

+tests/+system/PyNWBIOTest.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,16 @@ class ImagingPlaneIOTest(PyNWBIOTest):
148148
def addContainer(self, file):
149149
dev1 = file.create_device('imaging_device_1', 'dev1 description')
150150
oc = OpticalChannel('optchan1', 'a fake OpticalChannel', 3.14)
151-
ip = file.create_imaging_plane('imgpln1', oc, 'a fake ImagingPlane',
152-
dev1, 6.28, 2.718, 'GFP', 'somewhere in the brain')
151+
ip = file.create_imaging_plane(
152+
'imgpln1',
153+
oc,
154+
description = 'a fake ImagingPlane',
155+
device = dev1,
156+
excitation_lambda = 6.28,
157+
indicator = 'GFP',
158+
location = 'somewhere in the brain',
159+
imaging_rate = 2.718)
160+
153161
return ip
154162

155163
def getContainer(self, file):
@@ -160,8 +168,15 @@ class PhotonSeriesIOTest(PyNWBIOTest):
160168
def addContainer(self, file):
161169
dev1 = file.create_device('dev1', 'dev1 description')
162170
oc = OpticalChannel('optchan1', 'a fake OpticalChannel', 3.14)
163-
ip = file.create_imaging_plane('imgpln1', oc, 'a fake ImagingPlane',
164-
dev1, 6.28, 2.718, 'GFP', 'somewhere in the brain')
171+
ip = file.create_imaging_plane(
172+
'imgpln1',
173+
oc,
174+
description = 'a fake ImagingPlane',
175+
device = dev1,
176+
excitation_lambda = 6.28,
177+
indicator = 'GFP',
178+
location = 'somewhere in the brain',
179+
imaging_rate = 2.718)
165180
data = np.ones((3, 3, 3))
166181
timestamps = list(range(10))
167182
fov = [2.0, 2.0, 5.0]

doc/+types/+core/ImagingPlane.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
</tr>
7171
<tr class="summary-item">
7272
<td class="name">imaging_rate</td>
73-
<td class="m-help">Rate that images are acquired, in Hz.&nbsp;</td>
73+
<td class="m-help">Rate that images are acquired, in Hz. If the corresponding TimeSeries is present, the rate should be stored there instead.&nbsp;</td>
7474
</tr>
7575
<tr class="summary-item">
7676
<td class="name">indicator</td>

doc/+types/+core/LabMetaData.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</tr>
1717
</table>
1818
<div class="title">types.core.LabMetaData</div>
19-
<div class="helptext"><pre><!--helptext --> <span class="helptopic">LabMetaData</span> Place-holder than can be extended so that lab-specific meta-data can be placed in /general.</pre></div><!--after help -->
19+
<div class="helptext"><pre><!--helptext --> <span class="helptopic">LabMetaData</span> Lab-specific meta-data.</pre></div><!--after help -->
2020
<!--Class-->
2121
<div class="sectiontitle">Class Details</div>
2222
<table class="class-details">

nwb-schema/core/nwb.file.yaml

Lines changed: 57 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ groups:
77
attributes:
88
- name: nwb_version
99
dtype: text
10-
value: 2.2.2
10+
value: 2.2.4
1111
doc: File version string. Use semantic versioning, e.g. 1.2.1. This will be the
1212
name of the format with trailing major, minor and patch numbers.
1313
datasets:
@@ -93,14 +93,9 @@ groups:
9393
doc: Any one-off tables
9494
quantity: '*'
9595
datasets:
96-
- neurodata_type_def: ScratchData
97-
neurodata_type_inc: NWBData
96+
- neurodata_type_inc: ScratchData
9897
doc: Any one-off datasets
9998
quantity: '*'
100-
attributes:
101-
- name: notes
102-
doc: 'Any notes the user has about the dataset being stored'
103-
dtype: text
10499
- name: processing
105100
doc: "The home for ProcessingModules. These modules perform intermediate analysis\
106101
\ of data that is necessary to perform before scientific analysis. Examples\
@@ -248,8 +243,7 @@ groups:
248243
date made, injection location, volume, etc.
249244
quantity: '?'
250245
groups:
251-
- neurodata_type_def: LabMetaData
252-
neurodata_type_inc: NWBContainer
246+
- neurodata_type_inc: LabMetaData
253247
doc: Place-holder than can be extended so that lab-specific meta-data can be
254248
placed in /general.
255249
quantity: '*'
@@ -261,46 +255,10 @@ groups:
261255
- neurodata_type_inc: Device
262256
doc: Data acquisition devices.
263257
quantity: '*'
264-
- neurodata_type_def: Subject
265-
neurodata_type_inc: NWBContainer
266-
name: subject
258+
- name: subject
259+
neurodata_type_inc: Subject
267260
doc: Information about the animal or person from which the data was measured.
268261
quantity: '?'
269-
datasets:
270-
- name: age
271-
dtype: text
272-
doc: Age of subject. Can be supplied instead of 'date_of_birth'.
273-
quantity: '?'
274-
- name: date_of_birth
275-
dtype: isodatetime
276-
doc: Date of birth of subject. Can be supplied instead of 'age'.
277-
quantity: '?'
278-
- name: description
279-
dtype: text
280-
doc: Description of subject and where subject came from (e.g., breeder, if
281-
animal).
282-
quantity: '?'
283-
- name: genotype
284-
dtype: text
285-
doc: Genetic strain. If absent, assume Wild Type (WT).
286-
quantity: '?'
287-
- name: sex
288-
dtype: text
289-
doc: Gender of subject.
290-
quantity: '?'
291-
- name: species
292-
dtype: text
293-
doc: Species of subject.
294-
quantity: '?'
295-
- name: subject_id
296-
dtype: text
297-
doc: ID of animal/person used/participating in experiment (lab convention).
298-
quantity: '?'
299-
- name: weight
300-
dtype: text
301-
doc: Weight at time of experiment, at time of surgery and at other important
302-
times.
303-
quantity: '?'
304262
- name: extracellular_ephys
305263
doc: Metadata related to extracellular electrophysiology.
306264
quantity: '?'
@@ -427,3 +385,55 @@ groups:
427385
neurodata_type_inc: Units
428386
doc: Data about sorted spike units.
429387
quantity: '?'
388+
389+
- neurodata_type_def: LabMetaData
390+
neurodata_type_inc: NWBContainer
391+
doc: Lab-specific meta-data.
392+
393+
- neurodata_type_def: Subject
394+
neurodata_type_inc: NWBContainer
395+
doc: Information about the animal or person from which the data was measured.
396+
datasets:
397+
- name: age
398+
dtype: text
399+
doc: Age of subject. Can be supplied instead of 'date_of_birth'.
400+
quantity: '?'
401+
- name: date_of_birth
402+
dtype: isodatetime
403+
doc: Date of birth of subject. Can be supplied instead of 'age'.
404+
quantity: '?'
405+
- name: description
406+
dtype: text
407+
doc: Description of subject and where subject came from (e.g., breeder, if
408+
animal).
409+
quantity: '?'
410+
- name: genotype
411+
dtype: text
412+
doc: Genetic strain. If absent, assume Wild Type (WT).
413+
quantity: '?'
414+
- name: sex
415+
dtype: text
416+
doc: Gender of subject.
417+
quantity: '?'
418+
- name: species
419+
dtype: text
420+
doc: Species of subject.
421+
quantity: '?'
422+
- name: subject_id
423+
dtype: text
424+
doc: ID of animal/person used/participating in experiment (lab convention).
425+
quantity: '?'
426+
- name: weight
427+
dtype: text
428+
doc: Weight at time of experiment, at time of surgery and at other important
429+
times.
430+
quantity: '?'
431+
432+
datasets:
433+
- neurodata_type_def: ScratchData
434+
neurodata_type_inc: NWBData
435+
doc: Any one-off datasets
436+
attributes:
437+
- name: notes
438+
doc: 'Any notes the user has about the dataset being stored'
439+
dtype: text

nwb-schema/core/nwb.namespace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ namespaces:
5757
- doc: This source module contains neurodata_type for retinotopy data.
5858
source: nwb.retinotopy.yaml
5959
title: Retinotopy
60-
version: 2.2.2
60+
version: 2.2.4

0 commit comments

Comments
 (0)