diff --git a/CCDpanelsetup.py b/CCDpanelsetup.py index 0ac2816..69d59bc 100644 --- a/CCDpanelsetup.py +++ b/CCDpanelsetup.py @@ -306,10 +306,14 @@ class buildpanel(tk.Frame): self.jfs4nm_check.grid(row=shicg_row-1,column=4,sticky='w',padx=4) self.jfsdark = tk.Button(self,text='save Dark',image=self.jf.bulbOff,compound=tk.LEFT,fg="blue", command= darkline) self.jfsdark.grid(row=shicg_row,column=4,sticky='e',padx=4) + self.jfsdarkhp = tk.Button(self,text='?',command=lambda roots=self, helpfor=2: jfshelpme(roots,helpfor)) + self.jfsdarkhp.grid(row=shicg_row,column=5,sticky='e',padx=4) self.jfsdark_check = tk.Checkbutton(self,text="Darkline on/off",variable=self.jf.darkline_checked,state=tk.DISABLED,command=lambda CCDplot=CCDplot: self.updateplot(CCDplot)) self.jfsdark_check.grid(row=shicg_row+1,column=4,sticky='w') self.jfsbase = tk.Button(self,text='save Base',image=self.jf.bulbOn,compound=tk.LEFT,fg="blue", command= baseline) self.jfsbase.grid(row=shicg_row+2,column=4,sticky='e',padx=4) + self.jfsdarkhp = tk.Button(self,text='?',command=lambda roots=self, helpfor=3: jfshelpme(roots,helpfor)) + self.jfsdarkhp.grid(row=shicg_row+2,column=5,sticky='e',padx=4) self.jfsbase_check = tk.Checkbutton(self,text="Baseline on/off",variable=self.jf.baseline_checked,state=tk.DISABLED,command=lambda CCDplot=CCDplot: self.updateplot(CCDplot)) self.jfsbase_check.grid(row=shicg_row+3,column=4,sticky='w') self.jfsbase_absorption = tk.Radiobutton(self,text="Absorbanz [E]",variable=self.jf.abs_trans,value=0,state=tk.DISABLED,command=lambda CCDplot=CCDplot: self.updateplot(CCDplot)) @@ -318,6 +322,8 @@ class buildpanel(tk.Frame): self.jfsbase_transmission.grid(row=avg_row,column=4,sticky='e') self.jfspdsave = tk.Button(self,text='save Data',fg="blue", command=self.jf.save_pandas) self.jfspdsave.grid(row=col_row,column=4,sticky='e',padx=4) + self.jfssavehp = tk.Button(self,text='?',command=lambda roots=self, helpfor=4: jfshelpme(roots,helpfor)) + self.jfssavehp.grid(row=col_row,column=5,sticky='e',padx=4) self.jfspdload = tk.Button(self,text='load Data',fg="blue", command=loaddata) self.jfspdload.grid(row=col_row+1,column=4,sticky='e',padx=4) #### LabelFrame @@ -333,6 +339,8 @@ class buildpanel(tk.Frame): self.jfskinl2.grid(row=1,column=0,sticky='w') self.jfspkine2 = tk.Entry(self.jfslf1,textvariable=kin_repeats,width=4) self.jfspkine2.grid(row=1,column=1,sticky='e') + self.jfskinhp = tk.Button(self,text='?',command=lambda roots=self, helpfor=5: jfshelpme(roots,helpfor)) + self.jfskinhp.grid(row=plt_row,column=5,sticky='e',padx=4) self.jfspdmath = tk.Button(self.jfslf1,text='Math',fg="blue", command=lambda JFSphoto=Jfsphoto: self.jf.do_math(self)) self.jfspdmath.grid(row=2,column=0,sticky='w') self.jfspdmeth = tk.Button(self,text='Methods',fg="blue", command=lambda JFSphoto=Jfsphoto: self.jf.do_methods(self)) diff --git a/JFShelp.py b/JFShelp.py index 1583376..9bb6f25 100644 --- a/JFShelp.py +++ b/JFShelp.py @@ -26,6 +26,7 @@ import os import tkinter as tk +from tkinter.constants import END from PIL import Image,ImageTk def center_window(size, window) : @@ -110,6 +111,39 @@ def jfshelpme(win,helpfor): text.insert(tk.END,"\n\nKinetic\n",'h2') text.insert(tk.END,"\nThe instrument can messure in specific intervalls over time the change in absorbance. From this data it is possible to determine the rate of the reaction.\n") text.image_create(tk.END,image=photoImg3) + elif (helpfor == 2): + text.insert(tk.END," Dark spectrum\n",'h1') + text.insert(tk.END,"\nPlease turn off the lightsource and take a messurement with the actual parameter. Afterwards save this spektrum of the dark noise\n") + text.insert(tk.END,"\nClick the checkbutton of [Darkline] to proceed") + elif (helpfor == 3): + text.insert(tk.END," Zero solution \n",'h1') + text.insert(tk.END,"\nIn order to messure the absorbance or transmittance of a sample, you need to messure a zero solution first\n") + text.insert(tk.END,"\n1) Check the darkline checkbutton\n2) Turn on the lightsource and insert a cuvette with a solution without a compound -> \'zero solution\'\n") + text.insert(tk.END,"3) Save the messurement with [save Base]. This will also cut the range of messurement depending of the lightsoure -> Baseline\n" ) + text.insert(tk.END,"4) Click the checkbutton of [Baseline] to proceed\n") + text.insert(tk.END,"Now you can messure the absorbance or transmittance of different compounds by using the radiobuttons \n") + text.insert(tk.END,"\nWith the Dialog [Calibration] you can change the range of the lightsource\n\n") + text.insert(tk.END,"\n Baseline\n",'h2') + text.insert(tk.END,"\nIn order to messure the absorption of a compound in the cuvette, you have to messure the intensity of the the light passing through the reference cell.\n") + text.insert(tk.END,"The intensity of the light at a specific wavelength depends on the kind of lightsource. The spectrum of a tungstone lamp is different from a LED etc.\n") + text.insert(tk.END,"\nTo make things easy: the value cuts off the beginning and the end where the lightsource is not strong enought to give reasonable results ") + text.image_create(tk.END,image=photoImg4) + text.insert(tk.END,"\nFor example xenon-lamp as a source. If the value of the threshold is set to 100 (green), the baseline will start at 380nm and end at 510nm\n") + text.insert(tk.END,"If the value of the threshold is set to 50 (red), the baseline will start at 370nm and end at 695nm. The baseline determines the range of messurement\n") + elif (helpfor == 4): + text.insert(tk.END," Load / Save \n",'h1') + text.insert(tk.END,"\nThese Buttons save und load the photometer data of the absorbance of a compound. The baseline of the lightsource and the dark spectrum of the instrument will also be saved\n") + text.insert(tk.END,"\nThis will not work with with simple spetra saves over the [Save] button") + elif (helpfor == 5): + text.image_create(tk.END,image=photoImg3) + text.insert(tk.END,"\nKinetic\n",'h1') + text.insert(tk.END,"\nTo run kinetic messurements with this photometer, make sure that:\n") + text.insert(tk.END,"1) The instrument is calibrated\n2) A dark spektrum is taken/saved [save Dark]\n3) A zero solution is messured a saved [save Base].\n\n") + text.insert(tk.END,"If all parameters a ok. Adjust the numbers of repetitions and the time between the messurement in the dialog.\nThe [start Kinetic] Button will start the process.\n") + text.insert(tk.END,"When the messurement is finished the [Math] Dialog appears and the data can be saved and inspected.\n") + elif (helpfor == 6): + #text.image_create(tk.END,image=photoImg3) + text.insert(tk.END,"\nMath on Kinetics\n",'h1') ### at the end text.config(state=tk.DISABLED) top.focus_set() diff --git a/JFSphoto.py b/JFSphoto.py index 9df9e95..bacdc19 100644 --- a/JFSphoto.py +++ b/JFSphoto.py @@ -523,14 +523,18 @@ class Jfsphoto (object): self.listbox.grid(row=7,column=0,sticky='w') self.kbtn1 = tk.Button(master=self.ctr_right,text="show selected",command=self.show_selected,width=15) self.kbtn1.grid(row=14,column=0,sticky="w") + self.kbtn2 = tk.Button(master=self.ctr_right,text="clear selected",command=self.clear_selected,width=15) + self.kbtn2.grid(row=15,column=0,sticky="w") self.kbtn = tk.Button(master=self.ctr_right,text="Load Kinetic / Data",command=self.load_kinetics,width=15) - self.kbtn.grid(row=15,column=0,sticky="w") - self.kbtn = tk.Button(master=self.ctr_right,text="Save Kinetic / Data",command=self.save_kinetics,width=15) self.kbtn.grid(row=16,column=0,sticky="w") - self.kbtn = tk.Button(master=self.ctr_right,text="3 D Print",command=toggle,width=15,relief='raised') + self.kbtn = tk.Button(master=self.ctr_right,text="Save Kinetic / Data",command=self.save_kinetics,width=15) self.kbtn.grid(row=17,column=0,sticky="w") + self.kbtn = tk.Button(master=self.ctr_right,text="3 D Print",command=toggle,width=15,relief='raised') + self.kbtn.grid(row=18,column=0,sticky="w") self.kbtm = tk.Button(master=self.ctr_right,text="ln[A] 1/[A]",command=togglelog,width=15) - self.kbtm.grid(row=18,column=0,sticky="w") + self.kbtm.grid(row=19,column=0,sticky="w") + self.kbtmhp = tk.Button(master=self.ctr_right,text="Help me",command=lambda roots = win ,helpfor=6: jfshelpme(roots,helpfor),width=15) + self.kbtmhp.grid(row=20,column=0,sticky="w") if self.calculate() : self.show_first_look() else: @@ -543,6 +547,13 @@ class Jfsphoto (object): win.grab_set() win.wait_window() + def clear_selected(self): + self.listbox.selection_clear(0,'end') + #self.get_kin_list() + self.col_list = list(self.listbox.get(0,tk.END)) + self.look() + + def show_selected(self): self.col_list = [self.listbox.get(i) for i in self.listbox.curselection()] self.look() diff --git a/images/3d.gif b/images/3d.gif new file mode 100644 index 0000000..44370ef Binary files /dev/null and b/images/3d.gif differ diff --git a/images/absorb.gif b/images/absorb.gif new file mode 100644 index 0000000..1a1a9c5 Binary files /dev/null and b/images/absorb.gif differ diff --git a/images/raw.gif b/images/raw.gif new file mode 100644 index 0000000..7fd163f Binary files /dev/null and b/images/raw.gif differ diff --git a/images/raw_base.gif b/images/raw_base.gif new file mode 100644 index 0000000..461a82a Binary files /dev/null and b/images/raw_base.gif differ