Changeset 06aa2eeb in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Apr 14, 2011 2:58:45 PM (14 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:
69f9084
Parents:
e9875db
Message:

fixed misbehaviors of reset and chi2 value

Location:
sansview/perspectives/fitting
Files:
2 edited

Legend:

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

    re9875db r06aa2eeb  
    23902390        #    return 
    23912391        ##For 3 different cases: Data2D, Data1D, and theory 
    2392         if self.data.__class__.__name__ == "Data2D": 
     2392        if self.model == None: 
     2393            msg="Please select a model first..." 
     2394            wx.MessageBox(msg, 'Info') 
     2395            flag = False 
     2396            return 
     2397             
     2398        elif self.data.__class__.__name__ == "Data2D": 
    23932399            data_min= 0 
    23942400            x= max(math.fabs(self.data.xmin), math.fabs(self.data.xmax))  
     
    24042410                else: 
    24052411                    flag = True 
     2412                     
     2413        elif self.data == None: 
     2414            self.qmin_x = _QMIN_DEFAULT 
     2415            self.qmax_x = _QMAX_DEFAULT 
     2416            self.num_points = _NPTS_DEFAULT             
     2417            self.state.npts = self.num_points 
     2418             
    24062419        elif self.data.__class__.__name__ != "Data2D": 
    24072420            self.qmin_x = min(self.data.x) 
     
    24182431                    flag = True 
    24192432        else: 
    2420             self.qmin_x = _QMIN_DEFAULT 
    2421             self.qmax_x = _QMAX_DEFAULT 
    2422             self.num_points = _NPTS_DEFAULT             
    2423             self.state.npts = self.num_points 
     2433            flag = False 
    24242434             
    24252435        if flag == False: 
  • sansview/perspectives/fitting/fitpage.py

    re9875db r06aa2eeb  
    914914            msg="Please select a Model first..." 
    915915            wx.MessageBox(msg, 'Info') 
    916             wx.PostEvent(self.manager.parent, StatusEvent(status=\ 
    917                             "Draw model: %s"%msg)) 
     916 
    918917            return 
    919918        flag = self._update_paramv_on_fit()          
     
    22792278        """ 
    22802279        try: 
    2281             if event ==None: 
     2280            if event == None: 
     2281                output= "-" 
     2282            elif not numpy.isfinite(event.output): 
    22822283                output= "-" 
    22832284            else: 
Note: See TracChangeset for help on using the changeset viewer.