Commit 0a36cd41 authored by Yuanpeng Zhang's avatar Yuanpeng Zhang Committed by Peterson, Peter
Browse files

patch for absorption correction

parent 56eebed7
......@@ -92,7 +92,7 @@ class SetSampleFromLogs(DistributedDataProcessorAlgorithm):
beamline = 'BL11A'
warningMsg = 'Do not know how to create lognames for "{}"'.format(
if beamline:
# "internal" log names at SNS are templated from the beamline number
......@@ -115,14 +115,16 @@ class SetSampleFromLogs(DistributedDataProcessorAlgorithm):
warningMsg = "HeightInContainerUnits expects cm or mm;" + \
" specified units not recognized: {:s};".format(units) + \
" we will reply on user input for sample density information."
# set the height
heightKey = _findKey(runObject, *heightInContainerNames)
if heightKey:
geometry['Height'] = conversion * _getLogValue(runObject, heightKey)
raise RuntimeError("Failed to determine the height from the logs")
warningMsg = "No valid height found in sample logs;" + \
"we will reply on user input for sample density information."
# log the results and return
self.log().information('GEOMETRY (in cm): ' + str(geometry))
......@@ -150,6 +152,7 @@ class SetSampleFromLogs(DistributedDataProcessorAlgorithm):
wksp = self.getProperty("InputWorkspace").value
# these items are not grabbed from the logs
geometryContainer = self.getProperty("ContainerGeometry").value
materialContainer = self.getProperty("ContainerMaterial").value
# get a convenient handle to the logs
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment