Changeset 6d91073 in sasview for sansview/perspectives/fitting/fitpage.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/fitpage.py
rc99a6c5 r6d91073 82 82 if event.type =="park": 83 83 self.btFit.SetLabel("Fit") 84 84 85 85 for item in self.parameters: 86 86 if event.type =="scipy" : … … 136 136 item[5].Show(True) 137 137 item[6].Show(True) 138 139 self.SetScrollbars(20,20,25,65) 138 self.Layout() 139 140 140 141 141 … … 835 835 raise ValueError,"missing parameter to fit" 836 836 837 def onsetValues(self,chisqr, out,cov):837 def onsetValues(self,chisqr,p_name, out,cov): 838 838 """ 839 839 Build the panel from the fit result 840 840 @param chisqr:Value of the goodness of fit metric 841 @p_name: the name of parameters 841 842 @param out:list of parameter with the best value found during fitting 842 843 @param cov:Covariance matrix … … 859 860 #set the panel when fit result are float not list 860 861 if out.__class__== numpy.float64: 862 print "float64" 861 863 self.param_toFit[0][2].SetValue(format_number(out)) 862 864 self.param_toFit[0][2].Refresh() … … 916 918 pass 917 919 for j in range(len(out)): 918 if out[j]==self.model.getParam(item[1]):919 920 921 if item[1] == p_name[j]: 920 922 break 921 923 ## unable to compare cov[j]==numpy.nan so switch to None 922 924 #Save errors to model.details[item][3] 923 self.model.details[item[1]][3] = cov[i] 924 925 926 if cov[i]==None or not numpy.isfinite(cov[i]): 925 self.model.details[item[1]][3] = cov[j] 926 927 if cov[j]==None or not numpy.isfinite(cov[j]): 927 928 928 929 if item[3].IsShown: … … 930 931 if item[4].IsShown: 931 932 item[4].Hide() 932 #k += 1 933 933 #k += 1 934 934 935 935 else: … … 938 938 item[3].Refresh() 939 939 item[4].Show(True) 940 item[4].SetValue(format_number(cov[ i]))940 item[4].SetValue(format_number(cov[j])) 941 941 item[4].Refresh() 942 942
Note: See TracChangeset
for help on using the changeset viewer.