PEATDB/Ekin/Ekin_CD.py
def wav_win_close(self,event=None):
        """
        Scale the CD data between 0 and 1, and destroy wavelength selection window
        """
        #
        # Get 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()])

        #
        # Normalise
        #
        i=0
        for temp,wavlen,mdeg in data:
            mdeg=float(mdeg)+abs(self.min_mdeg.get())
            mdeg=float(mdeg)/(self.max_mdeg.get()-self.min_mdeg.get())
            data[i][2]=mdeg
            i=i+1
        #
        # Change fitting model
        #
        self.FIT.update_model('Thermal denaturation')
        self.reprint_parameters()
        self.redraw_graph()
        #
        # Insert normalised data
        #
        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)
        #
        # Close window
        #
        if self.wav_win:
            self.wav_win.destroy()
        return

        Scale the CD data between 0 and 1, and destroy wavelength selection window
        
Scale the CD data between 0 and 1, and destroy wavelength selection window
Scale the CD data between 0 and 1 and destroy wavelength selection window
def wav_win_close(self,event=None):
         Get 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()])
         Normalise
        i=0
        for temp,wavlen,mdeg in data:
            mdeg=float(mdeg)+abs(self.min_mdeg.get())
            mdeg=float(mdeg)/(self.max_mdeg.get()-self.min_mdeg.get())
            data[i][2]=mdeg
            i=i+1
         Change fitting model
        self.FIT.update_model('Thermal denaturation')
        self.reprint_parameters()
        self.redraw_graph()
         Insert normalised data
        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)
         Close window
        if self.wav_win:
            self.wav_win.destroy()
        return
def wav_win_close ( self , event = 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 ( ) ] ) i = 0 for temp , wavlen , mdeg in data : mdeg = float ( mdeg ) + abs ( self . min_mdeg . get ( ) ) mdeg = float ( mdeg ) / ( self . max_mdeg . get ( ) - self . min_mdeg . get ( ) ) data [ i ] [ 2 ] = mdeg i = i + 1 self . FIT . update_model ( 'Thermal denaturation' ) self . reprint_parameters ( ) self . redraw_graph ( ) 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 ) if self . wav_win : self . wav_win . destroy ( ) return
Scale the CD data between 0 and 1, and destroy wavelength selection window
Scale the CD data between 0 and 1 and destroy wavelength selection window
"""
        Scale the CD data between 0 and 1, and destroy wavelength selection window
        """ # # Get data # # # # Grab data from here # # # Normalise # # # Change fitting model # # # Insert normalised data # # # Close window #
self
event