Changeset 9817207 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
- Timestamp:
- Nov 23, 2018 6:48:03 AM (5 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 9c05f22
- Parents:
- 72651df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r7f41584 r9817207 673 673 unit = "" 674 674 if model.item(row, 4+column_shift) is not None: 675 unit = model.item(row, 4+column_shift).text() 676 675 u = model.item(row, 4+column_shift).text() 676 # This isn't a unit if it is a number (polyd./magn.) 677 unit = "" if isNumber(u) else u 677 678 param.append([checkbox_state, param_name, value, "", 678 679 680 679 [error_state, error_value], 680 [min_state, min_value], 681 [max_state, max_value], unit]) 681 682 682 683 return param 684 685 def isNumber(s): 686 """ 687 Checks if string 's' is an int/float 688 """ 689 if s.isdigit(): 690 # check int 691 return True 692 else: 693 try: 694 # check float 695 _ = float(s) 696 except ValueError: 697 return False 698 return True 683 699 684 700 def getOrientationParam(kernel_module=None):
Note: See TracChangeset
for help on using the changeset viewer.