Skip to content

Commit 54880a4

Browse files
committed
Fix usage of spatial_filter_region_node_coordinates_in_pixels in test
1 parent a79d585 commit 54880a4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/pynwb/tests/test_optogenetics.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def test_roundtrip(self):
6565
theta_filter_reference_ntrode=1,
6666
spatial_filter_on=True,
6767
spatial_filter_lockout_period_in_samples=10,
68-
spatial_filter_region_node_coordinates_in_pixels=((260, 920), (800, 1050)),
68+
# below is an example of a single rectangular spatial filter region defined by the pixel coordinates of the
69+
# four corners
70+
spatial_filter_region_node_coordinates_in_pixels=(((260, 920), (260, 800), (800, 1050), (800, 920)), ),
6971
spatial_filter_cameras=[camera1, camera2],
7072
spatial_filter_cameras_cm_per_pixel=[0.3, 0.18],
7173
ripple_filter_on=True,
@@ -113,7 +115,7 @@ def test_roundtrip(self):
113115
assert read_epochs[0, "spatial_filter_lockout_period_in_samples"] == 10
114116
assert np.array_equal(
115117
read_epochs[0, "spatial_filter_region_node_coordinates_in_pixels"],
116-
np.array([[260, 920], [800, 1050]]),
118+
np.array((((260, 920), (260, 800), (800, 1050), (800, 920)), )),
117119
)
118120
assert read_epochs[0, "spatial_filter_cameras"] == [read_camera1, read_camera2]
119121
assert all(read_epochs[0, "spatial_filter_cameras_cm_per_pixel"] == [0.3, 0.18])

0 commit comments

Comments
 (0)