Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
b2a7f4a9
Unverified
Commit
b2a7f4a9
authored
Sep 21, 2021
by
Whitfield, Ross
Committed by
GitHub
Sep 21, 2021
Browse files
Merge pull request #32537 from Kvieta1990/patch_abs_corr
patch for absorption correction
parents
32e10783
d645fb26
Changes
4
Hide whitespace changes
Inline
Side-by-side
Framework/PythonInterface/mantid/utils/absorptioncorrutils.py
View file @
b2a7f4a9
...
...
@@ -425,6 +425,7 @@ def create_absorption_input( # noqa: C901
material
=
{},
geometry
=
{},
environment
=
{},
find_environment
=
True
,
opt_wl_min
=
0
,
opt_wl_max
=
Property
.
EMPTY_DBL
,
metaws
=
None
,
...
...
@@ -438,6 +439,7 @@ def create_absorption_input( # noqa: C901
:param material: Optional material to use in SetSample
:param geometry: Optional geometry to use in SetSample
:param environment: Optional environment to use in SetSample
:param find_environment: Optional find_environment to control whether to figure out environment automatically.
:param opt_wl_min: Optional minimum wavelength. If specified, this is used instead of from the props
:param opt_wl_max: Optional maximum wavelength. If specified, this is used instead of from the props
:param metaws: Optional workspace name with metadata to use for donor workspace instead of reading from filename
...
...
@@ -538,6 +540,10 @@ def create_absorption_input( # noqa: C901
# Make sure one is set before calling SetSample
if
material
or
geometry
or
environment
:
mantid
.
simpleapi
.
SetSampleFromLogs
(
InputWorkspace
=
absName
,
Material
=
material
,
Geometry
=
geometry
,
Environment
=
environment
)
mantid
.
simpleapi
.
SetSampleFromLogs
(
InputWorkspace
=
absName
,
Material
=
material
,
Geometry
=
geometry
,
Environment
=
environment
,
FindEnvironment
=
find_environment
)
return
absName
Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py
View file @
b2a7f4a9
...
...
@@ -1416,6 +1416,7 @@ class SNSPowderReduction(DistributedDataProcessorAlgorithm):
'Height'
:
7.
,
'Radius'
:
self
.
_vanRadius
,
'Center'
:
[
0.
,
0.
,
0.
]},
find_environment
=
False
,
opt_wl_min
=
self
.
_wavelengthMin
,
opt_wl_max
=
self
.
_wavelengthMax
)
...
...
Framework/PythonInterface/plugins/algorithms/SetSampleFromLogs.py
View file @
b2a7f4a9
...
...
@@ -92,7 +92,7 @@ class SetSampleFromLogs(DistributedDataProcessorAlgorithm):
beamline
=
'BL11A'
else
:
warningMsg
=
'Do not know how to create lognames for "{}"'
.
format
(
instrEnum
.
name
())
self
.
log
().
warn
(
warningMsg
)
self
.
log
().
warn
ing
(
warningMsg
)
if
beamline
:
# "internal" log names at SNS are templated from the beamline number
heightInContainerUnitsNames
.
append
(
'{}:CS:ITEMS:HeightInContainerUnits'
.
format
(
beamline
))
...
...
@@ -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."
self
.
log
().
warn
(
warningMsg
)
self
.
log
().
warn
ing
(
warningMsg
)
# set the height
heightKey
=
_findKey
(
runObject
,
*
heightInContainerNames
)
if
heightKey
:
geometry
[
'Height'
]
=
conversion
*
_getLogValue
(
runObject
,
heightKey
)
else
:
raise
RuntimeError
(
"Failed to determine the height from the logs"
)
warningMsg
=
"No valid height found in sample logs;"
+
\
"we will rely on user input for sample density information."
self
.
log
().
warning
(
warningMsg
)
# log the results and return
self
.
log
().
information
(
'GEOMETRY (in cm): '
+
str
(
geometry
))
...
...
docs/source/release/v6.3.0/diffraction.rst
View file @
b2a7f4a9
...
...
@@ -14,6 +14,10 @@ Powder Diffraction
- `GetDetOffsetsMultiPeaks`, which is deprecate since v6.2.0, is removed.
- `CalibrateRectangularDetectors`, which is deprecate since v6.2.0, is removed. And system test CalibrateRectangularDetectors_Test is removed.
Bugfixes
########
- For processing vanadium run, we don't want to find environment automatically in :ref:`SetSampleFromLogs <algm-SetSampleFromLogs>`.
Engineering Diffraction
-----------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment