Changeset bc873053 in sasview for test/sasfit
- Timestamp:
- Nov 10, 2015 5:39:44 PM (9 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
- Location:
- test/sasfit/test
- Files:
-
- 2 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 -
test/sasfit/test/utest_fit_smeared.py
racf8e4a5 rbc873053 13 13 from sas.models.CylinderModel import CylinderModel 14 14 from sas.models.SphereModel import SphereModel 15 16 17 from bumps import fitters 18 try: 19 from bumps.options import FIT_CONFIG 20 def set_fitter(alg, opts): 21 FIT_CONFIG.selected_id= alg 22 FIT_CONFIG.values[alg].update(opts, monitors=[]) 23 except: 24 # CRUFT: Bumps changed its handling of fit options around 0.7.5.6 25 def set_fitter(alg, opts): 26 #print "fitting",alg,opts 27 #print "options",fitters.FIT_OPTIONS[alg].__dict__ 28 fitters.FIT_DEFAULT = alg 29 fitters.FIT_OPTIONS[alg].options.update(opts, monitors=[]) 30 15 31 16 32 class testFitModule(unittest.TestCase): … … 57 73 Cylinder fit with dispersion 58 74 """ 59 alg = 'lm' 60 from bumps import fitters 61 fitters.FIT_DEFAULT = alg 62 #fitters.FIT_OPTIONS[alg].options.update(opts) 63 fitters.FIT_OPTIONS[alg].options.update(monitors=[]) 75 set_fitter('lm', {}) 64 76 self._dispersion(fitter = Fit()) 65 77
Note: See TracChangeset
for help on using the changeset viewer.