- Timestamp:
- Mar 29, 2019 6:52:16 AM (6 years ago)
- Branches:
- ESS_GUI_bumps_abstraction
- Children:
- f86343bd
- Parents:
- fec5842
- Location:
- src/sas
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingOptions.py
rfec5842 rccfe03b 27 27 _longName = None 28 28 _type = None 29 _description = None # an optional description for the user, will be shown as UI tooltip 29 30 _defaultValue = None 30 31 value = None 31 32 32 def __init__(self, shortName, longName, dtype, defaultValue ):33 def __init__(self, shortName, longName, dtype, defaultValue, description = None): 33 34 self._shortName = shortName 34 35 self._longName = longName 35 36 self._type = dtype 37 self._description = description 36 38 self._defaultValue = defaultValue 37 39 self.value = defaultValue … … 48 50 def type(self): 49 51 return self._type 52 53 @property 54 def description(self): 55 return self._description 50 56 51 57 @property … … 136 142 def __str__(self): 137 143 return "\n".join(["{}: {}".format(key, fm) for key, fm in self._methods.items()]) 144 145 from sas.sascalc.fit.BumpsFitting import toolTips as bumpsToolTips 138 146 139 147 class FittingMethodBumps(FittingMethod): … … 162 170 longName, dtype = bumps.options.FIT_FIELDS[shortName] 163 171 dtype = self._convertParamType(dtype) 164 param = FittingMethodParameter(shortName, longName, dtype, defValue) 172 key = shortName+"_"+f.id 173 descr = bumpsToolTips.get(key, None) 174 param = FittingMethodParameter(shortName, longName, dtype, defValue, 175 description=descr) 165 176 params.append(param) 166 177 self.add(FittingMethodBumps(f.id, f.name, params)) … … 308 319 for param in fm.params.values(): 309 320 row = layout.rowCount()+1 310 layout.addWidget(self._makeLabel(param.longName), row, 0) 321 label = self._makeLabel(param.longName) 322 layout.addWidget(label, row, 0) 311 323 widget = self._inputWidgetFromType(param.type, self) 312 324 if widget is None: 313 325 continue 326 if param.description is not None: 327 widget.setToolTip(param.description) 328 label.setToolTip(param.description) 329 layout.addWidget(widget, row, 1) 314 330 widgetName = param.shortName+'_'+fm.shortName 315 layout.addWidget(widget, row, 1)316 331 setattr(self, widgetName, widget) 317 332 layout.addItem(QtWidgets.QSpacerItem(0, 0, vPolicy=QtWidgets.QSizePolicy.Expanding)) -
src/sas/sascalc/fit/BumpsFitting.py
r1386b2f rccfe03b 32 32 from sas.sascalc.fit.AbstractFitEngine import FResult 33 33 from sas.sascalc.fit.expression import compile_constraints 34 35 # converted from FittingOptionsUI.py file 36 toolTips = dict( 37 samples_dream = "<html><head/><body><p>Number of points to be drawn from the Markov chain.</p></body></html>", 38 burn_dream = "<html><head/><body><p>The number of iterations to required for the Markov chain to converge to the equilibrium distribution.</p></body></html>", 39 pop_dream = "<html><head/><body><p>The size of the population.</p></body></html>", 40 init_dream = "<html><head/><body><p><span style=\" font-style:italic;\">Initializer</span> determines how the population will be initialized. The options are as follows:</p><p><span style=\" font-style:italic;\">eps</span> (epsilon ball), in which the entire initial population is chosen at random from within a tiny hypersphere centered about the initial point</p><p><span style=\" font-style:italic;\">lhs</span> (latin hypersquare), which chops the bounds within each dimension in <span style=\" font-weight:600;\">k</span> equal sized chunks where <span style=\" font-weight:600;\">k</span> is the size of the population and makes sure that each parameter has at least one value within each chunk across the population.</p><p><span style=\" font-style:italic;\">cov</span> (covariance matrix), in which the uncertainty is estimated using the covariance matrix at the initial point, and points are selected at random from the corresponding gaussian ellipsoid</p><p><span style=\" font-style:italic;\">random</span> (uniform random), in which the points are selected at random within the bounds of the parameters</p></body></html>", 41 thin_dream = "<html><head/><body><p>The amount of thinning to use when collecting the population.</p></body></html>", 42 steps_dream = "<html><head/><body><p>Determines the number of iterations to use for drawing samples after burn in.</p></body></html>", 43 steps_lm = "<html><head/><body><p>The number of gradient steps to take.</p></body></html>", 44 ftol_lm = "<html><head/><body><p>Used to determine when the fit has reached the point where no significant improvement is expected.</p></body></html>", 45 xtol_lm = "<html><head/><body><p>Used to determine when the fit has reached the point where no significant improvement is expected.</p></body></html>", 46 steps_newton = "<html><head/><body><p>The number of gradient steps to take.</p></body></html>", 47 starts_newton = "<html><head/><body><p>Value thattells the optimizer to restart a given number of times. Each time it restarts it uses a random starting point.</p></body></html>", 48 ftol_newton = "<html><head/><body><p>Used to determine when the fit has reached the point where no significant improvement is expected.</p></body></html>", 49 xtol_newton = "<html><head/><body><p>Used to determine when the fit has reached the point where no significant improvement is expected.</p></body></html>", 50 steps_de = "<html><head/><body><p>The number of iterations.</p></body></html>", 51 CR_de = "<html><head/><body><p>The size of the population.</p></body></html>", 52 F_de = "<html><head/><body><p>Determines how much to scale each difference vector before adding it to the candidate point.</p></body></html>", 53 ftol_de = "<html><head/><body><p>Used to determine when the fit has reached the point where no significant improvement is expected.</p></body></html>", 54 xtol_de = "<html><head/><body><p>Used to determine when the fit has reached the point where no significant improvement is expected.</p></body></html>", 55 steps_amoeba = "<html><head/><body><p>The number of simplex update iterations to perform.</p></body></html>", 56 starts_amoeba = "<html><head/><body><p>Tells the optimizer to restart a given number of times. Each time it restarts it uses a random starting point.</p></body></html>", 57 radius_amoeba = "<html><head/><body><p>The initial size of the simplex, as a portion of the bounds defining the parameter space.</p></body></html>", 58 ftol_amoeba = "<html><head/><body><p>Used to determine when the fit has reached the point where no significant improvement is expected. </p></body></html>", 59 xtol_amoeba = "<html><head/><body><p>Used to determine when the fit has reached the point where no significant improvement is expected. </p></body></html>", 60 ) 34 61 35 62 class Progress(object):
Note: See TracChangeset
for help on using the changeset viewer.