Changeset 4cb07c0 in sasview for sansview/perspectives


Ignore:
Timestamp:
Feb 7, 2009 10:40:35 AM (15 years ago)
Author:
Jae Cho <jhjcho@…>
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:
97f0c39b
Parents:
ff7acff
Message:

Fixed the bug not showing the correct qmax value in q range box for 2D fitting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitpage1D.py

    r10c43a5 r4cb07c0  
    193193            #self.qmin_x = 0 
    194194            #self.qmax_x = max(radius1, radius2, radius3, radius4) 
    195             self.qmin_x= self.data.xmin 
    196             self.qmax_x= self.data.xmax            
     195            self.qmin_x= 0#self.data.xmin 
     196            self.qmax_x= math.sqrt(math.pow(max(math.fabs(self.data.xmax),math.fabs(self.data.xmin)),2) 
     197                            +math.pow(max(math.fabs(self.data.ymax),math.fabs(self.data.ymin)),2))#self.data.xmax            
    197198            print "data2D range",self.qmax_x 
    198199         
     
    206207        self.qmin.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
    207208        self.qmin.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 
    208         self.qmin.Disable() 
     209        self.qmin.Enable() 
    209210         
    210211        self.qmax    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20)) 
     
    213214        self.qmax.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
    214215        self.qmax.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 
    215         self.qmax.Disable() 
     216        self.qmax.Enable() 
    216217 
    217218        self.npts    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20)) 
     
    395396            self.manager.schedule_for_fit( value=1,fitproblem =None)  
    396397            if hasattr(self.data, "data"): 
    397                 self.manager._on_single_fit( qmin=self.qmin_x,qmax=self.qmax_x, 
     398                self.manager._on_single_fit(qmin=self.qmin_x,qmax=self.qmax_x, 
    398399                                            ymin=self.data.ymin, ymax=self.data.ymax, 
    399400                                            xmin=self.data.xmin,xmax=self.data.xmax) 
     
    554555            else: 
    555556                self.text2_4.Hide() 
    556         #Disable or enable fit button 
    557          
     557                 
     558        #(Disable or )Enable fit button  
     559        """        
    558560        if not (len(self.param_toFit ) >0): 
    559             self.xmin.Disable() 
    560             self.xmax.Disable() 
     561            self.xmin.Enable() 
     562            self.xmax.Enable() 
    561563        else: 
    562564            self.xmin.Enable() 
    563             self.xmax.Enable() 
    564         
     565            self.xmax.Enable()   
     566        """ 
     567                  
    565568        self.compute_chisqr() 
    566569        self.vbox.Layout() 
     
    629632        else: 
    630633            self.cb1.SetValue(False) 
    631              
     634        """     
    632635        #qmax, qmin Input enabled all the time    
    633636        self.qmin.Enable() 
    634         self.qmax.Enable() 
    635         
    636     
    637         
     637        self.qmax.Enable()       
     638        """ 
    638639   
    639640    def onsetValues(self,chisqr, out,cov): 
     
    662663        else: 
    663664            i=0 
    664             #print "fitpage: list param  model",list 
     665            #print  "fitpage: list param  model",list 
    665666            #for item in self.param_toFit: 
    666667            #    print "fitpage: list display",item[0].GetLabelText() 
Note: See TracChangeset for help on using the changeset viewer.