Changeset 44999f3 in sasview for sansview


Ignore:
Timestamp:
Feb 3, 2009 3:27:10 PM (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:
c4550b0
Parents:
bb1e07a
Message:

fixed chisr bug

File:
1 edited

Legend:

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

    r7a0fb4e r44999f3  
    180180         ## Q range 
    181181        print "self.data fitpage1D" , self.data,hasattr(self.data,"data") 
     182        # Reversed to the codes; Need to think  carefully about consistency in q between 2D plot and fitting 
    182183        if not hasattr(self.data,"data"): 
    183184            self.qmin_x= numpy.min(self.data.x) 
    184185            self.qmax_x= numpy.max(self.data.x) 
    185186        else: 
    186             radius1= math.sqrt(math.pow(self.data.xmin, 2)+ math.pow(self.data.ymin, 2)) 
    187             radius2= math.sqrt(math.pow(self.data.xmax, 2)+ math.pow(self.data.ymin, 2)) 
    188             radius3= math.sqrt(math.pow(self.data.xmin, 2)+ math.pow(self.data.ymax, 2)) 
    189             radius4= math.sqrt(math.pow(self.data.xmax, 2)+ math.pow(self.data.ymax, 2)) 
    190             self.qmin_x =0 
    191             self.qmax_x= max(radius1, radius2, radius3, radius4) 
     187            # Reversed to the codes; Need to think  carefully about consistency in q between 2D plot and fitting 
     188            #radius1= math.sqrt(math.pow(self.data.xmin, 2)+ math.pow(self.data.ymin, 2)) 
     189            #radius2= math.sqrt(math.pow(self.data.xmax, 2)+ math.pow(self.data.ymin, 2)) 
     190            #radius3= math.sqrt(math.pow(self.data.xmin, 2)+ math.pow(self.data.ymax, 2)) 
     191            #radius4= math.sqrt(math.pow(self.data.xmax, 2)+ math.pow(self.data.ymax, 2)) 
     192            #self.qmin_x =numpy.min(self.data.x)#0 
     193            #self.qmax_x= numpy.max(self.data.x)#max(radius1, radius2, radius3, radius4) 
     194            self.qmin_x= self.data.xmin 
     195            self.qmax_x= self.data.xmax            
    192196            print "data2D range",self.qmax_x 
     197         
    193198        self.num_points= 100 
    194199          
     
    309314                #print "chisqr : sum 2D", xmin, xmax, ymin, ymax,sum 
    310315                #print res 
    311                 self.tcChi.SetValue(format_number(math.fabs(sum))) 
     316                self.tcChi.SetLabel(format_number(math.fabs(sum))) 
    312317            except: 
    313318                wx.PostEvent(self.parent.GrandParent, StatusEvent(status=\ 
     
    373378                    wx.PostEvent(self.event_owner, evt) 
    374379                    self.text1_1.Show() 
     380                    self.compute_chisqr() 
    375381                    self.tcChi.Show() 
    376382                except: 
Note: See TracChangeset for help on using the changeset viewer.