Changeset 0aeba4e in sasview
- Timestamp:
- Apr 16, 2018 4:33:06 PM (7 years ago)
- Branches:
- ticket-1094-headless
- Children:
- f6f3fb4
- Parents:
- e870702
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/fit/BumpsFitting.py
r1386b2f r0aeba4e 2 2 BumpsFitting module runs the bumps optimizer. 3 3 """ 4 from __future__ import print_function 5 4 6 import os 5 7 from datetime import timedelta, datetime … … 9 11 10 12 from bumps import fitters 13 11 14 try: 12 15 from bumps.options import FIT_CONFIG 16 # Preserve bumps default fitter in case someone wants it later 17 BUMPS_DEFAULT_FITTER = FIT_CONFIG.selected_id 13 18 # Default bumps to use the Levenberg-Marquardt optimizer 14 19 FIT_CONFIG.selected_id = fitters.LevenbergMarquardtFit.id … … 17 22 except ImportError: 18 23 # CRUFT: Bumps changed its handling of fit options around 0.7.5.6 24 # Preserve bumps default fitter in case someone wants it later 25 BUMPS_DEFAULT_FITTER = fitters.FIT_DEFAULT 19 26 # Default bumps to use the Levenberg-Marquardt optimizer 20 27 fitters.FIT_DEFAULT = 'lm' … … 126 133 if initial_values is not None: 127 134 self._reset_pars(fitted, initial_values) 135 #print("constraints", constraints) 128 136 self.constraints = dict(constraints) 129 137 self.set_fitted(fitted) … … 222 230 def _setup(self): 223 231 exprs = {} 224 for M in self.models: 225 exprs.update((".".join((M.name, k)), v) for k, v in M.constraints.items()) 232 for model in self.models: 233 exprs.update((".".join((model.name, k)), v) 234 for k, v in model.constraints.items()) 226 235 if exprs: 227 symtab = dict((".".join(( M.name, k)), p)228 for Min self.models229 for k, p in M.parameters().items())236 symtab = dict((".".join((model.name, k)), p) 237 for model in self.models 238 for k, p in model.parameters().items()) 230 239 self.update = compile_constraints(symtab, exprs) 231 240 else:
Note: See TracChangeset
for help on using the changeset viewer.