Changeset 6b126e8 in sasview for park_integration
- Timestamp:
- Jul 30, 2008 3:52:48 PM (16 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:
- 60dc5f2c
- Parents:
- 8780e9a
- Location:
- park_integration
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/ParkFitting.py
r7924042 r6b126e8 49 49 def __init__(self, sans_model): 50 50 self.model = sans_model 51 print "ParkFitting:sans model",self.model51 #print "ParkFitting:sans model",self.model 52 52 sansp = sans_model.getParamList() 53 print "ParkFitting: sans model parameter list",sansp53 #print "ParkFitting: sans model parameter list",sansp 54 54 parkp = [SansParameter(p,sans_model) for p in sansp] 55 print "ParkFitting: park model parameter ",parkp55 #print "ParkFitting: park model parameter ",parkp 56 56 self.parameterset = park.ParameterSet(sans_model.name,pars=parkp) 57 57 58 58 def eval(self,x): 59 print "eval",self.parameterset[0].value,self.parameterset[1].value60 print "model run ",self.model.run(x)59 #print "eval",self.parameterset[0].value,self.parameterset[1].value 60 #print "model run ",self.model.run(x) 61 61 return self.model.run(x) 62 62 … … 156 156 #wrap sans model 157 157 parkmodel = Model(sansmodel) 158 print "ParkFitting: createproblem: just create a model",parkmodel.parameterset158 #print "ParkFitting: createproblem: just create a model",parkmodel.parameterset 159 159 for p in parkmodel.parameterset: 160 160 #self.param_list.append(p._getname()) 161 if p.isfixed() and p._getname()in self.paramList: 161 if p.isfixed(): 162 #if p.isfixed() and p._getname()in self.paramList: 162 163 p.set([-numpy.inf,numpy.inf]) 163 164 … … 167 168 parkdata=Data(x,y,dy,None) 168 169 couple=(parkmodel,parkdata) 169 print "Parkfitting: fitness",couple170 #print "Parkfitting: fitness",couple 170 171 mylist.append(couple) 171 print "mylist",mylist172 #print "mylist",mylist 172 173 self.problem = park.Assembly(mylist) 173 174 … … 190 191 """ 191 192 #from numpy.linalg.linalg.LinAlgError import LinAlgError 192 print "Parkfitting: fit method probably breaking just right before \193 call fit"193 #print "Parkfitting: fit method probably breaking just right before \ 194 #call fit" 194 195 self.createProblem() 195 196 pars=self.problem.fit_parameters() … … 206 207 handler= fitresult.ConsoleUpdate(improvement_delta=0.1)) 207 208 208 for p in result.parameters:209 print "fit in park fitting", p.name, p.value210 return result.fitness,result.pvec,result.cov 209 #for p in result.parameters: 210 # print "fit in park fitting", p.name, p.value,p.stderr 211 return result.fitness,result.pvec,result.cov,result 211 212 212 213 except : -
park_integration/test/testdata_line.txt
r792db7d5 r6b126e8 33 33 5.91837 14.9428 2.81939 34 34 6.12245 22.1974 2.89592 35 6.32653 17.3418 2.97245 36 6.53061 19.8174 3.04898 37 6.73469 17.6186 3.12551 38 6.93878 21.329 3.20204 39 7.14286 20.2873 3.27857 40 7.34694 23.4112 3.3551 41 7.55102 26.063 3.43163 42 7.7551 29.8775 3.50816 43 7.95918 19.0027 3.58469 44 8.16327 19.4248 3.66122 45 8.36735 27.4876 3.73776 46 8.57143 33.8399 3.81429 47 8.77551 24.2611 3.89082 48 8.97959 29.8796 3.96735 49 9.18367 24.6149 4.04388 50 9.38776 35.7664 4.12041 51 9.59184 32.145 4.19694 52 9.79592 24.8085 4.27347 53 10 31.3767 4.35
Note: See TracChangeset
for help on using the changeset viewer.