From 593329b9189528f704f0d58d155901edcb5c6def Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Mon, 10 Jul 2017 09:09:52 +0200 Subject: [PATCH] Closedown --- script/setup/Layout.py | 3 ++- script/test/Layout.py | 23 ----------------------- script/test/TestLayout.py | 11 ++++++++--- 3 files changed, 10 insertions(+), 27 deletions(-) delete mode 100644 script/test/Layout.py diff --git a/script/setup/Layout.py b/script/setup/Layout.py index 6a360a7..bc64da6 100644 --- a/script/setup/Layout.py +++ b/script/setup/Layout.py @@ -1,4 +1,5 @@ - +BLOCK_ROI_TOLERANCE = 30 #mm +LED_TOLERANCE = 8 #mm Distance between LEDs = 18mm puck_layout = ( #Num Elm A0 Index A1 Uni Mini Center Angle Xuni Yuni Xmini=Xc Ymini==Yc diff --git a/script/test/Layout.py b/script/test/Layout.py deleted file mode 100644 index 0cfb606..0000000 --- a/script/test/Layout.py +++ /dev/null @@ -1,23 +0,0 @@ -from plotutils import * - -p = plot(None)[0] -p.setLegendVisible(True) -for block in get_blocks(): - print block.id - print block - (xmin, xmax) = block.x_range - (ymin, ymax) = block.y_range - r = plot_rectangle(p, xmin, ymin, xmax, ymax, name = block.id) - print r - for puck in get_pucks(block.id): - print puck.number - (xu, yu) = puck.led_uni - (xm, ym) = puck.led_mini - plot_point(p, xu, yu, size = 3, color = r.color, name = str(puck.number)+"u") - plot_point(p, xm, ym, size = 5, color = r.color, name = str(puck.number)+"m") - - - - - - \ No newline at end of file diff --git a/script/test/TestLayout.py b/script/test/TestLayout.py index 0cfb606..bc831df 100644 --- a/script/test/TestLayout.py +++ b/script/test/TestLayout.py @@ -8,14 +8,19 @@ for block in get_blocks(): (xmin, xmax) = block.x_range (ymin, ymax) = block.y_range r = plot_rectangle(p, xmin, ymin, xmax, ymax, name = block.id) - print r + + #In the first time the plot shows, it takes some time for the color to be assigned + while r.color is None: + time.sleep(0.001) + for puck in get_pucks(block.id): print puck.number (xu, yu) = puck.led_uni (xm, ym) = puck.led_mini plot_point(p, xu, yu, size = 3, color = r.color, name = str(puck.number)+"u") - plot_point(p, xm, ym, size = 5, color = r.color, name = str(puck.number)+"m") - + plot_point(p, xm, ym, size = 7, color = r.color, name = str(puck.number)+"m") + p.addText((xu+xm)/2, (yu+ym)/2, str(puck.number)) +