Skip to content

Commit

Permalink
Make the changes specified re #9783
Browse files Browse the repository at this point in the history
Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
  • Loading branch information
KarlPalmen committed Jun 30, 2014
1 parent 3edbb55 commit ffed16d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Expand Up @@ -48,7 +48,7 @@ def PyExec(self):

def _focusRun(self):
alg = self.createChildAlgorithm('EnginXFocus')
alg.setProperty('Run', self.getProperty('CalibrationRun').value)
alg.setProperty('InputWorkspace', self.getProperty('CalibrationRun').value)
alg.setProperty('Bank', self.getProperty('Bank').value)

detPos = self.getProperty('DetectorPositions').value
Expand Down
Expand Up @@ -12,16 +12,18 @@ def summary(self):
return "Focuses a run."

def PyInit(self):
self.declareProperty(FileProperty("Run", "", FileAction.Load),
self.declareProperty(FileProperty("InputWorkspace", "", FileAction.Load),
"Run to focus")


self.declareProperty(WorkspaceProperty("OutputWorkspace", "", Direction.Output),
"A workspace with focussed data")

self.declareProperty(ITableWorkspaceProperty("DetectorPositions", "", Direction.Input, PropertyMode.Optional),
"Calibrated detector positions. If not specified, default ones are used.")

self.declareProperty("Bank", 1, "Which bank to focus")

self.declareProperty(WorkspaceProperty("OutputWorkspace", "", Direction.Output),
"A workspace with focussed data")


def PyExec(self):
# Load the run file
Expand Down Expand Up @@ -52,7 +54,7 @@ def _loadRun(self):
""" Loads the specified run
"""
alg = self.createChildAlgorithm('Load')
alg.setProperty('Filename', self.getProperty("Run").value)
alg.setProperty('Filename', self.getProperty("InputWorkspace").value)
alg.execute()
return alg.getProperty('OutputWorkspace').value

Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/docs/source/algorithms/EnginXFocus-v1.rst
Expand Up @@ -22,7 +22,7 @@ and then converts them back to TOF.
.. testcode:: ExSimple

# Run the algorithm
ws = EnginXFocus(Run="ENGINX00213855.nxs",
ws = EnginXFocus(InputWorkspace="ENGINX00213855.nxs",
Bank=1)

# Should have one spectrum only
Expand Down

0 comments on commit ffed16d

Please sign in to comment.