Skip to content

Commit

Permalink
Merge pull request #204 from NeurodataWithoutBorders/schema_2.2.4
Browse files Browse the repository at this point in the history
Update to Schema 2.2.4
  • Loading branch information
lawrence-mbf authored Apr 17, 2020
2 parents b0c6920 + 95a4d7e commit dba6d09
Show file tree
Hide file tree
Showing 9 changed files with 194 additions and 157 deletions.
3 changes: 2 additions & 1 deletion +tests/+system/ElectrodeGroupIOTest.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
classdef ElectrodeGroupIOTest < tests.system.PyNWBIOTest
methods
function addContainer(testCase, file) %#ok<INUSL>
dev = types.core.Device();
% Device description is for pynwb compatibility
dev = types.core.Device('description', 'dev1 description');
file.general_devices.set('dev1', dev);
eg = types.core.ElectrodeGroup( ...
'description', 'a test ElectrodeGroup', ...
Expand Down
2 changes: 1 addition & 1 deletion +tests/+system/ImagingPlaneIOTest.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
classdef ImagingPlaneIOTest < tests.system.PyNWBIOTest
methods
function addContainer(testCase, file) %#ok<INUSL>
dev = types.core.Device();
dev = types.core.Device('description', 'dev1 description');
oc = types.core.OpticalChannel( ...
'description', 'a fake OpticalChannel', ...
'emission_lambda', 3.14);
Expand Down
2 changes: 1 addition & 1 deletion +tests/+system/PhotonSeriesIOTest.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
classdef PhotonSeriesIOTest < tests.system.PyNWBIOTest & tests.system.AmendTest
methods
function addContainer(testCase, file) %#ok<INUSL>
dev = types.core.Device();
dev = types.core.Device('description', 'dev1 description');

oc = types.core.OpticalChannel( ...
'description', 'a fake OpticalChannel', ...
Expand Down
23 changes: 19 additions & 4 deletions +tests/+system/PyNWBIOTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,16 @@ class ImagingPlaneIOTest(PyNWBIOTest):
def addContainer(self, file):
dev1 = file.create_device('imaging_device_1', 'dev1 description')
oc = OpticalChannel('optchan1', 'a fake OpticalChannel', 3.14)
ip = file.create_imaging_plane('imgpln1', oc, 'a fake ImagingPlane',
dev1, 6.28, 2.718, 'GFP', 'somewhere in the brain')
ip = file.create_imaging_plane(
'imgpln1',
oc,
description = 'a fake ImagingPlane',
device = dev1,
excitation_lambda = 6.28,
indicator = 'GFP',
location = 'somewhere in the brain',
imaging_rate = 2.718)

return ip

def getContainer(self, file):
Expand All @@ -160,8 +168,15 @@ class PhotonSeriesIOTest(PyNWBIOTest):
def addContainer(self, file):
dev1 = file.create_device('dev1', 'dev1 description')
oc = OpticalChannel('optchan1', 'a fake OpticalChannel', 3.14)
ip = file.create_imaging_plane('imgpln1', oc, 'a fake ImagingPlane',
dev1, 6.28, 2.718, 'GFP', 'somewhere in the brain')
ip = file.create_imaging_plane(
'imgpln1',
oc,
description = 'a fake ImagingPlane',
device = dev1,
excitation_lambda = 6.28,
indicator = 'GFP',
location = 'somewhere in the brain',
imaging_rate = 2.718)
data = np.ones((3, 3, 3))
timestamps = list(range(10))
fov = [2.0, 2.0, 5.0]
Expand Down
2 changes: 1 addition & 1 deletion doc/+types/+core/ImagingPlane.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</tr>
<tr class="summary-item">
<td class="name">imaging_rate</td>
<td class="m-help">Rate that images are acquired, in Hz.&nbsp;</td>
<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>
</tr>
<tr class="summary-item">
<td class="name">indicator</td>
Expand Down
2 changes: 1 addition & 1 deletion doc/+types/+core/LabMetaData.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tr>
</table>
<div class="title">types.core.LabMetaData</div>
<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 -->
<div class="helptext"><pre><!--helptext --> <span class="helptopic">LabMetaData</span> Lab-specific meta-data.</pre></div><!--after help -->
<!--Class-->
<div class="sectiontitle">Class Details</div>
<table class="class-details">
Expand Down
104 changes: 57 additions & 47 deletions nwb-schema/core/nwb.file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ groups:
attributes:
- name: nwb_version
dtype: text
value: 2.2.2
value: 2.2.4
doc: File version string. Use semantic versioning, e.g. 1.2.1. This will be the
name of the format with trailing major, minor and patch numbers.
datasets:
Expand Down Expand Up @@ -93,14 +93,9 @@ groups:
doc: Any one-off tables
quantity: '*'
datasets:
- neurodata_type_def: ScratchData
neurodata_type_inc: NWBData
- neurodata_type_inc: ScratchData
doc: Any one-off datasets
quantity: '*'
attributes:
- name: notes
doc: 'Any notes the user has about the dataset being stored'
dtype: text
- name: processing
doc: "The home for ProcessingModules. These modules perform intermediate analysis\
\ of data that is necessary to perform before scientific analysis. Examples\
Expand Down Expand Up @@ -248,8 +243,7 @@ groups:
date made, injection location, volume, etc.
quantity: '?'
groups:
- neurodata_type_def: LabMetaData
neurodata_type_inc: NWBContainer
- neurodata_type_inc: LabMetaData
doc: Place-holder than can be extended so that lab-specific meta-data can be
placed in /general.
quantity: '*'
Expand All @@ -261,46 +255,10 @@ groups:
- neurodata_type_inc: Device
doc: Data acquisition devices.
quantity: '*'
- neurodata_type_def: Subject
neurodata_type_inc: NWBContainer
name: subject
- name: subject
neurodata_type_inc: Subject
doc: Information about the animal or person from which the data was measured.
quantity: '?'
datasets:
- name: age
dtype: text
doc: Age of subject. Can be supplied instead of 'date_of_birth'.
quantity: '?'
- name: date_of_birth
dtype: isodatetime
doc: Date of birth of subject. Can be supplied instead of 'age'.
quantity: '?'
- name: description
dtype: text
doc: Description of subject and where subject came from (e.g., breeder, if
animal).
quantity: '?'
- name: genotype
dtype: text
doc: Genetic strain. If absent, assume Wild Type (WT).
quantity: '?'
- name: sex
dtype: text
doc: Gender of subject.
quantity: '?'
- name: species
dtype: text
doc: Species of subject.
quantity: '?'
- name: subject_id
dtype: text
doc: ID of animal/person used/participating in experiment (lab convention).
quantity: '?'
- name: weight
dtype: text
doc: Weight at time of experiment, at time of surgery and at other important
times.
quantity: '?'
- name: extracellular_ephys
doc: Metadata related to extracellular electrophysiology.
quantity: '?'
Expand Down Expand Up @@ -427,3 +385,55 @@ groups:
neurodata_type_inc: Units
doc: Data about sorted spike units.
quantity: '?'

- neurodata_type_def: LabMetaData
neurodata_type_inc: NWBContainer
doc: Lab-specific meta-data.

- neurodata_type_def: Subject
neurodata_type_inc: NWBContainer
doc: Information about the animal or person from which the data was measured.
datasets:
- name: age
dtype: text
doc: Age of subject. Can be supplied instead of 'date_of_birth'.
quantity: '?'
- name: date_of_birth
dtype: isodatetime
doc: Date of birth of subject. Can be supplied instead of 'age'.
quantity: '?'
- name: description
dtype: text
doc: Description of subject and where subject came from (e.g., breeder, if
animal).
quantity: '?'
- name: genotype
dtype: text
doc: Genetic strain. If absent, assume Wild Type (WT).
quantity: '?'
- name: sex
dtype: text
doc: Gender of subject.
quantity: '?'
- name: species
dtype: text
doc: Species of subject.
quantity: '?'
- name: subject_id
dtype: text
doc: ID of animal/person used/participating in experiment (lab convention).
quantity: '?'
- name: weight
dtype: text
doc: Weight at time of experiment, at time of surgery and at other important
times.
quantity: '?'

datasets:
- neurodata_type_def: ScratchData
neurodata_type_inc: NWBData
doc: Any one-off datasets
attributes:
- name: notes
doc: 'Any notes the user has about the dataset being stored'
dtype: text
2 changes: 1 addition & 1 deletion nwb-schema/core/nwb.namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ namespaces:
- doc: This source module contains neurodata_type for retinotopy data.
source: nwb.retinotopy.yaml
title: Retinotopy
version: 2.2.2
version: 2.2.4
Loading

0 comments on commit dba6d09

Please sign in to comment.