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
6d09142c
Commit
6d09142c
authored
7 years ago
by
Elliot Oram
Browse files
Options
Downloads
Patches
Plain Diff
Update system test with vlaues for peak validation
Refs #21294
parent
41799d43
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
Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py
+22
-2
22 additions, 2 deletions
Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py
with
22 additions
and
2 deletions
Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py
+
22
−
2
View file @
6d09142c
...
@@ -94,14 +94,34 @@ class FocusTest(stresstesting.MantidStressTest):
...
@@ -94,14 +94,34 @@ class FocusTest(stresstesting.MantidStressTest):
config
[
'
datasearch.directories
'
]
=
self
.
existing_config
config
[
'
datasearch.directories
'
]
=
self
.
existing_config
mantid
.
mtd
.
clear
()
mantid
.
mtd
.
clear
()
class
TotalScatteringTest
(
stresstesting
.
MantidStressTest
):
class
TotalScatteringTest
(
stresstesting
.
MantidStressTest
):
def
runTest
(
self
):
pdf_output
=
None
def
runTest
(
self
):
focused_ws
=
mantid
.
Load
(
Filename
=
"
ISIS_Powder-POLARIS98533_FocusSempty.nxs
"
)
# Reference from focus output
self
.
pdf_output
=
run_total_scattering
(
focused_ws
,
False
)
def
validate
(
self
):
def
validate
(
self
):
# Whilst total scattering is in development, the validation will avoid using reference files as they will have
# to be updated very frequently. In the meantime, the expected peak in the PDF at ~4 Angstrom will be checked.
# expected_peak_values = [bin_index, y_value] (each list item is a bank (1-5))
expected_peak_values
=
[[
7
,
0.149
],
[
11
,
0.285
],
[
23
,
0.504
],
[
37
,
0.382
],
[
52
,
0.700
]]
for
index
,
ws
in
enumerate
(
self
.
pdf_output
):
self
.
assertAlmostEqual
(
ws
.
dataY
(
0
)[
expected_peak_values
[
index
][
0
]],
expected_peak_values
[
index
][
1
],
places
=
3
)
def
run_total_scattering
(
focused_ws
,
merge_banks
):
pdf_inst_obj
=
setup_inst_object
(
mode
=
"
pdf
"
)
return
pdf_inst_obj
.
create_total_scattering_pdf
(
focused_workspace
=
focused_ws
,
merge_banks
=
merge_banks
)
def
cleanup
(
self
):
def
_gen_required_files
():
def
_gen_required_files
():
required_run_numbers
=
[
"
98531
"
,
"
98532
"
,
# create_van : PDF mode
required_run_numbers
=
[
"
98531
"
,
"
98532
"
,
# create_van : PDF mode
...
...
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