Skip to content

Commit

Permalink
Reduce required float precision of times and durations (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Sep 17, 2024
1 parent 666adf8 commit 092a6ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions spec/ndx-events.extensions.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
datasets:
- neurodata_type_def: TimestampVectorData
neurodata_type_inc: VectorData
dtype: float64
dtype: float
dims:
- num_times
shape:
Expand All @@ -13,13 +13,13 @@ datasets:
value: seconds
doc: The unit of measurement for the timestamps, fixed to 'seconds'.
- name: resolution
dtype: float64
dtype: float
doc: The smallest possible difference between two timestamps. Usually 1 divided
by the sampling rate for timestamps of the data acquisition system.
required: false
- neurodata_type_def: DurationVectorData
neurodata_type_inc: VectorData
dtype: float64
dtype: float
dims:
- num_events
shape:
Expand All @@ -31,7 +31,7 @@ datasets:
value: seconds
doc: The unit of measurement for the durations, fixed to 'seconds'.
- name: resolution
dtype: float64
dtype: float
doc: The smallest possible difference between two timestamps. Usually 1 divided
by the sampling rate for timestamps of the data acquisition system.
required: false
Expand Down
8 changes: 4 additions & 4 deletions src/spec/create_extension_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def main():
neurodata_type_def="TimestampVectorData",
neurodata_type_inc="VectorData",
doc="A 1-dimensional VectorData that stores timestamps in seconds.",
dtype="float64",
dtype="float",
dims=["num_times"],
shape=[None],
attributes=[
Expand All @@ -33,7 +33,7 @@ def main():
# maybe this should be a column of the event type table instead?
NWBAttributeSpec(
name="resolution",
dtype="float64",
dtype="float",
doc=(
"The smallest possible difference between two timestamps. Usually 1 divided by the "
"sampling rate for timestamps of the data acquisition system."
Expand All @@ -47,7 +47,7 @@ def main():
neurodata_type_def="DurationVectorData",
neurodata_type_inc="VectorData",
doc="A 1-dimensional VectorData that stores durations in seconds.",
dtype="float64",
dtype="float",
dims=["num_events"],
shape=[None],
attributes=[
Expand All @@ -60,7 +60,7 @@ def main():
# NOTE: this is usually the same as the timestamp resolution
NWBAttributeSpec(
name="resolution",
dtype="float64",
dtype="float",
doc=(
"The smallest possible difference between two timestamps. Usually 1 divided by the "
"sampling rate for timestamps of the data acquisition system."
Expand Down

0 comments on commit 092a6ad

Please sign in to comment.