Skip to content

Commit

Permalink
Fix: wrong range of histogram in drop_pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
narduzzi committed Dec 5, 2023
1 parent 3ce48ad commit f31bffc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tonic/functional/drop_pixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def identify_hot_pixel(events: np.ndarray, hot_pixel_frequency: float):
hist = np.histogram2d(
events["x"],
events["y"],
bins=(np.arange(events["y"].max() + 1), np.arange(events["x"].max() + 1)),
bins=(np.arange(events["x"].max() + 1), np.arange(events["y"].max() + 1)),
)[0]
max_occur = hot_pixel_frequency * total_time * 1e-6
hot_pixels = np.asarray((hist > max_occur).nonzero()).T
Expand Down

0 comments on commit f31bffc

Please sign in to comment.