Skip to content

Commit b72fa28

Browse files
authored
Implement NWBEP001 (add EventsTable and more)
1 parent 362c095 commit b72fa28

File tree

7 files changed

+151
-2
lines changed

7 files changed

+151
-2
lines changed

core/nwb.base.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ groups:
188188
"step" because the picture remains the same until the next timepoint. This field is optional,
189189
but is useful in providing information about the underlying data. It may inform the way this
190190
data is interpreted, the way it is visualized, and what analysis methods are applicable.
191+
Use of "instantaneous" in this field is DEPRECATED. Use an EventsTable to store
192+
instantaneous event information instead.
191193
required: false
192194
- name: starting_time
193195
dtype: float64

core/nwb.behavior.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ groups:
6666
- neurodata_type_def: BehavioralEvents
6767
neurodata_type_inc: NWBDataInterface
6868
default_name: BehavioralEvents
69-
doc: TimeSeries for storing behavioral events. See description of BehavioralEpochs
69+
doc: DEPRECATED. Use an EventsTable instead.
70+
TimeSeries for storing behavioral events. See description of BehavioralEpochs
7071
for more details.
7172
groups:
7273
- neurodata_type_inc: TimeSeries

core/nwb.event.yaml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
datasets:
2+
- neurodata_type_def: TimestampVectorData
3+
neurodata_type_inc: VectorData
4+
dtype: float
5+
dims:
6+
- num_times
7+
shape:
8+
- null
9+
doc: A 1-dimensional VectorData that stores timestamps in seconds.
10+
attributes:
11+
- name: unit
12+
dtype: text
13+
value: seconds
14+
doc: The unit of measurement for the timestamps, fixed to 'seconds'.
15+
- name: resolution
16+
dtype: float
17+
doc: The smallest possible difference between two timestamps. Usually 1 divided
18+
by the sampling rate for timestamps of the data acquisition system.
19+
required: false
20+
21+
- neurodata_type_def: DurationVectorData
22+
neurodata_type_inc: VectorData
23+
dtype: float
24+
dims:
25+
- num_events
26+
shape:
27+
- null
28+
doc: A 1-dimensional VectorData that stores durations in seconds.
29+
attributes:
30+
- name: unit
31+
dtype: text
32+
value: seconds
33+
doc: The unit of measurement for the durations, fixed to 'seconds'.
34+
- name: resolution
35+
dtype: float
36+
doc: The smallest possible difference between two timestamps. Usually 1 divided
37+
by the sampling rate for timestamps of the data acquisition system.
38+
required: false
39+
40+
- neurodata_type_def: CategoricalVectorData
41+
neurodata_type_inc: VectorData
42+
dims:
43+
- num_events
44+
shape:
45+
- null
46+
doc: A 1-dimensional VectorData that stores categorical data of any type. This is
47+
an experimental type.
48+
attributes:
49+
- name: meanings
50+
dtype:
51+
target_type: MeaningsTable
52+
reftype: object
53+
doc: The MeaningsTable object that provides the meanings of the values in this
54+
CategoricalVectorData object.
55+
- name: filter_values
56+
dtype: text
57+
dims:
58+
- num_events
59+
shape:
60+
- null
61+
doc: Optional dataset containing possible values in the parent data that represent
62+
missing or invalid values that should be filtered out during analysis. Currently,
63+
only string values are allowed. For example, the filter values may contain the
64+
values "undefined" or "None" to signal that those values in the data are missing
65+
or invalid.
66+
required: false
67+
68+
groups:
69+
- neurodata_type_def: MeaningsTable
70+
neurodata_type_inc: DynamicTable
71+
doc: A table to store information about the meanings of categorical data. Intended
72+
to be used as a lookup table for the meanings of values in a CategoricalVectorData
73+
object. All possible values of the parent CategoricalVectorData object should
74+
be present in the 'value' column of this table, even if the value is not observed
75+
in the data. Additional columns may be added to store additional metadata about
76+
each value.
77+
datasets:
78+
- name: value
79+
neurodata_type_inc: VectorData
80+
doc: The value of the parent CategoricalVectorData object.
81+
- name: meaning
82+
neurodata_type_inc: VectorData
83+
dtype: text
84+
doc: The meaning of the value in the parent CategoricalVectorData object.
85+
86+
- neurodata_type_def: EventsTable
87+
neurodata_type_inc: DynamicTable
88+
doc: A column-based table to store information about events (event instances), one
89+
event per row. Additional columns may be added to store metadata about each event,
90+
such as the duration of the event.
91+
attributes:
92+
- name: description
93+
dtype: text
94+
doc: A description of the events stored in the table, including information about
95+
how the event times were computed, especially if the times are the result of
96+
processing or filtering raw data. For example, if the experimenter is encoding
97+
different types of events using a strobed or N-bit encoding, then the description
98+
should describe which channels were used and how the event time is computed,
99+
e.g., as the rise time of the first bit.
100+
datasets:
101+
- name: timestamp
102+
neurodata_type_inc: TimestampVectorData
103+
doc: Column containing the time that each event occurred, in seconds, from the
104+
session start time.
105+
- name: duration
106+
neurodata_type_inc: DurationVectorData
107+
doc: Optional column containing the duration of each event, in seconds. A value
108+
of NaN can be used for events without a duration or with a duration that is
109+
not yet specified.
110+
quantity: '?'
111+
groups:
112+
- neurodata_type_inc: MeaningsTable
113+
doc: Lookup tables for the meanings of the values in any CategoricalVectorData
114+
columns. The name of the table should be the name of the corresponding CategoricalVectorData
115+
column followed by "_meanings".
116+
quantity: '*'
117+
118+
- neurodata_type_def: AnnotationsTable
119+
neurodata_type_inc: EventsTable
120+
doc: A column-based table to store user annotations about events, one event per row.
121+
If annotations come from a fixed set of values (aka controlled vocabulary or enumeration),
122+
make the "annotation" column a CategoricalVectorData and add a MeaningsTable named
123+
"annotation_meanings" to specify the meanings of the fixed set of values in the
124+
"annotation" column.
125+
datasets:
126+
- name: annotation
127+
neurodata_type_inc: VectorData
128+
doc: Column containing the freeform text annotation.
129+
dtype: text
130+
dims:
131+
- num_times
132+
shape:
133+
- null

