Skip to content

Commit

Permalink
Re #6151 Add transmission output to prop mng for UI update
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Dec 19, 2012
1 parent 568b39a commit 0cc414e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def PyInit(self):
doc="Property manager name for the reduction")
self.declareProperty(MatrixWorkspaceProperty("OutputWorkspace", "",
direction = Direction.Output))
self.declareProperty("MeasuredTransmission", 0.0,
direction=Direction.Output)
self.declareProperty("MeasuredError", 0.0,
direction=Direction.Output)
self.declareProperty("OutputMessage", "",
direction=Direction.Output, doc = "Output message")

Expand Down Expand Up @@ -182,6 +186,8 @@ def _normalise(workspace):

output_str = ''
if len(trans_ws.dataY(0))==1:
self.setProperty("MeasuredTransmission", self._trans)
self.setProperty("MeasuredError", self._error)
output_str = "\n%s T = %6.2g += %6.2g\n" % (output_str, trans, error)
output_msg = "Transmission correction applied [%s]%s\n" % (trans_ws_name, output_str)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def PyInit(self):
doc="Property manager name for the reduction")
self.declareProperty(MatrixWorkspaceProperty("OutputWorkspace", "",
direction = Direction.Output))
self.declareProperty("MeasuredTransmission", 0.0,
direction=Direction.Output)
self.declareProperty("MeasuredError", 0.0,
direction=Direction.Output)
self.declareProperty("OutputMessage", "",
direction=Direction.Output, doc = "Output message")

Expand Down Expand Up @@ -82,6 +86,8 @@ def PyExec(self):
self._error = trans_ws.dataE(0)[0]

if len(trans_ws.dataY(0))==1:
self.setProperty("MeasuredTransmission", self._trans)
self.setProperty("MeasuredError", self._error)
output_str = "%s T = %6.2g += %6.2g\n" % (output_str, self._trans, self._error)
output_msg = "Transmission correction applied [%s]\n%s\n" % (trans_ws_name, output_str)

Expand Down

0 comments on commit 0cc414e

Please sign in to comment.