Changeset 6d91073 in sasview for sansview/perspectives/fitting/fitting.py
- Timestamp:
- Nov 6, 2009 10:32:20 AM (15 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
r7a77859 r6d91073 357 357 if string.find(item,".")!=-1: 358 358 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] 361 365 return model_name,param_name 362 366 … … 755 759 model= value.get_model() 756 760 break 761 param_name = [] 757 762 i = 0 758 763 for name in pars: 764 param_name.append(name) 759 765 if result.pvec.__class__==numpy.float64: 760 766 model.setParam(name,result.pvec) … … 763 769 i += 1 764 770 ## 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) 766 772 ## plot the current model with new param 767 773 metadata = self.page_finder[cpage].get_fit_data() … … 804 810 model = value.get_model() 805 811 metadata = value.get_plotted_data() 812 small_param_name = [] 806 813 small_out = [] 807 814 small_cov = [] … … 815 822 small_out.append(p.value ) 816 823 model.setParam(param_name,p.value) 817 824 small_param_name.append(param_name) 818 825 small_cov.append(p.stderr) 819 826 else: 820 827 value= model.getParam(param_name) 821 828 small_out.append(value ) 829 small_param_name.append(param_name) 822 830 small_cov.append(None) 823 831 # 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) 825 833 #Replot models 826 834 msg= "Simultaneous Fit completed. plotting... %s:"%model.name
Note: See TracChangeset
for help on using the changeset viewer.