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
50df9450
Unverified
Commit
50df9450
authored
6 years ago
by
Pete Peterson
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #24574 from mantidproject/mr_cleanup
MR: Add option to clean data
parents
1b73bf72
e977f98d
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/PythonInterface/plugins/algorithms/MagnetismReflectometryReduction.py
+4
-2
4 additions, 2 deletions
...ace/plugins/algorithms/MagnetismReflectometryReduction.py
with
4 additions
and
2 deletions
Framework/PythonInterface/plugins/algorithms/MagnetismReflectometryReduction.py
+
4
−
2
View file @
50df9450
...
...
@@ -104,6 +104,7 @@ class MagnetismReflectometryReduction(PythonAlgorithm):
self
.
declareProperty
(
"
TimeAxisStep
"
,
40.0
,
doc
=
"
Binning step size for the time axis. TOF for detector binning, wavelength for constant Q
"
)
self
.
declareProperty
(
"
CropFirstAndLastPoints
"
,
True
,
doc
=
"
If true, we crop the first and last points
"
)
self
.
declareProperty
(
"
CleanupBadData
"
,
True
,
doc
=
"
If true, we crop the points consistent with R=0
"
)
self
.
declareProperty
(
"
ConstQTrim
"
,
0.5
,
doc
=
"
With const-Q binning, cut Q bins with contributions fewer than ConstQTrim of WL bins
"
)
self
.
declareProperty
(
"
SampleLength
"
,
10.0
,
doc
=
"
Length of the sample in mm
"
)
...
...
@@ -485,8 +486,9 @@ class MagnetismReflectometryReduction(PythonAlgorithm):
if
low_q
is
not
None
and
high_q
is
not
None
:
break
cleanup
=
self
.
getProperty
(
"
CleanupBadData
"
).
value
crop
=
self
.
getProperty
(
"
CropFirstAndLastPoints
"
).
value
if
low_q
is
not
None
and
high_q
is
not
None
:
if
cleanup
and
low_q
is
not
None
and
high_q
is
not
None
:
# Get rid of first and last Q points to avoid edge effects
if
crop
:
low_q
+=
1
...
...
@@ -495,7 +497,7 @@ class MagnetismReflectometryReduction(PythonAlgorithm):
q_rebin
=
CropWorkspace
(
InputWorkspace
=
q_rebin
,
OutputWorkspace
=
str
(
q_rebin
),
XMin
=
data_x
[
low_q
],
XMax
=
data_x
[
high_q
])
el
se
:
el
if
cleanup
:
logger
.
error
(
"
Data is all zeros. Check your TOF ranges.
"
)
# Clean up the workspace for backward compatibility
...
...
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