Changeset 15f68ce in sasview for fittingview/src


Ignore:
Timestamp:
Oct 18, 2011 10:43:19 AM (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:
74dc0a4
Parents:
ba7dceb
Message:

trying to fix scipy result handling

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

Legend:

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

    r49c69de r15f68ce  
    116116        """ 
    117117        self.elapsed_time = time.time() - self.elapsed_time 
    118         msg = " Updating fit ...\n result:\n %s \n"%self.result.__str__() 
     118        msg = " Updating fit ...\n result:\n %s \n"%self.result.fitness 
    119119        wx.PostEvent(self.parent, StatusEvent(status=msg, info="info", 
    120120                                              type="progress")) 
  • fittingview/src/sans/perspectives/fitting/fitpage.py

    r4679e16 r15f68ce  
    21162116                    item[2].SetValue(val_out) 
    21172117 
    2118                 if(cov !=None): 
     2118                if(cov !=None and len(cov) == len(out)): 
    21192119                    try: 
    21202120                        if dispersity !=None: 
     
    21272127                    except: 
    21282128                        pass     
    2129                 
     2129                     
    21302130                    if cov[ind]!=None : 
    21312131                        if numpy.isfinite(float(cov[ind])): 
  • fittingview/src/sans/perspectives/fitting/fitting.py

    rdafc36f r15f68ce  
    11211121                    #check consistency of arrays 
    11221122                    if not is_data2d: 
    1123                         if len(res.theory) == len(res.index) and \ 
     1123                        if len(res.theory) == len(res.index[res.index]) and \ 
    11241124                            len(res.index) == len(data.y): 
    11251125                            correct_result = True 
    11261126                    else: 
    1127                         if len(res.theory)== len(res.index) and \ 
     1127                        if len(res.theory)== len(res.index[res.index]) and \ 
    11281128                            len(res.index) == len(data.data): 
    11291129                            correct_result = True 
     
    11761176                            #save only fitted values 
    11771177                            batch_outputs[res.param_list[index]].append(res.pvec[index]) 
    1178                             item = res.stderr[index] 
    1179                             batch_inputs["error on %s" % res.param_list[index]].append(item) 
     1178                            if res.stderr is not None and len(res.stderr) == len(res.param_list): 
     1179                                item = res.stderr[index] 
     1180                                batch_inputs["error on %s" % res.param_list[index]].append(item) 
    11801181                            if res.param_list[index] in model.getParamList(): 
    11811182                                model.setParam(res.param_list[index], res.pvec[index]) 
     
    13051306                    index += 1 
    13061307                    cpage._on_fit_complete() 
    1307                     if res.stderr == None: 
     1308                    if res.fitness == None: 
    13081309                        msg = "Fit Abort: " 
    13091310                    else: 
Note: See TracChangeset for help on using the changeset viewer.