core/nwb.file.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ groups:
393393
- neurodata_type_inc: TimeIntervals
394394
doc: Optional additional table(s) for describing other experimental time intervals.
395395
quantity: '*'
396+
- name: events
397+
doc: Events that occurred during the session.
398+
groups:
399+
- neurodata_type_inc: EventsTable
400+
doc: Events that occurred during the session.
401+
quantity: '*'
396402
- name: units
397403
neurodata_type_inc: Units
398404
doc: Data about sorted spike units.

core/nwb.misc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ groups:
4747

4848
- neurodata_type_def: AnnotationSeries
4949
neurodata_type_inc: TimeSeries
50-
doc: Stores user annotations made during an experiment. The data[]
50+
doc: DEPRECATED. Use an AnnotationsTable instead. Stores user annotations made during an experiment. The data[]
5151
field stores a text array, and timestamps are stored for each annotation (ie,
5252
interval=1). This is largely an alias to a standard TimeSeries storing a text
5353
array but that is identifiable as storing annotations in a machine-readable way.

core/nwb.namespace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ namespaces:
2828
- doc: This source module contains neurodata_types for epoch data.
2929
source: nwb.epoch.yaml
3030
title: Epochs
31+
- doc: This source module contains neurodata_types for event data.
32+
source: nwb.event.yaml
33+
title: Events
3134
- doc: This source module contains neurodata_types for image data.
3235
source: nwb.image.yaml
3336
title: Image data

docs/format/source/format_release_notes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Major changes
1414
neurodata type that extends ``DynamicTable`` with added columns. (#539, #624)
1515
- Changed ``DecompositionSeries.bands`` from a generic ``DynamicTable`` with added columns to a new ``FrequencyBandsTable`` neurodata type that extends ``DynamicTable`` with added columns. (#610)
1616

17+
- Implemented NWBEP001 -- Added new neurodata types ``EventsTable``, ``AnnotationsTable``, ``TimestampsVectorData``, ``DurationVectorData``, ``CategoricalVectorData``, and ``MeaningsTable``.
18+
- Deprecated the use of "instantaneous" for ``TimeSeries/data.continuity``.
19+
- Deprecated ``BehavioralEvents`` in favor of placing ``EventsTable`` tables in ``NWBFile/events``.
20+
1721
Minor changes
1822
^^^^^^^^^^^^^
1923
- Made group quantities consistent ("1 or more") across data interfaces / wrapper types (#613)

0 commit comments

Comments
 (0)