Changeset 284f6fe in sasview for fittingview/src


Ignore:
Timestamp:
Oct 4, 2011 12:49:12 PM (13 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:
5cf1e5b
Parents:
e2160ab
Message:

support simul. fit with one data set

Location:
fittingview/src/sans/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitting.py

    r87e2f81 r284f6fe  
    712712        fitter_list = []         
    713713        sim_fitter = None      
     714        is_single_fit = True 
    714715        if self.sim_page is not None and self.sim_page.uid == uid: 
    715             #simulatanous fit only one engine need to be created     
     716            #simulatanous fit only one engine need to be created  
     717            ## if simultaneous fit change automatically the engine to park 
     718            self._on_change_engine(engine='park')    
    716719            sim_fitter = Fit(self._fit_engine)   
    717720            fitter_list.append(sim_fitter)  
     721            is_single_fit = False 
     722 
     723        self.fitproblem_count = fitproblem_count   
     724        if self._fit_engine == "park": 
     725            engineType = "Simultaneous Fit" 
     726        else: 
     727            engineType = "Single Fit" 
    718728         
    719729        self.current_pg = None 
     
    784794        self._mac_sleep(0.2) 
    785795        ## perform single fit 
    786         if fitproblem_count == 1: 
     796        if is_single_fit: 
    787797            calc_fit = FitThread(handler = handler, 
    788798                                    fn=fitter_list, 
  • fittingview/src/sans/perspectives/fitting/simfitpage.py

    r0a9871c r284f6fe  
    205205         
    206206        ## display constraint fields 
    207         if len(self.model_toFit)==2: 
     207        if len(self.model_toFit)==1: 
    208208            self._store_model() 
    209209            if self.show_constraint.GetValue() and\ 
     
    211211                self._show_all_constraint()  
    212212                self._show_constraint() 
    213         elif len(self.model_toFit)< 2: 
     213        elif len(self.model_toFit)< 1: 
    214214            ##constraint info 
    215215            self._hide_constraint()               
     
    281281         Store selected model 
    282282        """ 
    283         if len(self.model_toFit) < 2: 
     283        if len(self.model_toFit) < 1: 
    284284            return 
    285285        for item in self.model_toFit: 
     
    292292        Show fields to add constraint 
    293293        """ 
    294         if len(self.model_toFit)< 2: 
     294        if len(self.model_toFit)< 1: 
    295295            msg= "Select at least 2 models to add constraint " 
    296296            wx.PostEvent(self.parent.parent, StatusEvent(status= msg )) 
     
    447447                #self.SetScrollbars(20,20,25,65) 
    448448                return 
    449         if len(self.model_toFit) < 2 : 
    450             msg= "Select at least 2 model to add constraint " 
     449        if len(self.model_toFit) < 1 : 
     450            msg= "Select at least 1 model to add constraint " 
    451451            wx.PostEvent(self.parent.parent, StatusEvent(status= msg )) 
    452452            self.sizer_constraints.Layout() 
     
    614614        self.btFit.SetToolTipString("Perform fit.") 
    615615         
    616         text= "Hint: Park fitting engine will be selected \n" 
    617         text+= "automatically for more than 2 combinations checked" 
     616        text= "Hint: Park fitting engine will be selected automatically. \n" 
     617        #text+= "automatically for more than 2 combinations checked" 
    618618        text_hint = wx.StaticText(self,-1,text) 
    619619         
Note: See TracChangeset for help on using the changeset viewer.