Changeset d0ce2c30 in sasview


Ignore:
Timestamp:
Apr 20, 2009 11:10:00 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:
1c1436d
Parents:
9e6c27f
Message:

removed the Q=0 point (when y[Q=0] ==None) from fitting

File:
1 edited

Legend:

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

    reda428b rd0ce2c30  
    464464            wx.PostEvent(self.parent.parent, StatusEvent(status= msg )) 
    465465            return  
    466          
    467         self.qmin_x=float(self.qmin.GetValue()) 
     466 
     467        # Remove or do not allow fitting on the Q=0 point, especially when y(q=0)=None at x[0]. 
     468        #ToDo: Fix this. 
     469        if float(self.qmin.GetValue())==0.0 and self.data.x[0]==0 and not numpy.isfinite(self.data.y[0]): 
     470            self.qmin_x = min(self.data.x[self.data.x!=0]) 
     471        else:                        
     472            self.qmin_x = float(self.qmin.GetValue()) 
     473         
    468474        self.qmax_x =float( self.qmax.GetValue()) 
    469475        self.manager._reset_schedule_problem( value=0) 
     
    727733        from sans.guiframe.utils import check_value 
    728734        flag = check_value( self.qmin, self.qmax) 
    729         
    730735        if flag== True: 
    731736            try: 
Note: See TracChangeset for help on using the changeset viewer.