Ignore:
Timestamp:
Feb 3, 2009 2:26:15 PM (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:
0690e1d
Parents:
6b44403
Message:

plotted2d from data fixed

File:
1 edited

Legend:

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

    r6b44403 r94999eb  
    137137        #------------------ sizer 4  draw------------------------    
    138138        self.modelbox = wx.ComboBox(self, -1) 
    139          
     139        self.tcChi    =  wx.StaticText(self, -1, str(0), style=wx.ALIGN_LEFT) 
     140        self.tcChi.Hide() 
     141        self.text1_1 = wx.StaticText(self, -1, 'Chi2/dof', style=wx.ALIGN_LEFT) 
     142        self.text1_1.Hide() 
    140143        #filling sizer2 
    141144        ix = 0 
     
    145148        ix += 1 
    146149        self.sizer4.Add(self.modelbox,(iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    147          
     150        ix += 1 
     151        self.sizer4.Add(self.text1_1,(iy,ix),(1,1),\ 
     152                   wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
     153        ix += 1 
     154        self.sizer4.Add(self.tcChi,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    148155        #----------sizer6------------------------------------------------- 
    149156        self.disable_disp = wx.RadioButton(self, -1, 'No', (10, 10), style=wx.RB_GROUP) 
     
    165172         
    166173        #---------sizer 9 draw---------------------------------------- 
    167         self.tcChi    =  wx.StaticText(self, -1, str(0), style=wx.ALIGN_LEFT) 
    168         self.tcChi.Hide() 
    169         self.text1_1 = wx.StaticText(self, -1, 'Chi2/dof', style=wx.ALIGN_LEFT) 
    170         self.text1_1.Hide() 
     174         
    171175         
    172176        id = wx.NewId() 
     
    235239        ix += 1 
    236240        self.sizer9.Add(self.npts,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    237         ix = 0 
    238         iy += 1 
    239         self.sizer9.Add(self.text1_1,(iy,ix),(1,1),\ 
    240                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
    241         ix += 1 
    242         self.sizer9.Add(self.tcChi,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    243         ix +=2 
     241         
     242        ix += 1 
    244243        self.sizer9.Add(self.btFit,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    245244        ix =0 
     
    322321         
    323322        flag=self.checkFitRange() 
     323        print "flag", flag 
    324324        if flag== True: 
    325325            try: 
     
    330330                    self.qmin_x = float(self.qmin.GetValue()) 
    331331                    self.qmax_x = float(self.qmax.GetValue()) 
     332                    print "self.qmin_x, self.qmax_x",self.qmin_x,self.qmax_x 
    332333                    x,y,dy = [numpy.asarray(v) for v in (self.data.x,self.data.y,self.data.dy)] 
    333334                    if self.qmin_x==None and self.qmax_x==None:  
     
    338339                        fx = numpy.asarray([self.model.run(item)for item in x[idx ]]) 
    339340                        res= (y[idx] - fx)/dy[idx]   
    340                      
    341341                    
    342342                    sum=0 
     
    372372                    evt = ModelEventbox(model=self.model,name=name) 
    373373                    wx.PostEvent(self.event_owner, evt) 
    374                     #self.model= item() 
    375                     #self.set_panel(self.model) 
     374                    self.text1_1.Show() 
     375                    self.tcChi.Show() 
    376376                except: 
    377377                    raise #ValueError,"model.name is not equal to model class name" 
     
    583583             set to true or false all checkBox given the main checkbox value cb1 
    584584        """ 
    585         self.param_toFit=[] 
    586         if  self.parameters !=[]: 
    587             if  self.cb1.GetValue()==True: 
    588                 for item in self.parameters: 
    589                     item[0].SetValue(True) 
    590                     list= [item[0],item[1],item[2],item[3]] 
    591                     self.param_toFit.append(list ) 
    592                 if len(self.fittable_param)>0: 
    593                     for item in self.fittable_param: 
    594                         item[0].SetValue(True) 
    595                         list= [item[0],item[1],item[2],item[3]] 
    596                         self.param_toFit.append(list ) 
    597                 
    598                 if not (len(self.param_toFit ) >0): 
    599                     self.qmin.Disable() 
    600                     self.qmax.Disable() 
    601                 else: 
    602                     self.qmin.Enable() 
    603                     self.qmax.Enable() 
    604             else: 
    605                 for item in self.parameters: 
    606                     item[0].SetValue(False) 
    607                 for item in self.fittable_param: 
    608                     item[0].SetValue(False) 
    609                 self.param_toFit=[] 
    610                
    611                 self.qmin.Disable() 
    612                 self.qmax.Disable() 
     585        self.select_all_param_helper() 
    613586                 
    614587                 
Note: See TracChangeset for help on using the changeset viewer.