Skip to content

Commit

Permalink
expose vanadium correction from EXCalibrate, re #12426
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Jul 6, 2015
1 parent 51c229e commit a147937
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def PyInit(self):
self.declareProperty(MatrixWorkspaceProperty("InputWorkspace", "", Direction.Input),\
"Workspace with the calibration run to use.")

self.declareProperty(MatrixWorkspaceProperty("VanadiumWorkspace", "", Direction.Input),
"Workspace with the Vanadium (correction and calibration) run.")

self.declareProperty(FloatArrayProperty("ExpectedPeaks", ""),\
"A list of dSpacing values where peaks are expected.")

Expand Down Expand Up @@ -61,6 +64,7 @@ def PyExec(self):
import EnginXUtils

focussed_ws = self._focusRun(self.getProperty('InputWorkspace').value,
self.getProperty("VanadiumWorkspace").value
self.getProperty('Bank').value,
self.getProperty(self.INDICES_PROP_NAME).value)

Expand All @@ -75,12 +79,13 @@ def PyExec(self):

self._produceOutputs(difc, zero)

def _focusRun(self, ws, bank, indices):
def _focusRun(self, ws, bank, indices, vanWS):
"""
Focuses the input workspace by running EnginXFocus as a child algorithm, which will produce a
single spectrum workspace.
@param ws :: workspace to focus
@param vanWS :: workspace with Vanadium run for corrections
@param bank :: the focussing will be applied on the detectors of this bank
@param indices :: list of indices to consider, as an alternative to bank (bank and indices are
mutually exclusive)
Expand All @@ -89,6 +94,7 @@ def _focusRun(self, ws, bank, indices):
"""
alg = self.createChildAlgorithm('EnginXFocus')
alg.setProperty('InputWorkspace', ws)
alg.setProperty('VanadiumWorkspace', vanWS)
alg.setProperty('Bank', bank)
alg.setProperty(self.INDICES_PROP_NAME, indices)

Expand Down

0 comments on commit a147937

Please sign in to comment.