PEATDB/Ekin/Ekin_CD.py
def insert_wavdata(self,junk=None):
        """Get the data for the wavelength that was selected and insert it in the sheet"""
        #
        # Loop over all datatabs and get the ones that are CD(T) data
        #
        chosen_wavelength=self.wavlen.get()
        #
        data=[]
        for tabnum in self.tabnames:
            if self.tabnames[tabnum][:4]=='CD(T':
                #
                # Grab data from here
                #
                temp=float(self.tabnames[tabnum][4:-1])
                for dp in self.data[tabnum][0].keys():
                    if dp!='label' and dp!='label_widget':
                        wavlen=self.data[tabnum][0][dp]['var'].get()
                        if wavlen==chosen_wavelength:
                            data.append([temp,wavlen,self.data[tabnum][1][dp]['var'].get()])

        #
        # find min and max of CD signal
        #
        min_val=0
        max_val=-1000
        i=0
        for temp,wavlen,mdeg in data:
            mdeg=float(mdeg)
            if mdeg>max_val:
                max_val=mdeg
            if mdeg<min_val:
                min_val=mdeg
            i=i+1
        #
        # Did the user specify one value or the other?
        #
        if self.CD_min=='auto':
            self.min_mdeg.set(min_val)
        #
        if self.CD_max=='auto':
            self.max_mdeg.set(max_val)
        #
        # Insert data from the wavelength
        #
        count=0
        for temp,wavlen,mdeg in data:
            self.data[self.temp_dep_tab][0][count]['var'].set(temp)
            self.data[self.temp_dep_tab][1][count]['var'].set(mdeg)
            count=count+1
        self.redraw_graph(fitting=1)
        return
Get the data for the wavelength that was selected and insert it in the sheet
Get the data for the wavelength that was selected and insert it in the sheet
Get the data for the wavelength that was selected and insert it in the sheet
def insert_wavdata(self,junk=None):
         Loop over all datatabs and get the ones that are CD(T) data
        chosen_wavelength=self.wavlen.get()
        data=[]
        for tabnum in self.tabnames:
            if self.tabnames[tabnum][:4]=='CD(T':
                 Grab data from here
                temp=float(self.tabnames[tabnum][4:-1])
                for dp in self.data[tabnum][0].keys():
                    if dp!='label' and dp!='label_widget':
                        wavlen=self.data[tabnum][0][dp]['var'].get()
                        if wavlen==chosen_wavelength:
                            data.append([temp,wavlen,self.data[tabnum][1][dp]['var'].get()])
         find min and max of CD signal
        min_val=0
        max_val=-1000
        i=0
        for temp,wavlen,mdeg in data:
            mdeg=float(mdeg)
            if mdeg>max_val:
                max_val=mdeg
            if mdeg<min_val:
                min_val=mdeg
            i=i+1
         Did the user specify one value or the other?
        if self.CD_min=='auto':
            self.min_mdeg.set(min_val)
        if self.CD_max=='auto':
            self.max_mdeg.set(max_val)
         Insert data from the wavelength
        count=0
        for temp,wavlen,mdeg in data:
            self.data[self.temp_dep_tab][0][count]['var'].set(temp)
            self.data[self.temp_dep_tab][1][count]['var'].set(mdeg)
            count=count+1
        self.redraw_graph(fitting=1)
        return
def insert_wavdata ( self , junk = None ) : chosen_wavelength = self . wavlen . get ( ) data = [ ] for tabnum in self . tabnames : if self . tabnames [ tabnum ] [ : 4 ] == 'CD(T' : temp = float ( self . tabnames [ tabnum ] [ 4 : - 1 ] ) for dp in self . data [ tabnum ] [ 0 ] . keys ( ) : if dp != 'label' and dp != 'label_widget' : wavlen = self . data [ tabnum ] [ 0 ] [ dp ] [ 'var' ] . get ( ) if wavlen == chosen_wavelength : data . append ( [ temp , wavlen , self . data [ tabnum ] [ 1 ] [ dp ] [ 'var' ] . get ( ) ] ) min_val = 0 max_val = - 1000 i = 0 for temp , wavlen , mdeg in data : mdeg = float ( mdeg ) if mdeg > max_val : max_val = mdeg if mdeg < min_val : min_val = mdeg i = i + 1 if self . CD_min == 'auto' : self . min_mdeg . set ( min_val ) if self . CD_max == 'auto' : self . max_mdeg . set ( max_val ) count = 0 for temp , wavlen , mdeg in data : self . data [ self . temp_dep_tab ] [ 0 ] [ count ] [ 'var' ] . set ( temp ) self . data [ self . temp_dep_tab ] [ 1 ] [ count ] [ 'var' ] . set ( mdeg ) count = count + 1 self . redraw_graph ( fitting = 1 ) return
Get the data for the wavelength that was selected and insert it in the sheet
Get the data for the wavelength that was selected and insert it in the sheet
"""Get the data for the wavelength that was selected and insert it in the sheet""" # # Loop over all datatabs and get the ones that are CD(T) data # # # # Grab data from here # # # find min and max of CD signal # # # Did the user specify one value or the other? # # # # Insert data from the wavelength #
self
junk