diff --git a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/EnginXFitPeaks.py b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/EnginXFitPeaks.py index 79dadc64d72d6e47b3a9fa7ac643b87271ddc388..35d9ff4dfbf0a2440bfb78e5ed43f49a9ed1b419 100644 --- a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/EnginXFitPeaks.py +++ b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/EnginXFitPeaks.py @@ -34,13 +34,13 @@ class EnginXFitPeaks(PythonAlgorithm): "find expected peaks. This takes precedence over 'ExpectedPeaks' if both " "options are given.") - self.declareProperty('OutParametersTableName', '', direction=Direction.Input, + self.declareProperty('OutParametersTable', '', direction=Direction.Input, doc = 'Name for a table workspace with the fitted values calculated by ' 'this algorithm (Difc and Zero parameters) for GSAS. ' 'These two parameters are added as two columns in a single row. If not given, ' 'the table workspace is not created.') - self.declareProperty('OutFittedPeaksTableName', '', direction=Direction.Input, + self.declareProperty('OutFittedPeaksTable', '', direction=Direction.Input, doc = 'Name for a table workspace with the parameters of the peaks found and ' 'fitted. If not given, the table workspace is not created.') @@ -81,7 +81,7 @@ class EnginXFitPeaks(PythonAlgorithm): "FindPeaks which this algorithm uses to check that the data has the the " "expected peaks. " + txt) - peaksTableName = self.getPropertyValue("OutFittedPeaksTableName") + peaksTableName = self.getPropertyValue("OutFittedPeaksTable") difc, zero = self._fitAllPeaks(inWS, wsIndex, (foundPeaks, expectedPeaksD), peaksTableName) self._produceOutputs(difc, zero) @@ -108,7 +108,7 @@ class EnginXFitPeaks(PythonAlgorithm): self.setProperty('Zero', zero) # optional outputs - tblName = self.getPropertyValue("OutParametersTableName") + tblName = self.getPropertyValue("OutParametersTable") if '' != tblName: EnginXUtils.generateOutputParTable(tblName, difc, zero) self.log().information("Output parameters added into a table workspace: %s" % tblName) diff --git a/Code/Mantid/Framework/PythonInterface/test/python/plugins/algorithms/EnginXFitPeaksTest.py b/Code/Mantid/Framework/PythonInterface/test/python/plugins/algorithms/EnginXFitPeaksTest.py index aedb94ef840990c4ca98d2b57a6844acd4149ac0..1eb59946080424f8750e9742a76b16a7b826a9da 100644 --- a/Code/Mantid/Framework/PythonInterface/test/python/plugins/algorithms/EnginXFitPeaksTest.py +++ b/Code/Mantid/Framework/PythonInterface/test/python/plugins/algorithms/EnginXFitPeaksTest.py @@ -163,8 +163,8 @@ class EnginXFitPeaksTest(unittest.TestCase): ep2 = 1.09 paramsTblName = 'test_difc_zero_table' difc, zero = EnginXFitPeaks(sws, WorkspaceIndex=0, ExpectedPeaks=[ep1, ep2], - OutFittedPeaksTableName=peaksTblName, - OutParametersTableName=paramsTblName) + OutFittedPeaksTable=peaksTblName, + OutParametersTable=paramsTblName) pTable = mtd[paramsTblName] self.assertEquals(pTable.rowCount(), 1) self.assertEquals(pTable.columnCount(), 2) @@ -179,7 +179,7 @@ class EnginXFitPeaksTest(unittest.TestCase): self.assertTrue(self._approxRelErrorLessThan(pTable.cell(0,0), expected_difc, 5e-3)) self.assertTrue(self._approxRelErrorLessThan(pTable.cell(0,1), expected_zero, 5e-3)) - # check 'OutFittedPeaksTableName' table workspace + # check 'OutFittedPeaksTable' table workspace self._check_outputs_ok(peaksTblName, 2, ep1, -8.193560670563205e-10, ep2, 1.723902507582676e-07) @@ -204,7 +204,7 @@ class EnginXFitPeaksTest(unittest.TestCase): ep2 = 0.83 ep3 = 1.09 difc, zero = EnginXFitPeaks(sws, WorkspaceIndex=0, ExpectedPeaks=[ep1, ep2, ep3], - OutFittedPeaksTableName=peaksTblName) + OutFittedPeaksTable=peaksTblName) expected_difc = 17335.67250113934 # assertLess would be nices, but only available in unittest >= 2.7 @@ -212,7 +212,7 @@ class EnginXFitPeaksTest(unittest.TestCase): expected_zero = 958.2547157813959 self.assertTrue(self._approxRelErrorLessThan(zero, expected_zero, 5e-3)) - # check 'OutFittedPeaksTableName' table workspace + # check 'OutFittedPeaksTable' table workspace self._check_outputs_ok(peaksTblName, 3, ep1, -8.193560670563205e-10, ep2, 1.3304856478614542e-05) diff --git a/Code/Mantid/docs/source/algorithms/EnginXFitPeaks-v1.rst b/Code/Mantid/docs/source/algorithms/EnginXFitPeaks-v1.rst index 299a34924e6405ad6fadad0de8b0947bf3e3fc5d..55cc3ede31a97fa8709ef2af03e248534a3d21e0 100644 --- a/Code/Mantid/docs/source/algorithms/EnginXFitPeaks-v1.rst +++ b/Code/Mantid/docs/source/algorithms/EnginXFitPeaks-v1.rst @@ -33,10 +33,10 @@ ZERO and Difc can then be used within the GSAS program. The parameters DIFC and ZERO are returned and can be retrieved as output properties as well. -If a name is given in OutParametersTableName this algorithm also +If a name is given in OutParametersTable this algorithm also produces a table workspace with that name, containing the two fitted (DIFC, ZERO) parameters. Also, if a name is given in -OutFittedPeaksTableName, the algorithm produces a table workspace with +OutFittedPeaksTable, the algorithm produces a table workspace with information about the peaks fitted. The table has one row per peak and several columns for the different fitted parameters (and the errors of these parameters). @@ -68,7 +68,7 @@ Usage # difc, zero = EnginXFitPeaks(InputWorkspace = No default, WorkspaceIndex = None, ExpectedPeaks=[0.6, 1.9], ExpectedPeaksFromFile=None) out_tbl_name = 'out_params' - difc, zero = EnginXFitPeaks(ws, 0, [0.65, 1.9], OutParametersTableName=out_tbl_name) + difc, zero = EnginXFitPeaks(ws, 0, [0.65, 1.9], OutParametersTable=out_tbl_name) # Print the results