From 68c0519f7a43f57d488624250c13237f16c66a50 Mon Sep 17 00:00:00 2001
From: "Adam J. Jackson" <a.j.jackson@physics.org>
Date: Thu, 6 Feb 2020 16:32:36 +0000
Subject: [PATCH] Abins thresholding: update system tests

System tests for Abins are modified to calculate up to second-order
excitations only (as third and fourth-order are currently disabled.)

In addition, the test data for two other tests needs updating;
BezeneBinWidthCASTEP and TolueneScale have small changes in the
results. This is associated with a more conservative criterion for
discarding small values compared to the previous system; results
similar to the previous setup can be obtained by modifying the
threshold used in
SPowderSemiEmpiricalCalculator._calculate_s_over_threshold
---
 .../Data/SystemTest/BenzeneBinWidthCASTEP.nxs.md5    |  2 +-
 Testing/Data/SystemTest/C6H5Cl-Gaussian.nxs.md5      |  2 +-
 Testing/Data/SystemTest/Na2SiF6_CASTEP.nxs.md5       |  2 +-
 Testing/Data/SystemTest/Na2SiF6_DMOL3.nxs.md5        |  2 +-
 .../Data/SystemTest/TolueneLargerOrderAbins.nxs.md5  |  2 +-
 Testing/Data/SystemTest/TolueneScale.nxs.md5         |  2 +-
 Testing/Data/SystemTest/TolueneScratchAbins.nxs.md5  |  2 +-
 Testing/SystemTests/tests/analysis/AbinsTest.py      | 12 ++++++------
 8 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/Testing/Data/SystemTest/BenzeneBinWidthCASTEP.nxs.md5 b/Testing/Data/SystemTest/BenzeneBinWidthCASTEP.nxs.md5
index 2894a7a5302..bca3dbb284d 100644
--- a/Testing/Data/SystemTest/BenzeneBinWidthCASTEP.nxs.md5
+++ b/Testing/Data/SystemTest/BenzeneBinWidthCASTEP.nxs.md5
@@ -1 +1 @@
-8c4c9164cbd6256b8fe558a8cc5aab2f
+3927dcd4999b921628501dad08ff140d
diff --git a/Testing/Data/SystemTest/C6H5Cl-Gaussian.nxs.md5 b/Testing/Data/SystemTest/C6H5Cl-Gaussian.nxs.md5
index f1e705becf4..e6fdb2e26a0 100644
--- a/Testing/Data/SystemTest/C6H5Cl-Gaussian.nxs.md5
+++ b/Testing/Data/SystemTest/C6H5Cl-Gaussian.nxs.md5
@@ -1 +1 @@
-426766659eb52b2cdca5f4c452269af6
+2d0ba9a56ef63248031cc24fb2c10fe8
diff --git a/Testing/Data/SystemTest/Na2SiF6_CASTEP.nxs.md5 b/Testing/Data/SystemTest/Na2SiF6_CASTEP.nxs.md5
index 406a60d0ad2..9e4f8de20bc 100644
--- a/Testing/Data/SystemTest/Na2SiF6_CASTEP.nxs.md5
+++ b/Testing/Data/SystemTest/Na2SiF6_CASTEP.nxs.md5
@@ -1 +1 @@
-6a9ebb184ce6cbad194d2f4217e8e6c2
+e6669ec5dd49fc7f2c835ba3a6ff707b
diff --git a/Testing/Data/SystemTest/Na2SiF6_DMOL3.nxs.md5 b/Testing/Data/SystemTest/Na2SiF6_DMOL3.nxs.md5
index 17ae498c9f6..3afc071803b 100644
--- a/Testing/Data/SystemTest/Na2SiF6_DMOL3.nxs.md5
+++ b/Testing/Data/SystemTest/Na2SiF6_DMOL3.nxs.md5
@@ -1 +1 @@
-23947afbbcec326052018f34551993a3
+6e851997cfba0cec009e307fa1c95031
diff --git a/Testing/Data/SystemTest/TolueneLargerOrderAbins.nxs.md5 b/Testing/Data/SystemTest/TolueneLargerOrderAbins.nxs.md5
index 6f162e65e21..14b889dca0b 100644
--- a/Testing/Data/SystemTest/TolueneLargerOrderAbins.nxs.md5
+++ b/Testing/Data/SystemTest/TolueneLargerOrderAbins.nxs.md5
@@ -1 +1 @@
-7031da500c989b8ee3b7e884ab12426c
+28ec7e6f3b4ff61f50d1eecdaf133471
diff --git a/Testing/Data/SystemTest/TolueneScale.nxs.md5 b/Testing/Data/SystemTest/TolueneScale.nxs.md5
index 9e1652d9800..2dedd23c2f9 100644
--- a/Testing/Data/SystemTest/TolueneScale.nxs.md5
+++ b/Testing/Data/SystemTest/TolueneScale.nxs.md5
@@ -1 +1 @@
-d1a0e156844c6459d230763742e21080
+e40d2e8696fe8608beea25299e3007c0
diff --git a/Testing/Data/SystemTest/TolueneScratchAbins.nxs.md5 b/Testing/Data/SystemTest/TolueneScratchAbins.nxs.md5
index ffd48113c4d..4d0cf21948d 100644
--- a/Testing/Data/SystemTest/TolueneScratchAbins.nxs.md5
+++ b/Testing/Data/SystemTest/TolueneScratchAbins.nxs.md5
@@ -1 +1 @@
-ab23cd079e36f46dd610dc22a9d8beac
+c8a50f44d2b3300eb26e1a891c8c60fe
diff --git a/Testing/SystemTests/tests/analysis/AbinsTest.py b/Testing/SystemTests/tests/analysis/AbinsTest.py
index 0886c66a142..b13bb4113e6 100644
--- a/Testing/SystemTests/tests/analysis/AbinsTest.py
+++ b/Testing/SystemTests/tests/analysis/AbinsTest.py
@@ -176,7 +176,7 @@ class AbinsCRYSTALTestScratch(systemtesting.MantidSystemTest, HelperTestingClass
         self.ref_result = name + ".nxs"
         self.set_ab_initio_program("CRYSTAL")
         self.set_name(name)
-        self.set_order(AbinsConstants.QUANTUM_ORDER_FOUR)
+        self.set_order(AbinsConstants.QUANTUM_ORDER_TWO)
         self.case_from_scratch()
 
     def excludeInPullRequests(self):
@@ -263,8 +263,8 @@ class AbinsCRYSTALTestLargerOrder(systemtesting.MantidSystemTest, HelperTestingC
         self.ref_result = name + ".nxs"
         self.set_ab_initio_program("CRYSTAL")
         self.set_name(name)
-        self.set_order(AbinsConstants.QUANTUM_ORDER_TWO)
-        self.case_restart_diff_order(AbinsConstants.QUANTUM_ORDER_THREE)
+        self.set_order(AbinsConstants.QUANTUM_ORDER_ONE)
+        self.case_restart_diff_order(AbinsConstants.QUANTUM_ORDER_TWO)
 
     def excludeInPullRequests(self):
         return True
@@ -343,7 +343,7 @@ class AbinsCASTEPNoH(systemtesting.MantidSystemTest, HelperTestingClass):
         self.ref_result = name + ".nxs"
         self.set_ab_initio_program("CASTEP")
         self.set_name(name)
-        self.set_order(AbinsConstants.QUANTUM_ORDER_FOUR)
+        self.set_order(AbinsConstants.QUANTUM_ORDER_TWO)
         self.set_cross_section(cross_section="Total")
         self.case_from_scratch()
         self._wrk_1 = self._output_name
@@ -394,7 +394,7 @@ class AbinsDMOL3TestScratch(systemtesting.MantidSystemTest, HelperTestingClass):
         self.ref_result = name + ".nxs"
         self.set_ab_initio_program("DMOL3")
         self.set_name(name)
-        self.set_order(AbinsConstants.QUANTUM_ORDER_FOUR)
+        self.set_order(AbinsConstants.QUANTUM_ORDER_TWO)
         self.set_cross_section(cross_section="Total")
         self.case_from_scratch()
 
@@ -422,7 +422,7 @@ class AbinsGAUSSIANestScratch(systemtesting.MantidSystemTest, HelperTestingClass
         self.ref_result = name + ".nxs"
         self.set_ab_initio_program("GAUSSIAN")
         self.set_name(name)
-        self.set_order(AbinsConstants.QUANTUM_ORDER_FOUR)
+        self.set_order(AbinsConstants.QUANTUM_ORDER_TWO)
         self.set_cross_section(cross_section="Incoherent")
         self.case_from_scratch()
 
-- 
GitLab