Changeset 4a0d3197 in sasview
- Timestamp:
- May 15, 2018 4:04:13 AM (7 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, 6459916
- Parents:
- 5a731c63 (diff), bc3debf8 (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/qtgui/Calculators
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/DensityPanel.py
raed0532 rd813cf9a 16 16 17 17 from sas.qtgui.Utilities.GuiUtils import enum 18 from sas.qtgui.Utilities.GuiUtils import formatNumber 18 19 19 20 MODEL = enum( … … 98 99 if index == MODEL.MOLECULAR_FORMULA: 99 100 molarMass = toMolarMass(self.model.item(MODEL.MOLECULAR_FORMULA).text()) 101 molarMass = formatNumber(molarMass, high=True) 100 102 self.model.item(MODEL.MOLAR_MASS).setText(molarMass) 101 103 … … 120 122 121 123 molarDensity = molarMass / molarVolume 124 molarDensity = formatNumber(molarDensity, high=True) 122 125 self.model.item(MODEL.MASS_DENSITY).setText(str(molarDensity)) 123 126 … … 131 134 132 135 molarVolume = molarMass / molarDensity 136 molarVolume = formatNumber(molarVolume, high=True) 133 137 self.model.item(MODEL.MOLAR_VOLUME).setText(str(molarVolume)) 134 138 -
src/sas/qtgui/Calculators/UnitTesting/DensityCalculatorTest.py
re90988c rbc3debf8 78 78 79 79 # Assure the mass density field is set 80 self.assertEqual(self.widget.ui.editMassDensity.text(), '18.015 3')80 self.assertEqual(self.widget.ui.editMassDensity.text(), '18.015') 81 81 82 82 # Change mass density … … 88 88 89 89 # Assure the molar volume field got updated 90 self.assertEqual(self.widget.ui.editMolarVolume.text(), '1.12 595625')90 self.assertEqual(self.widget.ui.editMolarVolume.text(), '1.126') 91 91 92 92 def testComplexEntryAndReset(self): … … 113 113 114 114 self.assertEqual(self.widget.ui.editMolecularFormula.text(), "H2O") 115 self.assertEqual(self.widget.ui.editMolarMass.text(), "18.015 3")115 self.assertEqual(self.widget.ui.editMolarMass.text(), "18.015") 116 116 self.assertEqual(self.widget.ui.editMolarVolume.text(), "") 117 117 self.assertEqual(self.widget.ui.editMassDensity.text(), "") -
src/sas/qtgui/Calculators/media/data_oper_pic.png
- Property mode changed from 100755 to 100644
-
src/sas/qtgui/Calculators/media/density_calculator_help.rst
r417c03f r5a731c63 27 27 then type in an input value. 28 28 29 4) Click the 'Calculate' buttonto perform the calculation.29 4) Press Tab button or click out to perform the calculation. 30 30 31 31 .. image:: density_tutor.png -
src/sas/qtgui/Calculators/media/density_tutor.png
- Property mode changed from 100755 to 100644
Note: See TracChangeset
for help on using the changeset viewer.