Changeset 90640f2 in sasview


Ignore:
Timestamp:
May 2, 2008 10:27:37 AM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
2e014bf
Parents:
ddff053
Message:

ore bugs fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guitools/fitDialog.py

    rddff053 r90640f2  
    1313    #def __init__(self, parent, id, title): 
    1414    def __init__(self, parent, plottable, push_data,transform, id, title): 
    15         wx.Dialog.__init__(self, parent, id, title, size=(450, 500)) 
     15        wx.Dialog.__init__(self, parent, id, title, size=(450, 400)) 
    1616        """ 
    1717            for the fit window 
     
    104104        ix += 2 
    105105        sizer.Add(self.FXmax, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    106          
    107         #iy += 1 
    108         #ix = 1 
    109         #sizer.Add(wx.StaticText(panel, -1,"x is: "),(iy, ix),(1,1),\ 
    110         #           wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
     106       
    111107        iy += 1 
    112108        ix = 0 
     
    147143        self.tcErrB.SetLabel(str(0.0)) 
    148144        self.tcChi.SetLabel(str(0.0)) 
     145         
    149146        if self.plottable.x !=[]: 
    150147            self.mini =min(self.plottable.x) 
    151148            self.maxi =max(self.plottable.x) 
     149             
    152150            self.FXmin.SetLabel(str(self.mini)) 
    153151            self.FXmax.SetLabel(str(self.maxi)) 
    154             self.FXminX.SetLabel(str(self.mini)) 
    155             self.FXmaxX.SetLabel(str(self.maxi)) 
    156152            self.FXmin.Disable() 
    157153            self.FXmax.Disable() 
     154             
    158155            self.PXmin.SetValue(str(self.mini)) 
    159156            self.PXmax.SetValue(str(self.maxi)) 
    160157            self.PXmin.Disable() 
    161158            self.PXmax.Disable() 
    162          
    163         # new data for the fit  
    164         #self.file_data1 = Theory1D(x=[], y=[], dy=None) 
    165         #self.file_data1.name = "Fit" 
    166         #self.file_data1.ID = "isFit" 
    167         # Receive transformations of x and y 
    168         self.xtrans,self.ytrans= self.transform() 
     159             
     160            self.FXminX.SetLabel(str(self.mini)) 
     161            self.FXmaxX.SetLabel(str(self.maxi)) 
     162             
     163       
    169164    def _onFit(self ,event): 
    170165        """ 
     
    173168            Push a plottable to  
    174169        """ 
    175          
    176170        tempx=[] 
    177171        tempy=[] 
     
    180174        #store the values of View in x,y, dx,dy 
    181175        x,y,dx,dy=self.plottable.returnValuesOfView() 
    182         # Receive transformations of x and y 
    183         self.xtrans,self.ytrans= self.transform() 
    184176         
    185177        # Check if View contains a x array .we online fit when x exits 
     
    188180             
    189181                 
    190             if(self.checkFitValues(self.FXmin) == True): 
     182            if(self.checkFitValues(self.FXminX) == True): 
    191183                #Check if the field of Fit Dialog contain values and use the x max and min of the user 
    192184                xmin,xmax = self._checkVal(self.FXminX.GetValue(),self.FXmaxX.GetValue()) 
     
    357349        
    358350    def setFitRange(self,xmin,xmax,Reelxmin,Reelxmax): 
    359         
    360         self.FXmin.SetValue(str(math.log10(xmin))) 
    361         self.FXmax.SetValue(str(math.log10(xmax))) 
    362          
    363         self.FXmin.SetValue(str(xmin)) 
    364         self.FXmax.SetValue(str(xmax)) 
     351        if (self.xtrans=="log10(x)"): 
     352            self.FXmin.SetValue(str(math.log10(xmin))) 
     353            self.FXmax.SetValue(str(math.log10(xmax))) 
     354        else: 
     355            self.FXmin.SetValue(str(xmin)) 
     356            self.FXmax.SetValue(str(xmax)) 
    365357        self.FXminX.SetValue(str(Reelxmin)) 
    366358        self.FXmaxX.SetValue(str(Reelxmax)) 
Note: See TracChangeset for help on using the changeset viewer.