Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
3a5c114e
Commit
3a5c114e
authored
9 years ago
by
Owen Arnold
Browse files
Options
Downloads
Patches
Plain Diff
refs #13919. Remove trailing whitespace
parent
f535e910
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeighting.py
+3
-6
3 additions, 6 deletions
...s/algorithms/WorkflowAlgorithms/DetectorFloodWeighting.py
with
3 additions
and
6 deletions
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeighting.py
+
3
−
6
View file @
3a5c114e
...
...
@@ -24,7 +24,7 @@ class DetectorFloodWeighting(DataProcessorAlgorithm):
direction
=
Direction
.
Input
,
validator
=
WorkspaceUnitValidator
(
"
Wavelength
"
)),
doc
=
'
Flood weighting measurement
'
)
self
.
declareProperty
(
MatrixWorkspaceProperty
(
'
TransmissionWorkspace
'
,
''
,
direction
=
Direction
.
Input
,
optional
=
PropertyMode
.
Optional
,
direction
=
Direction
.
Input
,
optional
=
PropertyMode
.
Optional
,
validator
=
WorkspaceUnitValidator
(
"
Wavelength
"
)),
doc
=
'
Flood weighting measurement
'
)
...
...
@@ -86,14 +86,14 @@ class DetectorFloodWeighting(DataProcessorAlgorithm):
divide
.
setProperty
(
"
RHSWorkspace
"
,
rhs
)
divide
.
execute
()
return
divide
.
getProperty
(
"
OutputWorkspace
"
).
value
def
_add
(
self
,
lhs
,
rhs
):
divide
=
self
.
createChildAlgorithm
(
"
Plus
"
)
divide
.
setProperty
(
"
LHSWorkspace
"
,
lhs
)
divide
.
setProperty
(
"
RHSWorkspace
"
,
rhs
)
divide
.
execute
()
return
divide
.
getProperty
(
"
OutputWorkspace
"
).
value
def
_integrate_bands
(
self
,
bands
,
in_ws
):
# Formulate bands, integrate and sum
accumulated_output
=
None
...
...
@@ -101,7 +101,6 @@ class DetectorFloodWeighting(DataProcessorAlgorithm):
lower
=
bands
[
i
]
upper
=
bands
[
i
+
1
]
step
=
upper
-
lower
rebin
=
self
.
createChildAlgorithm
(
"
Rebin
"
)
rebin
.
setProperty
(
"
Params
"
,
[
lower
,
step
,
upper
])
rebin
.
setProperty
(
"
InputWorkspace
"
,
in_ws
)
# Always integrating the same input workspace
...
...
@@ -126,7 +125,6 @@ class DetectorFloodWeighting(DataProcessorAlgorithm):
accumulated_output
=
self
.
_integrate_bands
(
bands
,
in_ws
)
if
trans_ws
:
accumulated_trans_output
=
self
.
_integrate_bands
(
bands
,
trans_ws
)
progress
.
report
()
# Perform solid angle correction. Calculate solid angle then divide through.
...
...
@@ -138,7 +136,6 @@ class DetectorFloodWeighting(DataProcessorAlgorithm):
solid_angle_weighting
=
solidAngle
.
getProperty
(
"
OutputWorkspace
"
).
value
normalized
=
self
.
_divide
(
normalized
,
solid_angle_weighting
)
progress
.
report
()
# Divide through by the transmission workspace provided
if
trans_ws
:
normalized
=
self
.
_divide
(
normalized
,
accumulated_trans_output
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment