Changeset f3113c9 in sasview for sansview


Ignore:
Timestamp:
Feb 27, 2009 10:18:12 AM (15 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:
e9e914f
Parents:
85e94e7
Message:

small bug fixed

Location:
sansview/perspectives/fitting
Files:
3 edited

Legend:

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

    r51d47b5 rf3113c9  
    241241        ix += 1 
    242242        self.sizer9.Add(self.btFit,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    243          
     243        """ 
    244244        id = wx.NewId() 
    245245        self.btStopFit =wx.Button(self,id,'Stop') 
     
    249249        ix += 1 
    250250        self.sizer9.Add(self.btStopFit,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    251          
     251        """ 
    252252        ix =0 
    253253        iy+=1  
     
    334334         
    335335    def onStopFit(self, event): 
    336          
    337336        self.manager.stop_fit() 
    338337        self.btStopFit.Hide() 
     338        self.btFit.Show(True) 
    339339        self.vbox.Layout() 
    340340        self.SetScrollbars(20,20,55,40) 
    341341        self.Layout() 
    342342        self.parent.GetSizer().Layout() 
     343         
    343344    def compute_chisqr(self): 
    344345        """ @param fn: function that return model value 
     
    434435                                            ymin=self.data.ymin, ymax=self.data.ymax, 
    435436                                            xmin=self.data.xmin,xmax=self.data.xmax) 
    436                 self.btStopFit.Show() 
     437                #self.btStopFit.Show() 
     438                #self.btFit.Hide() 
    437439            else: 
    438440                 self.manager._on_single_fit(qmin=self.qmin_x,qmax=self.qmax_x) 
    439                  self.btStopFit.Show() 
     441                 #self.btStopFit.Show() 
     442                 #self.btFit.Hide() 
    440443            self.vbox.Layout() 
    441444            self.SetScrollbars(20,20,55,40) 
  • sansview/perspectives/fitting/fitting.py

    r51d47b5 rf3113c9  
    1 import os,os.path, re 
     1#import os,os.path, re 
    22import sys, wx, logging 
    33import string, numpy, math 
     
    1313from fitpanel import FitPanel 
    1414from fit_thread import FitThread 
    15 import models,modelpage 
     15import models#,modelpage 
    1616import fitpage1D 
    17 import park 
     17#import park 
    1818DEFAULT_BEAM = 0.005 
    1919DEFAULT_QMIN = 0.0 
     
    4747        self.standalone=True 
    4848        ## Fit engine 
    49         self._fit_engine = 'scipy' 
     49        self._fit_engine = 'park' 
    5050        self.enable_model2D=False 
    5151        # list of selcted data 
     
    7676        #Set park engine 
    7777        id3 = wx.NewId() 
    78         self.menu1.AppendCheckItem(id3, "park")  
     78        self.menu1.AppendCheckItem(id3, "scipy")  
    7979        wx.EVT_MENU(owner, id3, self._onset_engine) 
    8080         
     
    427427    def stop_fit(self): 
    428428        if self.calc_thread != None and self.calc_thread.isrunning(): 
    429                      
    430                     self.calc_thread.interrupt() 
    431                     self.calc_thread.stop() 
    432                     wx.PostEvent(self.parent, StatusEvent(status="Fitting  \ 
    433         is cancelled" , type="stop")) 
     429            #self.calc_thread.interrupt() 
     430            self.calc_thread.stop() 
     431            wx.PostEvent(self.parent, StatusEvent(status="Fitting  \ 
     432is cancelled" , type="stop")) 
    434433    def _on_single_fit(self,id=None,qmin=None, qmax=None,ymin=None, ymax=None,xmin=None,xmax=None): 
    435434        """  
  • sansview/perspectives/fitting/modelpage.py

    r51d47b5 rf3113c9  
    539539                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    540540        self.text2_3.Hide()  
     541         
    541542        ix +=1 
    542543        self.text2_5 = wx.StaticText(self, -1, 'Min') 
     
    547548        self.sizer5.Add(self.text2_6,(iy, ix),(1,1),\ 
    548549                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
     550        if self.data ==None: 
     551            self.text2_5.Hide() 
     552            self.text2_6.Hide() 
    549553        ix +=1 
    550554        self.text2_4 = wx.StaticText(self, -1, 'Units') 
     
    604608                ctl4.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 
    605609                self.sizer5.Add(ctl4, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    606                  
     610                if self.data==None: 
     611                    ctl4.Hide() 
     612                    ctl3.Hide() 
    607613                ix +=1 
    608614                # Units 
Note: See TracChangeset for help on using the changeset viewer.