Skip to content

Commit c81734c

Browse files
committed
add othher new fields to tests
1 parent a6b1795 commit c81734c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/pynwb/tests/test_optogenetics.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import numpy as np
22
from pynwb import NWBHDF5IO
33
from pynwb.testing.mock.file import mock_NWBFile
4+
from pynwb.testing.mock.base import mock_TimeSeries
45
from unittest import TestCase
56

67
from ndx_franklab_novela import FrankLabOptogeneticEpochsTable, CameraDevice
@@ -11,6 +12,9 @@ class TestFrankLabOptogeneticsEpochsTable(TestCase):
1112
def test_roundtrip(self):
1213
nwbfile = mock_NWBFile()
1314

15+
stimulus = mock_TimeSeries()
16+
nwbfile.add_stimulus(stimulus)
17+
1418
camera1 = CameraDevice(
1519
name="overhead_run_camera 1",
1620
description="Camera used for tracking running",
@@ -68,7 +72,10 @@ def test_roundtrip(self):
6872
ripple_filter_lockout_period_in_samples=10,
6973
ripple_filter_threshold_sd=5.0,
7074
ripple_filter_num_above_threshold=4,
75+
speed_filter_on=True,
76+
speed_filter_threshold_in_cm_per_s=10.0,
7177
speed_filter_on_above_threshold=True,
78+
stimulus_signal=stimulus,
7279
)
7380
nwbfile.add_time_intervals(opto_epochs)
7481

@@ -114,3 +121,7 @@ def test_roundtrip(self):
114121
assert read_epochs[0, "ripple_filter_lockout_period_in_samples"] == 10
115122
assert read_epochs[0, "ripple_filter_threshold_sd"] == 5.0
116123
assert read_epochs[0, "ripple_filter_num_above_threshold"] == 4
124+
assert read_epochs[0, "speed_filter_on"]
125+
assert read_epochs[0, "speed_filter_threshold_in_cm_per_s"] == 10.0
126+
assert read_epochs[0, "speed_filter_on_above_threshold"]
127+
assert read_epochs[0, "stimulus_signal"].object_id == stimulus.object_id

0 commit comments

Comments
 (0)