Open EvanKirshenbaum opened 8 months ago
I'm not sure that you're doing anything wrong, but you may want to put whatever adjustment you have into map_coord()
, as that's supposed to be the conversion from the (lower left hand corner) of a pad to canvas coordinates.
My understanding is that with the joey board the y-axis goes from to bottom to top and in the opendrop it goes from top to bottom.
The coordinates are being converted in the
map_coord()
method of theBoardMonitor
class before being passed to matplot lib. Therefore, for the Tkinter canvas I convert the y coordinates like so:This works great, the rectangles are getting drawn correctly. I verify like so: I give each pad in the
PadMonitor
class a unique id, and in thenote_state()
method I change the color of an activated pad to green by its id rather than by coordinates.This ensures that I am activating the correct pad. If I were to do this by coordinates, the pad could still be mirrored and I could actually activate the wrong pad.
The only thing that is not correct is the wells created by
_make_shape()
of theWellPadMonitor
class. Those are shifted down by 1 coordinate as it seems:Opendrop:
this is how it is supposed to look like:
If I substract 1 from each y coordinate of that shape, it looks correct:
What am I doing wrong?
Migrated from internal repository. Originally created by Mark Huber on Jul 01, 2022 at 5:03 PM PDT.