Unverified Commit 3c7dcd7d authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony Committed by GitHub
Browse files

Merge pull request #28748 from mantidproject/28747_PSIfirstGood

parents fc895398 86ea80ab
......@@ -30,6 +30,7 @@ New Features
- Addition of background correction algorithm (PSIBackgroundCorrection) to remove the background present in
PSI bin data loaded using LoadPSIMuonBin.
- Addition of a LoadMuonNexusV2 algorithm to load the new Muon V2 files, see :ref:`LoadMuonNexusV2 <algm-LoadMuonNexusV2>`.
- Updated rounding for time zero and first good data to be 3 decimal places.
Improvements
-------------
......
......@@ -218,7 +218,8 @@ def load_workspace_from_filename(filename,
for table in deadtime_tables[1:]:
DeleteWorkspace(Workspace=table)
load_result["FirstGoodData"] = round(load_result["FirstGoodData"] - load_result['TimeZero'], 2)
load_result["FirstGoodData"] = round(load_result["FirstGoodData"] - load_result['TimeZero'], 3)
print("hiii", )
UnGroupWorkspace(load_result["DeadTimeTable"])
load_result["DeadTimeTable"] = None
UnGroupWorkspace(workspace.name())
......@@ -231,7 +232,7 @@ def load_workspace_from_filename(filename,
load_result["DataDeadTimeTable"] = load_result["DeadTimeTable"]
load_result["DeadTimeTable"] = None
load_result["FirstGoodData"] = round(load_result["FirstGoodData"] - load_result['TimeZero'], 2)
load_result["FirstGoodData"] = round(load_result["FirstGoodData"] - load_result['TimeZero'], 3)
return load_result, run, filename, psi_data
......
......@@ -162,7 +162,7 @@ class MuonContextTest(unittest.TestCase):
first_good_data = self.context.first_good_data([19489])
self.assertEqual(first_good_data, 0.11)
self.assertEqual(first_good_data, 0.113)
def test_first_good_data_returns_correctly_when_manually_specified_used(self):
self.gui_context.update({'FirstGoodDataFromFile': False, 'FirstGoodData': 5})
......
......@@ -71,7 +71,7 @@ class MuonFileUtilsTest(unittest.TestCase):
load_result, run, filename, _ = utils.load_workspace_from_filename(filename)
self.assertEqual(load_result['DeadTimeTable'], None)
self.assertEqual(load_result['FirstGoodData'], 0.11)
self.assertEqual(load_result['FirstGoodData'], 0.106)
self.assertEqual(load_result['MainFieldDirection'], 'Transverse')
self.assertAlmostEqual(load_result['TimeZero'], 0.55000, 5)
self.assertEqual(run, 22725)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment