From fe4ecf4878b2366e8a91779d882ebe41ca1a2587 Mon Sep 17 00:00:00 2001 From: Gregor Lenz Date: Wed, 10 Jul 2024 15:09:18 -0600 Subject: [PATCH] fix issue in time surface generation where pixels without events would still result in activity --- tonic/functional/to_timesurface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tonic/functional/to_timesurface.py b/tonic/functional/to_timesurface.py index 19075fe2..54f1265f 100644 --- a/tonic/functional/to_timesurface.py +++ b/tonic/functional/to_timesurface.py @@ -33,7 +33,7 @@ def to_timesurface_numpy( event_slices = slice_events_by_time( events, time_window=dt, overlap=overlap, include_incomplete=include_incomplete ) - memory = np.zeros((sensor_size[::-1]), dtype=int) + memory = np.ones((sensor_size[::-1]), dtype=int) * -np.inf all_surfaces = [] x_index = event_slices[0].dtype.names.index("x") y_index = event_slices[0].dtype.names.index("y")