Commit 035bef84 authored by vpalladi's avatar vpalladi

GUI refined and bug fixed. TODO: new graphical engine, the current is not...

GUI refined and bug fixed. TODO: new graphical engine, the current is not suitable for a full layer.
parent 9540d99a
......@@ -42,9 +42,9 @@ class HGCwordMP7 :
def __init__( self, valid=0, energy=0, wafer=0, row=0, col=0, soe_word=False, eoe_word=False ) :
self.valid = valid # 1b
self.valid = valid # 1b
self.energy = energy # 8b
self.wafer = wafer # 3b
self.wafer = wafer # 3b
self.hgc_id = HGCid(row, col) # 3b + 3b
self.is_soe_word = soe_word
......
#!/usr/bin/python
import matplotlib.path as mplPath
import matplotlib.pyplot as plt
import matplotlib.figure as pfig
from matplotlib.widgets import Button
#red = [255/255, 200/255, 200/255]
#green = [200/255, 255/255, 200/255]
blue = [200/255, 200/255, 255/255]
yellow = [255/255, 255/255, 200/255]
class SeedButton :
status = 'nonSeed'
def __init__( self ) :
print 'create button to switch between seeds and non seeds'
def build(self) :
baxes = plt.axes([0.3, 0.8, 0.07, 0.05])
self.b = Button( baxes, self.status )
self.b.color = blue
self.b.hovercolor = self.b.color
self.b.on_clicked( self.change )
#self.b.color = blue
def change(self, event) :
if self.b.color == blue :
self.b.color = yellow
self.status = 'Seed'
else :
self.b.color = blue
self.status = 'nonSeed'
self.b.hovercolor = self.b.color
self.b.label.set_text( self.status )
print 'in the class',self.status
fig, ax = plt.subplots()
fig.canvas.draw()
......@@ -22,7 +22,7 @@ from matplotlib.widgets import Button
#from modules.wafer import *
from modules.panel import *
# geometry from Paul
from Geometry.geom import *
#from Geometry.geom import *
from modules.points import *
from modules.seedButton import *
......@@ -31,11 +31,9 @@ from modules.seedButton import *
######## main ########
def main():
geom = Geometry()
WAFER_SIDE = geom.waferWidth()/math.sqrt(3.0)
WAFER_WIDTH = geom.waferWidth()
WAFER_WIDTH = 12.37 # 8'
WAFER_SIDE = WAFER_WIDTH/math.sqrt(3.0)
fig = plt.figure('Test', figsize=(17,11) )
p = Panel(WAFER_SIDE)
......
......@@ -22,7 +22,7 @@ from matplotlib.widgets import Button
#from modules.wafer import *
from modules.panel import *
# geometry from Paul
from Geometry.geom import *
#from Geometry.geom import *
from modules.points import *
from modules.seedButton import *
......@@ -35,10 +35,11 @@ def main():
if len(sys.argv) > 1 :
fileName = sys.argv[1]
geom = Geometry()
# geom = Geometry()
WAFER_WIDTH = 12.37 # 8'
WAFER_SIDE = WAFER_WIDTH/math.sqrt(3.0)
WAFER_SIDE = geom.waferWidth()/math.sqrt(3.0)
WAFER_WIDTH = geom.waferWidth()
fig = plt.figure('Test', figsize=(17,11) )
plt.ylim([-20, 15])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment