Changeset 1dc134e6 in sasview for src/sas/sascalc
- Timestamp:
- Oct 3, 2018 2:42:00 PM (6 years ago)
- Branches:
- ticket-1094-headless
- Children:
- 1580cc3
- Parents:
- 840ac87 (diff), db24ec1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas/sascalc
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/fit/pagestate.py
r840ac87 r1dc134e6 767 767 if len(value.strip()) == 0: 768 768 continue 769 title = value + " [" + repo_time + "]" 769 title = (value + " [" + repo_time + "] [SasView v" + 770 SASVIEW_VERSION + "]") 770 771 title_name = HEADER % title 771 772 elif name == "data": -
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.