Skip to content

Commit 023b9b3

Browse files
Fix system tests and update data/values
1 parent b6ef8f8 commit 023b9b3

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Testing/SystemTests/tests/framework/ISIS_PowderPolarisTest.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def assert_output_file_exists(directory, filename):
145145
assert_output_file_exists(output_dat_dir, "POL98533-b_{}-d.dat".format(bankno))
146146

147147
for ws in self.focus_results:
148-
self.assertEqual(ws.sample().getMaterial().name(), "Si")
148+
self.assertEqual(ws.sample().getMaterial().name(), "Si Si")
149149
self.tolerance_is_rel_err = True
150150
self.tolerance = 1e-6
151151
return self.focus_results.name(), "ISIS_Powder-POLARIS98533_FocusSempty.nxs"
@@ -188,7 +188,7 @@ def assert_output_file_exists(directory, filename):
188188
assert_output_file_exists(output_dat_dir, "POL98533-b_{}-d.dat".format(bankno))
189189

190190
for ws in self.focus_results:
191-
self.assertEqual(ws.sample().getMaterial().name(), "Si")
191+
self.assertEqual(ws.sample().getMaterial().name(), "Si Si")
192192
self.tolerance_is_rel_err = True
193193
self.tolerance = 1e-6
194194
return self.focus_results.name(), "ISIS_Powder-POLARIS98533_FocusPaalmanPings.nxs"
@@ -231,7 +231,7 @@ def assert_output_file_exists(directory, filename):
231231
assert_output_file_exists(output_dat_dir, "POL98533-b_{}-d.dat".format(bankno))
232232

233233
for ws in self.focus_results:
234-
self.assertEqual(ws.sample().getMaterial().name(), "Si")
234+
self.assertEqual(ws.sample().getMaterial().name(), "Si Si")
235235
self.tolerance_is_rel_err = True
236236
self.tolerance = 1e-5
237237
# MayersSampleCorrection involves a fit that may give slightly different results on different OS
@@ -261,7 +261,7 @@ def runTest(self):
261261
def validate(self):
262262
# This will only pass if instead of failing or deafaulting to PDF it correctly picks Rietveld
263263
for ws in self.focus_results:
264-
self.assertEqual(ws.sample().getMaterial().name(), "Si")
264+
self.assertEqual(ws.sample().getMaterial().name(), "Si Si")
265265
# this needs to be put in due to rounding errors between OS' for the proton_charge_by_period log
266266
self.disableChecking.append("Sample")
267267
self.tolerance = 1e-7
@@ -291,7 +291,7 @@ def runTest(self):
291291

292292
def validate(self):
293293
self.tolerance_is_rel_err = True
294-
self.tolerance = 1e-6
294+
self.tolerance = 1e-5 # same tolused in FocusTestAbsorptionMayers
295295
return self.focus_results.name(), "ISIS_Powder-POLARIS98533_FocusMayers.nxs"
296296

297297
def cleanup(self):
@@ -332,7 +332,7 @@ def assert_output_file_exists(directory, filename):
332332
assert_output_file_exists(output_dat_dir, "POL98533-b_{}-d.dat".format(bankno))
333333

334334
for ws in self.focus_results:
335-
self.assertEqual(ws.sample().getMaterial().name(), "Si")
335+
self.assertEqual(ws.sample().getMaterial().name(), "Si Si")
336336
self.tolerance_is_rel_err = True
337337
self.tolerance = 1e-5
338338
return self.focus_results.name(), "ISIS_Powder-POLARIS98533_FocusPerDet.nxs"
@@ -358,7 +358,7 @@ def runTest(self):
358358
def validate(self):
359359
# Whilst total scattering is in development, the validation will avoid using reference files as they will have
360360
# to be updated very frequently. In the meantime, the expected peak in the PDF at ~3.9 Angstrom will be checked
361-
expected_peak_values = [0.8808, 1.1001, 2.9530, 4.6600, 4.3528]
361+
expected_peak_values = [0.8808, 1.1001, 2.9530, 4.6593, 4.3528]
362362
for index, ws in enumerate(self.pdf_output):
363363
idx = get_bin_number_at_given_r(ws.dataX(0), 3.9)
364364
self.assertAlmostEqual(ws.dataY(0)[idx], expected_peak_values[index], places=3)
@@ -378,7 +378,7 @@ def validate(self):
378378
# Whilst total scattering is in development, the validation will avoid using reference files as they will have
379379
# to be updated very frequently. In the meantime, the expected peak in the PDF at ~3.9 Angstrom will be checked.
380380
idx = get_bin_number_at_given_r(self.pdf_output.dataX(0), 3.9)
381-
self.assertAlmostEqual(self.pdf_output.dataY(0)[idx], 4.5806, places=3)
381+
self.assertAlmostEqual(self.pdf_output.dataY(0)[idx], 4.5799, places=3)
382382

383383

384384
class TotalScatteringMergedPerDetTest(systemtesting.MantidSystemTest):
@@ -395,7 +395,7 @@ def validate(self):
395395
# Whilst total scattering is in development, the validation will avoid using reference files as they will have
396396
# to be updated very frequently. In the meantime, the expected peak in the PDF at ~3.9 Angstrom will be checked.
397397
idx = get_bin_number_at_given_r(self.pdf_output.dataX(0), 3.9)
398-
self.assertAlmostEqual(self.pdf_output.dataY(0)[idx], 4.531, places=3)
398+
self.assertAlmostEqual(self.pdf_output.dataY(0)[idx], 4.5305, places=3)
399399

400400

401401
class TotalScatteringPDFRebinTest(systemtesting.MantidSystemTest):
@@ -501,7 +501,7 @@ def validate(self):
501501
# Whilst total scattering is in development, the validation will avoid using reference files as they will have
502502
# to be updated very frequently. In the meantime, the expected peak in the PDF at ~3.9 Angstrom will be checked.
503503
idx = get_bin_number_at_given_r(self.pdf_output.dataX(0), 3.9)
504-
self.assertAlmostEqual(self.pdf_output.dataY(0)[idx], 8.8486, places=3)
504+
self.assertAlmostEqual(self.pdf_output.dataY(0)[idx], 8.8473, places=3)
505505

506506

507507
def run_total_scattering(
@@ -674,7 +674,7 @@ def setup_inst_object(mode, with_container=False):
674674
sample_details = SampleDetails(height=4.0, radius=0.2985, center=[0, 0, 0], shape="cylinder")
675675
# define multi-atom cell to stop regression of bug calling MaterialBuilder.build() without setting number density
676676
# which works for one atom cells as number density is automatically calculated
677-
sample_details.set_material(chemical_formula="Si Si", number_density=0.05)
677+
sample_details.set_material(chemical_formula="Si Si", number_density=0.04996)
678678
if with_container:
679679
sample_details.set_container(radius=0.3175, chemical_formula="V")
680680
inst_obj.set_sample_details(sample=sample_details)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
914e84974be0b4fd3efa06c2f5e667a7
1+
aa23f24d8f3d1e62bfb185ae9006190d
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b8d958c46a50716b2b4038d2aa8afa85
1+
40a0f25448d0733e7929a7b1e71d8ddb

0 commit comments

Comments
 (0)