Changeset 57be490 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
- Timestamp:
- May 17, 2018 2:50:09 AM (6 years ago)
- Branches:
- ESS_GUI, 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
- Children:
- 085e3c9d
- Parents:
- 976978b
- git-author:
- Piotr Rozyczko <rozyczko@…> (04/13/18 07:34:43)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (05/17/18 02:50:09)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
rb5cc06e r57be490 68 68 multishell_parameters = getIterParams(parameters) 69 69 multishell_param_name, _ = getMultiplicity(parameters) 70 70 71 if is2D: 71 72 params = [p for p in parameters.kernel_parameters if p.type != 'magnetic'] … … 443 444 444 445 446 def getStandardParam(model=None): 447 """ 448 Returns a list with standard parameters for the current model 449 """ 450 param = [] 451 num_rows = model.rowCount() 452 if num_rows < 1: 453 return None 454 455 for row in range(num_rows): 456 param_name = model.item(row, 0).text() 457 checkbox_state = model.item(row,0).checkState() == QtCore.Qt.Checked 458 value= model.item(row, 1).text() 459 column_shift = 0 460 if model.columnCount() == 5: # no error column 461 error_state = False 462 error_value = 0.0 463 else: 464 error_state = True 465 error_value = model.item(row, 2).text() 466 column_shift = 1 467 min_state = True 468 max_state = True 469 min_value = model.item(row, 2+column_shift).text() 470 max_value = model.item(row, 3+column_shift).text() 471 unit = "" 472 if model.item(row, 4+column_shift) is not None: 473 unit = model.item(row, 4+column_shift).text() 474 475 param.append([checkbox_state, param_name, value, "", 476 [error_state, error_value], 477 [min_state, min_value], 478 [max_state, max_value], unit]) 479 480 return param 481 482 def getOrientationParam(kernel_module=None): 483 """ 484 Get the dictionary with orientation parameters 485 """ 486 param = [] 487 if kernel_module is None: 488 return None 489 for param_name in list(kernel_module.params.keys()): 490 name = param_name 491 value = kernel_module.params[param_name] 492 min_state = True 493 max_state = True 494 error_state = False 495 error_value = 0.0 496 checkbox_state = True #?? 497 details = kernel_module.details[param_name] #[unit, mix, max] 498 param.append([checkbox_state, name, value, "", 499 [error_state, error_value], 500 [min_state, details[1]], 501 [max_state, details[2]], details[0]]) 502 503 return param
Note: See TracChangeset
for help on using the changeset viewer.