def __init__(self, genitore): self.plot = Frame(genitore) self.plot.pack(fill=BOTH) self.quadro_PlotP1 = LabelFrame(self.plot, text="Plotp1") self.quadro_PlotP1.pack(side=TOP, expand=YES, anchor=N, fill=X) self.quadro_PlotP1.grid_columnconfigure(0, weight=1) self.quadro_PlotP1.grid_columnconfigure(1, weight=1) self.quadro_n1Bu = LabelFrame(self.quadro_PlotP1, text="Compare") self.quadro_n1Bu.grid(column=0, row=0, sticky=N + E + W + S) self.n1_PlSa_But = ut.PloteSaveB(self.quadro_n1Bu, ext="", comment=["Compare single spectra\n"], title="sample") self.n1_PlSa_But.Button_plot.configure(command=self.Compare) self.n1_PlSa_But.Button_save.configure(command=self.Compare_save) self.quadro_n2Bu = LabelFrame(self.quadro_PlotP1, text="chisq") self.quadro_n2Bu.grid(column=1, row=0, sticky=N + E + W + S) self.n2_PlSa_But = ut.PloteSaveB(self.quadro_n2Bu, ext="", comment=["chisq evolution\n"], title="Residuals") self.quadro_n3Bu = LabelFrame(self.quadro_PlotP1, text="Coeff.") self.quadro_n3Bu.grid(column=0, row=1, sticky=N + E + W + S) self.n3_PlSa_But = ut.PloteSaveB(self.quadro_n3Bu, ext="", comment=["coefficent\n"], title="Coeff.", error=True, xlabel="spectra", ylabel="Fraction") self.quadro_n4Bu = LabelFrame(self.quadro_PlotP1, text="Sum of coeff.") self.quadro_n4Bu.grid(column=1, row=1, sticky=N + E + W + S) self.n4_PlSa_But = ut.PloteSaveB(self.quadro_n4Bu, ext="", comment=["Sum of coeff.\n"], title="# Sum of coeff., error", error=True)
def __init__(self, genitore): #------------------------------- declare ---------------------------------------------- self.synch_title = StringVar() #define the label of plot self._plot = StringVar() #define the type of plot self.prop_label = ('index') #,'elapsed time: min','elapsed time: sec' #--------------------------------- set ------------------------------------------ self.synch_title.set("") self._plot.set("index") self.prop_label = ('index') #,'elapsed time: min','elapsed time: sec' #--------------------------------- plot T1 ------------------------------------------ self.quadro_plot = LabelFrame( genitore, text="synch. plot") #,text = "Correction" self.quadro_plot.pack(side=TOP, fill=X, pady=3, ipadx=5, ipady=3) self.combo_plot = ttk.Combobox(self.quadro_plot, state="readonly", textvariable=self._plot, values=self.prop_label) self.combo_plot.bind('<<ComboboxSelected>>', self.Synchplot) self.combo_plot.pack(side=LEFT, anchor=E, pady=5, padx=5, ipadx=1) self.Plot_PlSa_But = ut.PloteSaveB( self.quadro_plot, ext="", comment=None, title="pippo ") #str(self.synch_title))
def __init__(self, genitore): #--------------declare---------------------- self._deriv_end = StringVar() self._deriv_start = StringVar() self.smoot = 0 self.interpolation = 0 if num_deriv: self.smoot_repeat = 0 self.smoot = 1 self._INTxan_start = StringVar() self._INTxan_end = StringVar() self._check_deriv = IntVar() self._check_xan = IntVar() self._check_INT = IntVar() self._xflatten = IntVar() #--------------set--------------------------------- self._xflatten.set(1) self._check_xan.set(1) self._check_deriv.set(1) #------------------------------------------------------ #----------------Quadro Derivative------------------------------------- self.quadro_derivative = LabelFrame( genitore, text="XANES Derivative") #,text = "Correction" self.quadro_derivative.pack(side=TOP, fill=X, pady=3, ipadx=5, ipady=3) self.derivfrom = LabelFrame(self.quadro_derivative, text="from") self.derivfrom.pack(side=LEFT, fill=X, ipady=2, anchor=W, padx=2, expand=Y) self._entry_derivfrom = Entry(self.derivfrom, width=7, textvariable=self._deriv_start) self._entry_derivfrom.pack(side=LEFT, padx=5, ipady=3, fill=X, expand=YES) Label(self.derivfrom, text="eV", justify=LEFT).pack(side=LEFT, anchor=W) self.derivto = LabelFrame(self.quadro_derivative, text="to ") self.derivto.pack(side=LEFT, fill=X, ipady=2, anchor=W, padx=2, expand=Y) #, expand = YES self._entry_derivto = Entry(self.derivto, width=7, textvariable=self._deriv_end) self._entry_derivto.pack(side=LEFT, padx=5, ipady=3, fill=X, expand=YES) Label(self.derivto, text="eV", justify=LEFT).pack(side=LEFT, anchor=W) #Frame(self.quadro_derivative).pack(side = LEFT,expand =Y) self.button_derivative_default = Button(self.quadro_derivative, command=self.DERIVparam, text="smoot&interp", background="violet", width=10, padx="3m", pady="2m") self.button_derivative_default.pack(side=LEFT, anchor=W, padx=5, pady=5) self.derivate_PlSa_But = ut.PloteSaveB(self.quadro_derivative, [], [], ext="Der", comment=None, xlabel='energy (eV)', ylabel='f\'(mu) (abs. unit)', title="DERIVATIVE") #----------------Quadro Max Derivative------------------------------------- self.quadro_Max_Derivative = Frame(genitore) #,text = "Correction" self.quadro_Max_Derivative.pack(side=TOP, fill=X) self.quadro_Max_Derivative1 = LabelFrame( self.quadro_Max_Derivative, text="Derivate Max") #,text = "Correctio self.quadro_Max_Derivative1.pack(side=LEFT, fill=X, expand=Y) self.quadro_Max_Derivative2 = Frame(self.quadro_Max_Derivative1) self.quadro_Max_Derivative2.pack(side=LEFT, anchor=W, fill=X, expand=Y) self.Max_PlSa_But = ut.PloteSaveB(self.quadro_Max_Derivative2, [PPset.x], [], ext=None, comment=None, xlabel='spectra', ylabel='position (eV)', title="max derivative position") #----------------QuadroXan------------------------------------- self.quadro_xanes = LabelFrame( genitore, text="XANES Normalization") #,text = "Correction" self.quadro_xanes.pack(side=TOP, fill=X, pady=3, ipadx=5, ipady=3) self.check_flat = Checkbutton(self.quadro_xanes, text="Flatten", variable=self._xflatten) self.check_flat.pack(side=LEFT, expand=YES, fill=BOTH, anchor=N, ipadx=1, ipady=1) self.button_xanes_default = Button(self.quadro_xanes, command=self.XANESparam, text="XANES param.", background="violet", width=10, padx="3m", pady="2m") self.button_xanes_default.pack(side=LEFT, anchor=W, padx=5, pady=5) #ATTENZIONE self.Xanes_PlSa_But = ut.PloteSaveB(self.quadro_xanes, [], [], xlabel='energy (eV)', ylabel='normalized mu', ext="Nor", comment=None, title="XANES") #--------------------------------------iffeffit--------------------------------------------------- self.quadro_Iffefit = Frame(genitore) #,text = "Correction" self.quadro_Iffefit.pack(side=TOP, fill=X) self.quadro_Eo = LabelFrame(self.quadro_Iffefit, text="Ifeffit E0") #,text = "Correction" self.quadro_Eo.pack(side=LEFT, fill=X, expand=Y) self.quadro_Eo1 = Frame(self.quadro_Eo) self.quadro_Eo1.pack(side=LEFT, anchor=W, fill=X, expand=Y) #ATTENZIONE self.Eo_PlSa_But = ut.PloteSaveB(self.quadro_Eo1, [], [], ext=None, xlabel='spectra', ylabel='position (eV)', comment=None, title="Iff Eo") self.quadro_Ej = LabelFrame( self.quadro_Iffefit, text="Ifeffit edge jump") #,text = "Correction" self.quadro_Ej.pack(side=LEFT, fill=X, expand=Y) self.quadro_Ej1 = Frame(self.quadro_Ej) self.quadro_Ej1.pack(side=LEFT, anchor=W, fill=X, expand=Y) self.Ej_PlSa_But = ut.PloteSaveB(self.quadro_Ej, [], [], xlabel='spectra', ylabel='Edge jump (abs. unit)', ext=None, comment=None, title="Edge jump") #------------------------------------Integralof Nor. XANES self.quadro_INTxan = LabelFrame( genitore, text="Integralof Nor. XANES") #,text = "Correction" self.quadro_INTxan.pack(side=TOP, fill=X, pady=3, ipadx=5, ipady=3) self.INTfrom = LabelFrame(self.quadro_INTxan, text="from") self.INTfrom.pack(side=LEFT, expand=YES, fill=BOTH, anchor=W, ipady=5) self._entry_INTfrom = Entry(self.INTfrom, width=7, textvariable=self._INTxan_start) self._entry_INTfrom.pack(side=LEFT, padx=5, ipady=3, fill=X, expand=YES) Label(self.INTfrom, text="eV ", justify=LEFT).pack(side=LEFT, anchor=W) self.INTto = LabelFrame(self.quadro_INTxan, text="to ") self.INTto.pack(side=LEFT, expand=YES, fill=BOTH, anchor=W, ipady=5) #, expand = YES self._entry_INTto = Entry(self.INTto, width=7, textvariable=self._INTxan_end) self._entry_INTto.pack(side=LEFT, padx=5, ipady=3, fill=X, expand=YES) Label(self.INTto, text="eV ", justify=LEFT).pack(side=LEFT, anchor=W) self.quadro_INTxan2 = Frame(self.quadro_INTxan) self.quadro_INTxan2.pack(side=TOP, fill=X) self.INTxan_PlSa_But = ut.PloteSaveB( self.quadro_INTxan, [PPset.x], [], xlabel='spectra', ylabel='Integral values (abs. unit)', ext=None, comment=None, title="Integral") #--------------------------------------Perform--------------------------------------------------- self.quadro_perform = LabelFrame(genitore) #,text = "Correction" self.quadro_perform.pack(side=BOTTOM, fill=X, expand=YES) self.button_xan_per = Button(self.quadro_perform, command=self.Perform, text="Perform", background="green", width=10, padx="3m", pady="2m") self.button_xan_per.pack(side=LEFT, anchor=W, padx=5, pady=5) self.check_deriv = Checkbutton(self.quadro_perform, text="Derivative", variable=self._check_deriv) self.check_deriv.pack(side=LEFT, fill=Y, anchor=W, ipady=1, padx=5) self.check_xan = Checkbutton(self.quadro_perform, text="XanNorm", variable=self._check_xan) self.check_xan.pack(side=LEFT, fill=Y, anchor=W, ipady=1, padx=5) #self.check_TCW=Checkbutton(self.quadro_perform, text="TCW_Eo" ,variable=self._check_TCW)#, state= DISABLED) #self.check_TCW.pack(side = LEFT, fill = Y ,anchor = W, ipady = 1, padx = 5) self.check_INT = Checkbutton(self.quadro_perform, text="Xan_Int", variable=self._check_INT) self.check_INT.pack(side=LEFT, fill=Y, anchor=W, ipady=1, padx=5)
def __init__(self, genitore): #------------------------------- declare ---------------------------------------------- self.plotfit = StringVar() self._kstart = StringVar() #entry for fit parameters self._kend = StringVar() #entry for fit parameters self._Rstart = StringVar() #entry for fit parameters self._Rend = StringVar() #entry for fit parameters self._kweigth = IntVar() #entry for fit parameters self._Fspace = StringVar() #entry for fit parameters self._PlotPath = StringVar() # define the path in page 2 combobox self.PlotListPath = list() self.rem_path = IntVar() #spin remove packLabelFrame = { "side": LEFT, "expand": YES, "anchor": W, "pady": 3, "ipadx": 3 } packEntry = { "side": LEFT, "anchor": W, "pady": 3, "padx": 0, "fill": X } # "expand" : LElfpack = { "side": LEFT, "padx": 3, "ipadx": 0 } LEepack = { "side": LEFT, "expand": NO, "padx": 0 } #--------------------------------- set ------------------------------------------ self._kstart.set(0) self._kend.set(0) self._Rstart.set(0) self._Rend.set(6) self._kweigth.set(2) self._kend.set("k max") self._Fspace.set("R") self.plotfit.set("R") self.kstart = 0 self.kend = 0 self.Rstart = 0 self.Rend = 6 #############------------------------------Page 1---------------------------------------------------- self.nb = ttk.Notebook(genitore) self.nb.pack(fill=BOTH, expand=1) self.p1 = Frame(self.nb) self.nb.add(self.p1, text="Param.") #------------------------------ Param ----------------------------------------------------- self.quadro_Parameter = LabelFrame( self.p1, text="Fit parameter") #,text = "Correction" self.quadro_Parameter.pack(side=TOP, fill=X, pady=3, ipadx=5, ipady=3) self.quadro_k_lim = LabelFrame(self.quadro_Parameter, text="k Range Limits") self.quadro_k_lim.pack(**packLabelFrame) self._entry_kstart = Entry(self.quadro_k_lim, width=6, textvariable=self._kstart) self._entry_kstart.pack(**packEntry) self._entry_kend = Entry(self.quadro_k_lim, width=6, textvariable=self._kend) self._entry_kend.pack(**packEntry) self.quadro_R_lim = LabelFrame(self.quadro_Parameter, text="R Range Limits") self.quadro_R_lim.pack(**packLabelFrame) self._entry_Rstart = Entry(self.quadro_R_lim, width=6, textvariable=self._Rstart) self._entry_Rstart.pack(**packEntry) self._entry_Rend = Entry(self.quadro_R_lim, width=6, textvariable=self._Rend) self._entry_Rend.pack(**packEntry) self.quadro_spin_kweigth = LabelFrame(self.quadro_Parameter, text="k_weigth") self.quadro_spin_kweigth.pack(**packLabelFrame) self.spin_kweigth = Spinbox(self.quadro_spin_kweigth, from_=0, to=3, textvariable=self._kweigth, width=5) self.spin_kweigth.pack(**packEntry) self.quadro_fit_space = LabelFrame(self.quadro_Parameter, text="Fit space") self.quadro_fit_space.pack(**packLabelFrame) self.combo_fit_space = ttk.Combobox(self.quadro_fit_space, state="readonly", textvariable=self._Fspace, values=('k', 'r', 'q')) self.combo_fit_space.pack(**packEntry) #--------------------------------------Path list---------------------------------------------------- self.quadro_Path1 = LabelFrame( self.p1, text="Fit parameters") #,text = "Correction" self.quadro_Path1.pack(side=TOP, fill='both', expand=1, pady=1, ipadx=0, ipady=0) #Label(self.quadro_Path1,text = "Checkbutton on meaning refine").pack( # side = TOP, fill=X, expand=0, pady= 1, ipadx = 0, ipady = 0) self.standardframe = TScrolledFrame(self.quadro_Path1) self.standardframe.pack(side=TOP, pady=1, ipadx=0, ipady=0, fill='both', expand=1) self.Path_list = list() self.Path_list.append( Path(self.standardframe.frame(), bd=5, text="Path 1")) self.Path_list[-1].pack(side=TOP, fill=X, pady=1, ipadx=0, ipady=0) ###################--------button add path Quadro_Par3 = Frame(self.p1) Quadro_Par3.pack(side=TOP, anchor=W, expand=N, fill=BOTH, pady=15) Button(Quadro_Par3, text="Add one Path", command=self.add_path, width=13, background="violet").pack(side=LEFT, padx=3, pady=1, anchor=W) Label(Quadro_Par3, text=' ').pack(side=LEFT, padx=3, pady=1, anchor=W) Button(Quadro_Par3, text="Rem. last Path", command=self.rem_pa, width=15, background="violet").pack(side=LEFT, padx=3, pady=1, anchor=W) #----------------------------------Quadro Perform ------------------------------------------------- self.quadro_perform = LabelFrame(self.p1) #,text = "Correction" self.quadro_perform.pack(side=TOP, anchor=S, fill=X, expand=NO) self.button_fit_per = Button(self.quadro_perform, command=self.perform, text="Perform", background="green", width=10, padx="3m", pady="2m") self.button_fit_per.pack(side=LEFT, anchor=W, padx=5, pady=5) self.framepb = Frame(self.quadro_perform) self.framepb.pack(side=LEFT, expand=Y, fill=BOTH) self.radioframe = Frame(self.quadro_perform) self.radioframe.pack(side=LEFT) self.radio_plot_q = Radiobutton(self.radioframe, text="k", variable=self.plotfit, value="k", command=self.changeplot) self.radio_plot_q.pack(side=TOP, anchor=E) self.radio_plot_r = Radiobutton(self.radioframe, text="R", variable=self.plotfit, value="R", command=self.changeplot) self.radio_plot_r.pack(side=TOP, anchor=E) self.Fit_PlSa_But = ut.PloteSaveB(self.quadro_perform, ext="", comment=None, title="FIT Plot") ############---------------------------Page 2---------------------------------------------------- self.p2 = Frame(self.nb) self.nb.add(self.p2, text="Plot Fit Results") self.nb.pack(fill=BOTH, expand=1) quadro_PlotP3 = LabelFrame(self.p2, text='Plot residuals') quadro_PlotP3.pack(side=TOP, expand=YES, anchor=N, fill=X) quadro_rx2Bu = LabelFrame(quadro_PlotP3, text="red. chi 2") quadro_rx2Bu.pack(side=LEFT, expand=Y, padx=3, fill=X) self.rx2_PlSa_But = ut.PloteSaveB(quadro_rx2Bu, ext="", comment=None, title="red. chi 2") quadro_rfBu = LabelFrame(quadro_PlotP3, text="r-factor") quadro_rfBu.pack(side=LEFT, expand=Y, padx=3, fill=X) self.rf_PlSa_But = ut.PloteSaveB(quadro_rfBu, ext="", comment=None, title="r-factor") #------------------------combo box----------------------------------------- quadro_Path_list = LabelFrame(self.p2, text='Path ') quadro_Path_list.pack(side=TOP, expand=NO, anchor=N, fill=X) self.combo_Path_list = ttk.Combobox(quadro_Path_list, state="readonly", textvariable=self._PlotPath, values=self.PlotListPath, width=55) self.combo_Path_list.pack(**packEntry) self.combo_Path_list.bind('<<ComboboxSelected>>', self.PathVarplot) self.quadro_PlotP1 = LabelFrame(self.p2, text='Fit results') self.quadro_PlotP1.pack(side=TOP, expand=YES, anchor=N, fill=X) #-------------------------- n1 r1------------------------------------- self.quadro_PlotP1_1 = Frame(self.quadro_PlotP1) self.quadro_PlotP1_1.pack(side=TOP, expand=YES, anchor=N, fill=X) self.quadro_n1Bu = LabelFrame(self.quadro_PlotP1_1, text="n1") self.quadro_n1Bu.pack(side=LEFT, expand=Y, padx=3, fill=X) self.n1_PlSa_But = ut.PloteSaveB(self.quadro_n1Bu, ext="", comment=None, title="n 1") self.quadro_r1Bu = LabelFrame(self.quadro_PlotP1_1, text="r1") self.quadro_r1Bu.pack(side=LEFT, expand=Y, padx=3, fill=X) self.r1_PlSa_But = ut.PloteSaveB(self.quadro_r1Bu, ext="", comment=None, title="r 1") #-------------------------- s1 e1---------------------------------------- self.quadro_PlotP1_2 = Frame(self.quadro_PlotP1) self.quadro_PlotP1_2.pack(side=TOP, fill=X) self.quadro_s1Bu = LabelFrame(self.quadro_PlotP1_2, text="s1") self.quadro_s1Bu.pack(side=LEFT, expand=Y, padx=3, fill=X) self.s1_PlSa_But = ut.PloteSaveB(self.quadro_s1Bu, ext="", comment=None, title="s 1") self.quadro_e1Bu = LabelFrame(self.quadro_PlotP1_2, text="e1") self.quadro_e1Bu.pack(side=LEFT, expand=Y, padx=3, fill=X) self.e1_PlSa_But = ut.PloteSaveB(self.quadro_e1Bu, ext="", comment=None, title="e 1")
def __init__(self, genitore): #------------------------------- declare ---------------------------------------------- self._check_FT = IntVar() self._check_exa = IntVar() self.kweigthplot = IntVar() packLabelFrame = {"side" : LEFT, "expand" : YES, "anchor" : W, "pady" : 3} packEntry = {"side" : LEFT, "anchor" : W, "pady" : 6, "padx" : 3, "fill" : X } # "expand" : YES, #--------------------------------- set ------------------------------------------ self._check_exa.set(1) self.kweigthplot.set(1) #--------------------------------- set ------------------------------------------ self.Eop = 0 self.rbkg = 0 self.pr_es= 0 self.pr_ee= 0 self.po_es= 0 self.po_ee= 0 self.skmax= 0 self.skmin= 0 #--------------------------------EXAFS-------------------------------------------------------- self.quadro_exafs = LabelFrame(genitore, text = "EXAFS extraction") #,text = "Correction" self.quadro_exafs.pack(side = TOP, fill = X, pady= 3, ipadx = 5, ipady = 3) self.quadro_exafs1 = Frame(self.quadro_exafs) #,text = "Correction" self.quadro_exafs1.pack(side = TOP, fill = X, pady=5) #Label(self.quadro_exafs1, text = "k_weigth", justify = LEFT).pack(side = LEFT, anchor = W, expand =Y) self.button_exafs_default = Button(self.quadro_exafs1, command = self.EXAFSparam, text = "EXAFS param.", background = "violet", width = 10, padx = "3m", pady = "2m") self.button_exafs_default.pack(side = LEFT, anchor = W, padx = 5, pady = 2) self.quadro_exafs2 = Frame(self.quadro_exafs) #,text = "Correction" self.quadro_exafs2.pack(side = TOP, fill = BOTH, pady=2,expand= YES,) self.quadro_EXA_bkg = LabelFrame(self.quadro_exafs2, text = "EXA_bkg") self.quadro_EXA_bkg.pack(fill= X, **packLabelFrame) self.quadro_EXA_chi= LabelFrame(self.quadro_exafs2, text = "EXAFS signal k") self.quadro_EXA_chi.pack(fill= X, **packLabelFrame) self.spin_kweigthplot = Spinbox(self.quadro_EXA_chi, from_ = 0, to = 3, textvariable= self.kweigthplot, width = 1, command= self.kwrefresh) self.spin_kweigthplot.pack(side =LEFT, ipady =3) self.bkg_PlSa_But=ut.PloteSaveB(self.quadro_EXA_bkg, ext=".bkg" , comment= None, title="background" ) self.bkg_PlSa_But.Button_plot.configure(command = self.plot2) self.exa_PlSa_But=ut.PloteSaveB(self.quadro_EXA_chi, ext=".chi", xlabel= '$k(\AA^{-1})$', ylabel='$k\chi(k) (\AA^{-1})$', comment= None, title="Exafs") #-------------------------------------FT------------------------------------------------------------------------ self.quadro_FT = LabelFrame(genitore, text = "Foward FT") #,text = "Correction" self.quadro_FT.pack(side = TOP, fill = X, pady= 3, ipadx = 5, ipady = 3) self.quadro_FT1 = Frame(self.quadro_FT) self.quadro_FT1.pack(side = TOP, fill = X) self.button_FT_default = Button(self.quadro_FT1, command = self.FTparam, text = "FT param.", background = "violet", width = 10, padx = "3m", pady = "2m") self.button_FT_default.pack(side = LEFT, anchor = W, padx = 5, pady = 2) self.quadro_FT2 = Frame(self.quadro_FT) #,text = "Correction" self.quadro_FT2.pack(side = TOP, fill = BOTH, pady=2,expand= YES,) self.quadro_FT2 = Frame(self.quadro_FT) self.quadro_FT2.pack(side = TOP, fill = BOTH, expand= YES,) self.quadro_FTMg = LabelFrame(self.quadro_FT2, text = "FT Mag.") self.quadro_FTMg.pack(fill= X, **packLabelFrame) self.quadro_FTIm = LabelFrame(self.quadro_FT2, text = "FT Im.") self.quadro_FTIm.pack(fill= X, **packLabelFrame) self.FTMg_PlSa_But=ut.PloteSaveB(self.quadro_FTMg, ext=".ftmg" ,comment= None, title="FT Mag") self.FTIm_PlSa_But=ut.PloteSaveB(self.quadro_FTIm, ext=".ftim" ,comment= None, title="FT Im") #--------------------------------------Perform---------------------------------------------------- self.quadro_perform = LabelFrame(genitore) #,text = "Correction" self.quadro_perform.pack(side = BOTTOM, fill = X, expand =YES) self.button_exa_per = Button(self.quadro_perform, # command = self.Perform, text = "Perform" , background = "green", width = 10, padx = "3m", pady = "2m") self.button_exa_per.pack(side = LEFT, anchor = W, padx = 5, pady = 5) self.check_exa=Checkbutton(self.quadro_perform, text="EXAFS" ,variable=self._check_exa ) self.check_exa.pack(side = LEFT, fill = Y ,anchor = W, ipady = 1, padx = 5) self.check_FT=Checkbutton(self.quadro_perform, text="FT" ,variable=self._check_FT) self.check_FT.pack(side = LEFT, fill = Y ,anchor = W, ipady = 1, padx = 5)
def __init__(self, genitore): #----------------------------- Declare -------------------------------------------------- self._from_tof = StringVar() #select self._c_aver = IntVar() #aver self._aver = IntVar() #aver self._c_Trun = IntVar() #Truncate self.before = StringVar() #Truncate self.after = StringVar() #Truncate self._c_Rebin = IntVar() self.Edgep = StringVar() #rebin self.Prep = StringVar() #rebin self.Postp = StringVar() #rebin self.Edges = StringVar() #rebin self.Pres = StringVar() #rebin self.Posts = StringVar() #rebin self.labelfiletext = StringVar() #rebin #----------------------------- Define -------------------------------------------------- self._from_tof.set("1,2,5-15,23") self._aver.set(1) self.Edgep.set(24350) self.Prep.set(30) self.Postp.set(20) self.Edges.set(.5) self.Pres.set(5) self.Posts.set(.03) #----------------------------- Browse file ------------------------------------------------ #self.filesel = ut.Browse_file(genitore, "Filenames", 0, All_Column=False) #self.filesel.pulsanteA.configure(command= self.browse_command2) # 'quadro_process' #----------------------------- Select and Truncate ----------------------------------- self.SelTrunc = Frame(genitore) #,text = "Correction" self.SelTrunc.pack(side=TOP, fill=BOTH, padx=3, pady=10) labelpack = { "side": LEFT, "fill": BOTH, "anchor": N, "ipadx": 5 } #,"expand" : YES, "ipady" : 5 entrypack = { "side": LEFT, "padx": 5, } #"ipady" : 3 #----------------------------- Select -------------------------------------------------- self.process = LabelFrame(self.SelTrunc, text="Select") #,text = "Correction" self.process.pack(side=LEFT, fill=BOTH, pady=3, ipadx=5, ipady=3, expand=YES) # # Si aggiungono alcuni sottoquadri a 'dspacing' self.from_tof = ut.LabelEntry(self.process, Ltext=" Select spectra ex. 1,2,5-15,23", EtextVar=self._from_tof, Ewith=20) # self.from_tof.LabFr.pack(**labelpack) self.from_tof._entry.pack(**entrypack) #----------------------------- Truncate ------------------------------------------------- self.quadro_Trun = LabelFrame(self.SelTrunc, text="Truncate") self.quadro_Trun.pack(side=LEFT, fill=BOTH, pady=3, ipadx=5, ipady=3, expand=YES) #, expand = YES self.Trun_before = ut.LabelEntry(self.quadro_Trun, Ltext="before", EtextVar=self.before, Ewith=10) # self.Trun_before.LabFr.pack(**labelpack) self.Trun_before._entry.pack(**entrypack) self.Trun_after = ut.LabelEntry(self.quadro_Trun, Ltext="after", EtextVar=self.after, Ewith=10) self.Trun_after.LabFr.pack(**labelpack) self.Trun_after._entry.pack(**entrypack) #----------------------------- Rebin -------------------------------------------------- #labelpack = {"side" : LEFT, "expand" : YES, "fill" : BOTH, "anchor" : N,"ipadx" : 5, "ipady" : 5} #entrypack = {"side" : LEFT, "padx" : 5, "ipady" : 3} self.quadro_Rebin = LabelFrame(genitore, text="Rebin") self.quadro_Rebin.pack(side=TOP, expand=YES, fill=X, ipadx=5, ipady=3) self.quadro_Rebinrange = Frame( self.quadro_Rebin) # Label , text = "Range" self.quadro_Rebinrange.pack( side=TOP, fill=X) #, expand = YES, ,ipadx = 5, ipady = 5 self.Edgep_LB = ut.LabelEntry(self.quadro_Rebinrange, Ltext="Edge position", EtextVar=self.Edgep, Ewith=8, SLtext="eV") # self.Edgep_LB.LabFr.pack(**labelpack) self.Trun_before._entry.pack(**entrypack) self.Prep_LB = ut.LabelEntry(self.quadro_Rebinrange, Ltext="Preedge ends ", EtextVar=self.Prep, Ewith=8, SLtext="eV bef. Eo") self.Postp_LB = ut.LabelEntry(self.quadro_Rebinrange, Ltext="EXAFS starts", EtextVar=self.Postp, Ewith=8, SLtext="eV after Eo") self.quadro_RebinStep = Frame( self.quadro_Rebin) #Label , text = "Step" self.quadro_RebinStep.pack( side=TOP, fill=X) #, expand = YES, fill = BOTH,ipadx = 5, ipady = 5 self.Edgep_LB = ut.LabelEntry(self.quadro_RebinStep, Ltext="Edge step", EtextVar=self.Edges, Ewith=8, SLtext="eV") # self.Edgep_LB.LabFr.pack(**labelpack) self.Trun_before._entry.pack(**entrypack) self.Prep_LB = ut.LabelEntry(self.quadro_RebinStep, Ltext="Preedge step", EtextVar=self.Pres, Ewith=8, SLtext="eV ") # self.Postp_LB = ut.LabelEntry(self.quadro_RebinStep, Ltext="EXAFS step", EtextVar=self.Posts, Ewith=8, SLtext=u'\xc5-1 ') # self.pulsante_Rebin = Button(self.quadro_Rebin, command=self.RebinSparam, text="Eval on Graph", background="violet", width=12, padx="3m", pady="2m") self.pulsante_Rebin.pack(side=TOP, anchor=W) #----------------------------- Average -------------------------------------------------- self.process1 = Frame(genitore) #,text = "Correction" self.process1.pack(side=TOP, expand=YES, fill=BOTH, ipadx=5, ipady=3) self.quadro_aver = LabelFrame(self.process1, text="Perform:") Label(self.quadro_aver, text=" Select, ").pack(side=LEFT) self.check_aver = Checkbutton(self.quadro_aver, text="Average each", variable=self._c_aver) self.check_aver.pack(side=LEFT, fill=Y, anchor=W, ipady=1) self.quadro_aver.pack(side=LEFT, expand=YES, fill=BOTH, anchor=W, ipady=0) self._entry_aver = Entry(self.quadro_aver, width=3, textvariable=self._aver) self._entry_aver.pack(side=LEFT, ipady=3, anchor=W) Label(self.quadro_aver, text="files, ").pack(side=LEFT, ipady=3, anchor=W, fill=Y) self.check_Trun = Checkbutton(self.quadro_aver, text="Truncate, ", variable=self._c_Trun) self.check_Trun.pack(side=LEFT, fill=Y, anchor=W, ipady=1) self.check_Rebin = Checkbutton(self.quadro_aver, text="Rebin ", variable=self._c_Rebin) self.check_Rebin.pack(side=LEFT, fill=Y, anchor=W, ipady=1) #----------------------------- Perform --------------------------------------------------- self.quadro_buttonp1 = Frame(genitore) self.quadro_buttonp1.pack(side=TOP, expand=YES, fill=BOTH, pady=10, ipadx=5, ipady=5) self.pulsante_Aver = Button(self.quadro_buttonp1, command=self.Perform, text="Perform", background="green", width=8, padx="3m", pady="2m") self.pulsante_Aver.pack(side=LEFT, anchor=W) self.Avesel_PlSa_But = ut.PloteSaveB(self.quadro_buttonp1, ext="reb", title="Rebin", xlabel='energy (eV)', ylabel='mu (abs. unit)')