kinetics ok
This commit is contained in:
parent
1b2a03b7f6
commit
acc728eab8
@ -291,7 +291,7 @@ class buildpanel(tk.Frame):
|
|||||||
self.jf.df['baseline']=self.jf.baseData16
|
self.jf.df['baseline']=self.jf.baseData16
|
||||||
self.jf.df['darkline']=self.jf.darkData16
|
self.jf.df['darkline']=self.jf.darkData16
|
||||||
self.jf.df['nmscale']=self.jf.nmData16
|
self.jf.df['nmscale']=self.jf.nmData16
|
||||||
self.jf.do_math()
|
self.jf.do_math(self)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
55
JFSphoto.py
55
JFSphoto.py
@ -123,8 +123,11 @@ class Jfsphoto (object):
|
|||||||
######### jfs math
|
######### jfs math
|
||||||
self.ok = tk.IntVar()
|
self.ok = tk.IntVar()
|
||||||
self.ok.set(0)
|
self.ok.set(0)
|
||||||
|
self.akt_point=0
|
||||||
|
self.akt_nm = 0
|
||||||
######### jfs methods
|
######### jfs methods
|
||||||
self.methods = []
|
self.methods = []
|
||||||
|
|
||||||
|
|
||||||
def do_calibrate(self):
|
def do_calibrate(self):
|
||||||
win = tk.Toplevel()
|
win = tk.Toplevel()
|
||||||
@ -397,35 +400,43 @@ class Jfsphoto (object):
|
|||||||
except IOError:
|
except IOError:
|
||||||
print("By the great otter!","No config.ini file")
|
print("By the great otter!","No config.ini file")
|
||||||
|
|
||||||
|
def draw_slice(self):
|
||||||
def do_math(self,panel):
|
self.ax2.clear()
|
||||||
|
if self.akt_point > 0:
|
||||||
def onclick(event):
|
|
||||||
self.ax2.clear()
|
|
||||||
print('%s click: button=%d, xdata=%f, ydata=%f' %('double' if event.dblclick else 'single', event.button,
|
|
||||||
event.xdata, event.ydata))
|
|
||||||
x=[]
|
x=[]
|
||||||
y=[]
|
y=[]
|
||||||
for xx in self.col_list:
|
for xx in self.col_list:
|
||||||
x.append(int(xx))
|
x.append(int(xx))
|
||||||
yy = event.xdata
|
|
||||||
p = int((yy - self.nm_left)*(1/self.nm_step))
|
|
||||||
if self.ok.get() < 3:
|
if self.ok.get() < 3:
|
||||||
yy = self.df.iloc[p][xx]
|
yy = self.df.iloc[self.akt_point][xx]
|
||||||
elif self.ok.get()==3:
|
elif self.ok.get()==3:
|
||||||
yy = self.df.iloc[p][xx+'_abs']
|
yy = self.df.iloc[self.akt_point][xx+'_abs']
|
||||||
elif self.ok.get()==4:
|
elif self.ok.get()==4:
|
||||||
yy = self.df.iloc[p][xx+'_trans']
|
yy = self.df.iloc[self.akt_point][xx+'_trans']
|
||||||
y.append(yy)
|
y.append(yy)
|
||||||
self.ax2.plot(x, y, linewidth=0.6)
|
self.ax2.plot(x, y, linewidth=0.6)
|
||||||
self.canvas.draw()
|
self.ax2.set_title(f'{round(self.akt_nm,2)} [nm]')
|
||||||
|
self.canvas.draw()
|
||||||
|
|
||||||
|
def do_math(self,panel):
|
||||||
|
|
||||||
|
def onclick(event):
|
||||||
|
#print('%s click: button=%d, xdata=%f, ydata=%f' %('double' if event.dblclick else 'single', event.button,
|
||||||
|
# event.xdata, event.ydata))
|
||||||
|
if event.button == 3:
|
||||||
|
self.akt_nm=0
|
||||||
|
self.akt_point=0
|
||||||
|
else:
|
||||||
|
self.akt_nm = event.xdata
|
||||||
|
self.akt_point = int((self.akt_nm - self.nm_left)*(1/self.nm_step))
|
||||||
|
self.draw_slice()
|
||||||
|
|
||||||
def on_key_press(event):
|
def on_key_press(event):
|
||||||
print("you pressed {}".format(event.key))
|
print("you pressed {}".format(event.key))
|
||||||
key_press_handler(event, self.canvas, self.toolbar1)
|
key_press_handler(event, self.canvas, self.toolbar1)
|
||||||
|
|
||||||
#print(panel.SHvalue.get())
|
|
||||||
#panel.bcollect.invoke()
|
|
||||||
stati = [("Raw",1),("Raw + Baseline",2),("Transmission",4),("Absorbanz",3)]
|
stati = [("Raw",1),("Raw + Baseline",2),("Transmission",4),("Absorbanz",3)]
|
||||||
self.proji3d = False
|
self.proji3d = False
|
||||||
|
|
||||||
@ -494,16 +505,6 @@ class Jfsphoto (object):
|
|||||||
win.grab_set()
|
win.grab_set()
|
||||||
win.wait_window()
|
win.wait_window()
|
||||||
|
|
||||||
# def do_2dprint(self):
|
|
||||||
# self.ax1 = self.fig.add_subplot(111)
|
|
||||||
# self.look()
|
|
||||||
|
|
||||||
# def do_3dprint(self):
|
|
||||||
# self.ax1 = self.fig.gca(projection='3d')
|
|
||||||
# for xx in self.col_list:
|
|
||||||
# self.df.plot(y = 'nmscale',x = xx, zs= int(xx), linewidth=0.6,ax=self.ax1)
|
|
||||||
# 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()]
|
||||||
self.look()
|
self.look()
|
||||||
@ -585,6 +586,7 @@ class Jfsphoto (object):
|
|||||||
|
|
||||||
|
|
||||||
def look(self):
|
def look(self):
|
||||||
|
self.draw_slice()
|
||||||
self.ax1.clear()
|
self.ax1.clear()
|
||||||
if self.proji3d==True:
|
if self.proji3d==True:
|
||||||
self.ax1 = self.fig.add_subplot(2,3,(1,5),projection='3d')
|
self.ax1 = self.fig.add_subplot(2,3,(1,5),projection='3d')
|
||||||
@ -891,6 +893,7 @@ class Jfsphoto (object):
|
|||||||
lb3.grid(column=0,row=7,sticky='w')
|
lb3.grid(column=0,row=7,sticky='w')
|
||||||
#### canvas
|
#### canvas
|
||||||
fig = plt.Figure(figsize=(4,2),dpi=100)
|
fig = plt.Figure(figsize=(4,2),dpi=100)
|
||||||
|
plt.rcParams.update({'font.size': 5})
|
||||||
ax1 = fig.add_subplot(111)
|
ax1 = fig.add_subplot(111)
|
||||||
canvas = FigureCanvasTkAgg(fig, master = win )
|
canvas = FigureCanvasTkAgg(fig, master = win )
|
||||||
canvas.get_tk_widget().grid(column=1,row=0,sticky='nesw')
|
canvas.get_tk_widget().grid(column=1,row=0,sticky='nesw')
|
||||||
|
|||||||
3695
KV_3_50_20_40.csv
Normal file
3695
KV_3_50_20_40.csv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user