Skip to content
Snippets Groups Projects
Commit 6d38d3ef authored by Karl Palmen's avatar Karl Palmen
Browse files

Use 'Filename' for input file property re #9784

parent d5f5e074
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,8 @@ class EnginXCalibrate(PythonAlgorithm):
return "Calibrates a detector bank by performing a single peak fitting."
def PyInit(self):
self.declareProperty(FileProperty("InputWorkspace", "", FileAction.Load),
"Workspace of calibration run to use")
self.declareProperty(FileProperty("FileName", "", FileAction.Load),
"Calibration run to use")
self.declareProperty(FloatArrayProperty("ExpectedPeaks", ""),
"A list of dSpacing values where peaks are expected.")
......@@ -48,7 +48,7 @@ class EnginXCalibrate(PythonAlgorithm):
def _focusRun(self):
alg = self.createChildAlgorithm('EnginXFocus')
alg.setProperty('InputWorkspace', self.getProperty('CalibrationRun').value)
alg.setProperty('Filename', self.getProperty('CalibrationRun').value)
alg.setProperty('Bank', self.getProperty('Bank').value)
detPos = self.getProperty('DetectorPositions').value
......
......@@ -13,8 +13,8 @@ class EnginXCalibrateFull(PythonAlgorithm):
return "Calibrates every pixel position by performing single peak fitting."
def PyInit(self):
self.declareProperty(FileProperty("InputWorkspace", "", FileAction.Load),
"Workspace of calibration run to use")
self.declareProperty(FileProperty("Filename", "", FileAction.Load),
"Calibration run to use")
self.declareProperty(ITableWorkspaceProperty("DetectorPositions", "", Direction.Output),
"A table with calibrated detector positions as accepted by ApplyCalibration algorithm.")
......
......@@ -12,7 +12,7 @@ class EnginXFocus(PythonAlgorithm):
return "Focuses a run."
def PyInit(self):
self.declareProperty(FileProperty("InputWorkspace", "", FileAction.Load),
self.declareProperty(FileProperty("Filename", "", FileAction.Load),
"Run to focus")
self.declareProperty(WorkspaceProperty("OutputWorkspace", "", Direction.Output),
......@@ -54,7 +54,7 @@ class EnginXFocus(PythonAlgorithm):
""" Loads the specified run
"""
alg = self.createChildAlgorithm('Load')
alg.setProperty('Filename', self.getProperty("InputWorkspace").value)
alg.setProperty('Filename', self.getProperty("Filename").value)
alg.execute()
return alg.getProperty('OutputWorkspace').value
......
......@@ -22,7 +22,7 @@ and then converts them back to TOF.
.. testcode:: ExSimple
# Run the algorithm
ws = EnginXFocus(InputWorkspace="ENGINX00213855.nxs",
ws = EnginXFocus(Filename="ENGINX00213855.nxs",
Bank=1)
# Should have one spectrum only
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment