Changeset 4dd63eb in sasview for park_integration/test/constrainttestpark.py
- Timestamp:
- Jul 10, 2008 6:05:09 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:
- 49b3ddd
- Parents:
- 83ca047
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/test/constrainttestpark.py
r792db7d5 r4dd63eb 27 27 #Importing the Fit module 28 28 from sans.fit.Fitting import Fit 29 fitter= Fit( )29 fitter= Fit('park') 30 30 # Receives the type of model for the fitting 31 31 from sans.guitools.LineModel import LineModel 32 32 model1 = LineModel() 33 33 model2 = LineModel() 34 #set engine for scipy 35 fitter.fit_engine('park') 36 engine = fitter.returnEngine() 34 37 35 #Do the fit 38 engine.set_param( model1,"M1", {'A':2,'B':3})39 engine.set_model(model1,1)40 engine.set_data(data1,1)41 #print "m1 param b", M1.B42 engine.set_param( model2,"M2", {'A':'M1.A','B':'M1.B'})43 engine.set_model(model2,2)44 36 45 engine.set_data(data2,2) 37 fitter.set_model(model1,"M1",1, {'A':1,'B':2}) 38 fitter.set_data(data1,1) 39 40 fitter.set_model(model2,"M2",2, {'A':'M1.A','B':'M1.B'}) 41 fitter.set_data(data2,2) 46 42 47 43 48 chisqr2, out2, cov2= engine.fit({'A':2,'B':1},None,None)44 chisqr2, out2, cov2= fitter.fit() 49 45 print "chisqr2",chisqr2 50 46 print "out2", out2
Note: See TracChangeset
for help on using the changeset viewer.