Skip to content

Commit

Permalink
Merge pull request #765 from NeurodataWithoutBorders/spk_event_series…
Browse files Browse the repository at this point in the history
…_timestamps

make timestamps required for SpikeEventSeries
  • Loading branch information
ajtritt authored Dec 19, 2018
2 parents fc2a7bd + 61ba149 commit b851088
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/pynwb/data/nwb.ecephys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,25 @@ groups:
- - null
- null
- null
- name: timestamps
dtype: float64
doc: 'Timestamps for samples stored in data.COMMENT: Timestamps here have all
been corrected to the common experiment master-clock. Time is stored as seconds
and all timestamps are relative to experiment start time. This is added here so
that the timestamps is required for SpikeEventTimes.'
attributes:
- name: interval
dtype: int32
doc: Value is '1'
value: 1
- name: unit
dtype: text
doc: Value is 'Seconds'
value: Seconds
dims:
- num_times
shape:
- null
- neurodata_type_def: ClusterWaveforms
neurodata_type_inc: NWBDataInterface
doc: 'The mean waveform shape, including standard deviation, of the different clusters.
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/pynwb_tests/test_ephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ def test_init(self):
np.testing.assert_array_equal(sES.data, data)
np.testing.assert_array_equal(sES.timestamps, timestamps)

def test_no_rate(self):
table = make_electrode_table()
region = DynamicTableRegion('electrodes', [1, 3], 'the second and fourth electrodes', table)
data = np.zeros(10)
with self.assertRaises(TypeError):
SpikeEventSeries('test_sES', data, region, rate=1.) # noqa: F405


class ElectrodeGroupConstructor(unittest.TestCase):
def test_init(self):
Expand Down

0 comments on commit b851088

Please sign in to comment.