Changeset bc873053 in sasview for test/sasfit/test/utest_fit_line.py
- Timestamp:
- Nov 10, 2015 5:39:44 PM (8 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:
- 80ba1a2
- Parents:
- 40c69b3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/sasfit/test/utest_fit_line.py
racf8e4a5 rbc873053 11 11 from sas.models.LineModel import LineModel 12 12 from sas.models.Constant import Constant 13 14 from bumps import fitters 15 try: 16 from bumps.options import FIT_CONFIG 17 def set_fitter(alg, opts): 18 FIT_CONFIG.selected_id = alg 19 FIT_CONFIG.values[alg].update(opts, monitors=[]) 20 except: 21 # CRUFT: Bumps changed its handling of fit options around 0.7.5.6 22 def set_fitter(alg, opts): 23 #print "fitting",alg,opts 24 #print "options",fitters.FIT_OPTIONS[alg].__dict__ 25 fitters.FIT_DEFAULT = alg 26 fitters.FIT_OPTIONS[alg].options.update(opts, monitors=[]) 27 13 28 14 29 class testFitModule(unittest.TestCase): … … 67 82 68 83 def fit_bumps(self, alg, **opts): 69 #Importing the Fit module 70 from bumps import fitters 71 fitters.FIT_DEFAULT = alg 72 fitters.FIT_OPTIONS[alg].options.update(opts) 73 fitters.FIT_OPTIONS[alg].options.update(monitors=[]) 74 #print "fitting",alg,opts 75 #kprint "options",fitters.FIT_OPTIONS[alg].__dict__ 84 set_fitter(alg, opts) 76 85 self.fit_single(isdream=(alg=='dream')) 77 86
Note: See TracChangeset
for help on using the changeset viewer.