Ignore:
Timestamp:
Nov 6, 2009 10:32:20 AM (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:
f9de20e
Parents:
7a77859
Message:

fixed dipspersion errors displaying wrong values

File:
1 edited

Legend:

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

    r7a77859 r6d91073  
    357357        if string.find(item,".")!=-1: 
    358358            param_names= re.split("\.",item) 
    359             model_name=param_names[0] 
    360             param_name=param_names[1]   
     359            model_name=param_names[0]            
     360            ##Assume max len is 3; eg., M0.radius.width 
     361            if len(param_names) == 3: 
     362                param_name=param_names[1]+"."+param_names[2] 
     363            else: 
     364                param_name=param_names[1]                     
    361365            return model_name,param_name 
    362366         
     
    755759                    model= value.get_model() 
    756760                    break 
     761            param_name = [] 
    757762            i = 0 
    758763            for name in pars: 
     764                param_name.append(name) 
    759765                if result.pvec.__class__==numpy.float64: 
    760766                    model.setParam(name,result.pvec) 
     
    763769                    i += 1 
    764770            ## Reset values of the current page to fit result 
    765             cpage.onsetValues(result.fitness, result.pvec,result.stderr) 
     771            cpage.onsetValues(result.fitness,param_name, result.pvec,result.stderr) 
    766772            ## plot the current model with new param 
    767773            metadata =  self.page_finder[cpage].get_fit_data() 
     
    804810                    model = value.get_model() 
    805811                    metadata =  value.get_plotted_data() 
     812                    small_param_name = [] 
    806813                    small_out = [] 
    807814                    small_cov = [] 
     
    815822                                small_out.append(p.value ) 
    816823                                model.setParam(param_name,p.value)  
    817                                
     824                                small_param_name.append(param_name) 
    818825                                small_cov.append(p.stderr) 
    819826                            else: 
    820827                                value= model.getParam(param_name) 
    821828                                small_out.append(value ) 
     829                                small_param_name.append(param_name) 
    822830                                small_cov.append(None) 
    823831                    # Display result on each page  
    824                     page.onsetValues(result.fitness, small_out,small_cov) 
     832                    page.onsetValues(result.fitness, small_param_name,small_out,small_cov) 
    825833                    #Replot models 
    826834                    msg= "Simultaneous Fit completed. plotting... %s:"%model.name 
Note: See TracChangeset for help on using the changeset viewer.