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
8585f8b0
Commit
8585f8b0
authored
Oct 03, 2018
by
Sam Jenkins
Browse files
Re #23690 Made requested change
parent
a10c27d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/Diffraction/isis_powder/routines/focus.py
View file @
8585f8b0
...
...
@@ -166,7 +166,7 @@ def _test_splined_vanadium_exists(instrument, run_details):
"
\n
Have you run the method to create a Vanadium spline with these settings yet?
\n
"
)
def
_crop_spline_to_percent_of_max
(
spline
,
input_ws
,
spectrum
):
def
_crop_spline_to_percent_of_max
(
spline
,
input_ws
,
output_workspace
):
spline_spectrum
=
spline
.
readY
(
0
)
y_val
=
numpy
.
amax
(
spline_spectrum
)
y_val
=
y_val
/
100
...
...
@@ -174,5 +174,5 @@ def _crop_spline_to_percent_of_max(spline, input_ws, spectrum):
small_spline_indecies
=
numpy
.
nonzero
(
spline_spectrum
>
y_val
)[
0
]
x_max
=
x_list
[
small_spline_indecies
[
-
1
]]
x_min
=
x_list
[
small_spline_indecies
[
0
]]
output
=
mantid
.
CropWorkspace
(
inputWorkspace
=
input_ws
,
XMin
=
x_min
,
XMax
=
x_max
,
OutputWorkspace
=
spectrum
)
output
=
mantid
.
CropWorkspace
(
inputWorkspace
=
input_ws
,
XMin
=
x_min
,
XMax
=
x_max
,
OutputWorkspace
=
output_workspace
)
return
output
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