Changeset 64c7f39 in sasview for src/sas/sasgui
- Timestamp:
- Nov 15, 2016 10:38:55 AM (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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 600005c
- Parents:
- 4ec7089
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r3d8c49a r64c7f39 1575 1575 return 1576 1576 1577 ordered_list = [] 1578 for i in range(len(listtorestore)) : 1579 for param in statelist: 1580 if param[1] == listtorestore[i][1]: 1581 ordered_list.append(param) 1582 break 1583 statelist = ordered_list 1584 1577 1585 for j in range(len(listtorestore)): 1578 1586 item_page = listtorestore[j] -
src/sas/sasgui/perspectives/fitting/pagestate.py
r3d8c49a r64c7f39 363 363 """ 364 364 from sasmodels import convert 365 import re 365 366 # Create conversion dictionary to send to sasmodels 366 367 p = dict() … … 378 379 lower[0] = False 379 380 lower[1] = numpy.nan 380 p[name] = { 381 "fittable" : bool(fittable), 382 "value" : float(value), 383 "std" : float(uncert[1]), 384 "upper" : float(upper[1]), 385 "lower" : float(lower[1]), 386 "units" : units, 387 } 381 p[name] = float(value) 382 p[name + ".fittable"] = bool(fittable) 383 p[name + ".std"] = float(uncert[1]) 384 p[name + ".upper"] = float(upper[1]) 385 p[name + ".lower"] = float(lower[1]) 386 p[name + ".units"] = units 388 387 name, params = convert.convert_model(self.formfactorcombobox, p) 389 388 … … 393 392 self.parameters = [] 394 393 for name, info in params.iteritems(): 395 if info.get("std") is not numpy.nan: 396 std = ['True', str(info.get("std"))] 394 if ".fittable" in name or ".std" in name or ".upper" in name or\ 395 ".lower" in name or ".units" in name: 396 pass 397 397 else: 398 std = ['False', ''] 399 if info.get("lower") is not numpy.nan: 400 lower = ['True', str(info.get("lower"))] 401 else: 402 lower = ['False', ''] 403 if info.get("upper") is not numpy.nan: 404 upper = ['True', str(info.get("upper"))] 405 else: 406 upper = ['False', ''] 407 param_list = [info.get("fittable"), name, info.get("value"), 408 "+/-", std, lower, upper] 409 self.parameters.append(param_list) 398 fittable = params.get(name + ".fittable") 399 std = params.get(name + ".std") 400 upper = params.get(name + ".upper") 401 lower = params.get(name + ".lower") 402 units = params.get(name + ".units") 403 if std is not None: 404 std = [True, str(std)] 405 else: 406 std = [False, ''] 407 if lower is not None: 408 lower = [True, str(lower)] 409 else: 410 lower = [False, ''] 411 if upper is not None: 412 upper = [True, str(upper)] 413 else: 414 upper = [False, ''] 415 param_list = [bool(fittable), str(name), str(info), 416 "+/-", std, lower, upper, str(units)] 417 self.parameters.append(param_list) 410 418 411 419
Note: See TracChangeset
for help on using the changeset viewer.