Skip to content

Commit

Permalink
Fix pixel picker for square pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Jan 27, 2022
1 parent 8298be5 commit 5a517b4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ctapipe/visualization/mpl_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,7 @@ def _on_pick(self, event):
x = self.geom.pix_x[pix_id].value
y = self.geom.pix_y[pix_id].value

if self.geom.pix_type in (PixelShape.HEXAGON, PixelShape.CIRCLE):
self._active_pixel.xy = (x, y)
else:
w = self.geom.pixel_width.value[0]
self._active_pixel.xy = (x - w / 2.0, y - w / 2.0)

self._active_pixel.xy = (x, y)
self._active_pixel.set_visible(True)
self._active_pixel_label.set_x(x)
self._active_pixel_label.set_y(y)
Expand Down

0 comments on commit 5a517b4

Please sign in to comment.