try to solve bcollect.invoke problem
This commit is contained in:
parent
6d598d9297
commit
5d073d5ad5
57
JFSphoto.py
57
JFSphoto.py
@ -406,12 +406,13 @@ class Jfsphoto (object):
|
|||||||
def toggle():
|
def toggle():
|
||||||
if self.kbtn.config('relief')[-1] == 'sunken':
|
if self.kbtn.config('relief')[-1] == 'sunken':
|
||||||
self.kbtn.config(relief='raised')
|
self.kbtn.config(relief='raised')
|
||||||
self.do_2dprint()
|
#self.do_2dprint()
|
||||||
self.proji3d=False
|
self.proji3d=False
|
||||||
else:
|
else:
|
||||||
self.kbtn.config(relief='sunken')
|
self.kbtn.config(relief='sunken')
|
||||||
self.do_3dprint()
|
#self.do_3dprint()
|
||||||
self.proji3d=True
|
self.proji3d=True
|
||||||
|
self.look()
|
||||||
|
|
||||||
win = tk.Toplevel()
|
win = tk.Toplevel()
|
||||||
self.center = tk.Frame(win, bg='gray2', width=800, height=400, padx=3, pady=3)
|
self.center = tk.Frame(win, bg='gray2', width=800, height=400, padx=3, pady=3)
|
||||||
@ -459,15 +460,15 @@ class Jfsphoto (object):
|
|||||||
win.grab_set()
|
win.grab_set()
|
||||||
win.wait_window()
|
win.wait_window()
|
||||||
|
|
||||||
def do_2dprint(self):
|
# def do_2dprint(self):
|
||||||
self.ax1 = self.fig.add_subplot(111)
|
# self.ax1 = self.fig.add_subplot(111)
|
||||||
self.look()
|
# self.look()
|
||||||
|
|
||||||
def do_3dprint(self):
|
# def do_3dprint(self):
|
||||||
self.ax1 = self.fig.gca(projection='3d')
|
# self.ax1 = self.fig.gca(projection='3d')
|
||||||
for xx in self.col_list:
|
# for xx in self.col_list:
|
||||||
self.df.plot(y = 'nmscale',x = xx, zs= int(xx), linewidth=0.6,ax=self.ax1)
|
# self.df.plot(y = 'nmscale',x = xx, zs= int(xx), linewidth=0.6,ax=self.ax1)
|
||||||
self.canvas.draw()
|
# self.canvas.draw()
|
||||||
|
|
||||||
def show_selected(self):
|
def show_selected(self):
|
||||||
self.col_list = [self.listbox.get(i) for i in self.listbox.curselection()]
|
self.col_list = [self.listbox.get(i) for i in self.listbox.curselection()]
|
||||||
@ -628,8 +629,18 @@ class Jfsphoto (object):
|
|||||||
'size': 8,
|
'size': 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
def waitfor():
|
def waitfor(x,name,val,p):
|
||||||
print('Waiting')
|
#panel.bcollect.invoke()
|
||||||
|
print('Working')
|
||||||
|
self.df['m1'] = config.rxData16
|
||||||
|
d = self.df.iloc[p]['darkline']
|
||||||
|
b = self.df.iloc[p]['baseline']
|
||||||
|
w = self.df.iloc[p]["m1"]
|
||||||
|
val[3]= np.log10(b/(d-w))
|
||||||
|
val[4]= panel.SHvalue.get()
|
||||||
|
val[5]= panel.ICGvalue.get()
|
||||||
|
tree.item(x, text=name,values=val)
|
||||||
|
|
||||||
|
|
||||||
def cb1(event):
|
def cb1(event):
|
||||||
print(panel.SHvalue.get(), panel.ICGvalue.get())
|
print(panel.SHvalue.get(), panel.ICGvalue.get())
|
||||||
@ -652,18 +663,18 @@ class Jfsphoto (object):
|
|||||||
if tk.messagebox.askokcancel(title='Messurement', message=s):
|
if tk.messagebox.askokcancel(title='Messurement', message=s):
|
||||||
panel.bcollect.invoke()
|
panel.bcollect.invoke()
|
||||||
## 3000 shoud be calculated
|
## 3000 shoud be calculated
|
||||||
panel.after(3000,waitfor)
|
panel.after(3000,waitfor(x,name,val,p))
|
||||||
print(get_duration())
|
#print(get_duration())
|
||||||
#time.sleep(3)
|
#time.sleep(3)
|
||||||
self.df['m1'] = config.rxData16
|
# self.df['m1'] = config.rxData16
|
||||||
d = self.df.iloc[p]['darkline']
|
# d = self.df.iloc[p]['darkline']
|
||||||
b = self.df.iloc[p]['baseline']
|
# b = self.df.iloc[p]['baseline']
|
||||||
w = self.df.iloc[p]["m1"]
|
# w = self.df.iloc[p]["m1"]
|
||||||
#print(d,b,w,d-w, np.log10(b/(d-w)))
|
# #print(d,b,w,d-w, np.log10(b/(d-w)))
|
||||||
val[3]= np.log10(b/(d-w))
|
# val[3]= np.log10(b/(d-w))
|
||||||
val[4]= panel.SHvalue.get()
|
# val[4]= panel.SHvalue.get()
|
||||||
val[5]= panel.ICGvalue.get()
|
# val[5]= panel.ICGvalue.get()
|
||||||
tree.item(x, text=name,values=val)
|
# tree.item(x, text=name,values=val)
|
||||||
|
|
||||||
|
|
||||||
def cb2(event):
|
def cb2(event):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user