Changeset 8e44d51 in sasview for guitools/fitDialog.py


Ignore:
Timestamp:
Apr 16, 2008 10:22:24 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:
35891ce
Parents:
3aa7074
Message:

one more bug fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guitools/fitDialog.py

    r3aa7074 r8e44d51  
    4343        self.btClose =wx.Button(panel, wx.ID_CANCEL,'Close',size=(90, 30) ) 
    4444        self.static_line_1 = wx.StaticLine(panel, -1) 
     45         
    4546        ix = 0 
    4647        iy = 1 
    47          
    4848        sizer.Add(wx.StaticText(panel, -1, 'y = Ax +B'),(iy, ix),(1,1),\ 
    4949                   wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
    50          
    5150        iy+=1 
    5251        sizer.Add(wx.StaticText(panel, -1, 'Param A'),(iy, ix),\ 
     
    5857        ix += 1 
    5958        sizer.Add(self.tcErrA, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    60         
    6159        iy += 1 
    6260        ix = 0 
     
    108106                  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    109107         
    110         
    111108        panel.SetSizer(sizer) 
    112109        self.SetSizer(vbox) 
    113110        self.Centre() 
     111         
    114112        # Receives the type of model for the fitting 
    115113        from LineModel import LineModel 
    116114        self.model  = LineModel() 
    117            
    118115           
    119116        #Display the fittings values 
     
    139136            self.PXmin.Disable() 
    140137            self.PXmax.Disable() 
    141         
    142          
     138     
    143139        # new data for the fit  
    144140        self.file_data1 = Theory1D(x=[], y=[], dy=None) 
     
    158154        #Check if the field of Fit Dialog contain values and use the x max and min of the user 
    159155        xmin,xmax = self._checkVal(self.FXmin.GetValue(),self.FXmax.GetValue()) 
    160         
    161156        #store the values of View in x,y, dx,dy 
    162157        x,y,dx,dy=self.plottable.returnValuesOfView() 
     
    167162        # makes transformation for y as a line to fit 
    168163        if x != []:  
    169              
    170164            xminView=self.floatTransform(xmin) 
    171165            xmaxView=self.floatTransform(xmax) 
     
    190184                    
    191185            #Find the fitting parameters 
    192             print "X", tempx 
    193             print "Y", tempy 
    194186            chisqr, out, cov = fittings.sansfit(self.model,  
    195187                            [self.cstA, self.cstB],tempx, tempy,tempdy,xminView,xmaxView) 
     
    211203            self.model.setParam('A', float(cstA)) 
    212204            self.model.setParam('B', float(cstB)) 
    213             print "this is constant A:",float(cstA) 
     205             
    214206            tempx = [] 
    215207            tempy = [] 
     
    241233            else:  
    242234                tempy.append(y_model) 
    243                  
    244              
    245             print "this max",xmax 
    246             print "this view xmax", xmaxView 
     235           
    247236            # Create new data plottable with result 
    248237            self.file_data1.x =[]  
     
    252241            self.file_data1.dx=None 
    253242            self.file_data1.dy=None 
    254             print "this is the min of data1",min(self.file_data1.x ) 
    255             print "this is the max of data1",max(self.file_data1.x ) 
    256243            #Load the view with the new values 
    257244            self.file_data1.reset_view() 
Note: See TracChangeset for help on using the changeset viewer.