def _run_focus(focus_mode): # code to run the script starts here pearl_routines.PEARL_startup(usern="Mantid_Tester", thiscycle="15_4") # setting files directory here # DIRS[0] is the system test directory # setting raw files directory raw_path = os.path.join(DIRS[0], "PEARL/Focus_Test/RawFiles/") pearl_routines.pearl_set_currentdatadir(raw_path) pearl_routines.PEARL_setdatadir(raw_path) # setting calibration files directory cali_path = os.path.join(DIRS[0], "PEARL/Focus_Test/Calibration/") pearl_routines.pearl_initial_dir(cali_path) atten_path = os.path.join(DIRS[0], "PEARL/Focus_Test/Attentuation/PRL112_DC25_10MM_FF.OUT") pearl_routines.PEARL_setattenfile(atten_path) # setting data output folder data_out_path = os.path.join(DIRS[0], "PEARL/Focus_Test/DataOut/") pearl_routines.pearl_set_userdataoutput_dir(data_out_path) # run the script by calling PEARL_focus function ws_list = pearl_routines.PEARL_focus('92476_92479', 'raw', fmode=focus_mode, ttmode='TT70', atten=True, van_norm=True, debug=True) # We want to be sure that the nxs file loaded back in is the one used for reference for ws in ws_list: mantid.DeleteWorkspace(Workspace=ws) del ws
def runTest(self): self._success = False # code to run the script starts here pearl_routines.PEARL_startup(usern="Mantid_Tester", thiscycle="15_4") # setting files directory here # DIRS[0] is the system test directory # setting raw files directory raw_path = os.path.join(DIRS[0], "PEARL/Focus_Test/RawFiles/") pearl_routines.pearl_set_currentdatadir(raw_path) pearl_routines.PEARL_setdatadir(raw_path) # setting calibration files directory cali_path = os.path.join(DIRS[0], "PEARL/Focus_Test/Calibration/") pearl_routines.pearl_initial_dir(cali_path) atten_path = os.path.join( DIRS[0], "PEARL/Focus_Test/Attentuation/PRL112_DC25_10MM_FF.OUT") pearl_routines.PEARL_setattenfile(atten_path) # setting data output folder data_out_path = os.path.join(DIRS[0], "PEARL/Focus_Test/DataOut/") pearl_routines.pearl_set_userdataoutput_dir(data_out_path) # run the script by calling PEARL_focus function pearl_routines.PEARL_focus('92476_92479', 'raw', fmode='trans', ttmode='TT70', atten=True, van_norm=True, debug=True) # Custom code to create and run this single test suite # and then mark as success or a failure suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(LoadTests, "test")) runner = unittest.TextTestRunner() # Run using either runner res = runner.run(suite) if res.wasSuccessful(): self._success = True else: self._success = False
def runTest(self): self._success = False # code to run the script starts here pearl_routines.PEARL_startup(usern="Mantid_Tester", thiscycle="15_4") # setting files directory here # DIRS[0] is the system test directory # setting raw files directory raw_path = os.path.join(DIRS[0], "PEARL/Focus_Test/RawFiles/") pearl_routines.pearl_set_currentdatadir(raw_path) pearl_routines.PEARL_setdatadir(raw_path) # setting calibration files directory cali_path = os.path.join(DIRS[0], "PEARL/Focus_Test/Calibration/") pearl_routines.pearl_initial_dir(cali_path) atten_path = os.path.join(DIRS[0], "PEARL/Focus_Test/Attentuation/PRL112_DC25_10MM_FF.OUT") pearl_routines.PEARL_setattenfile(atten_path) # setting data output folder data_out_path = os.path.join(DIRS[0], "PEARL/Focus_Test/DataOut/") pearl_routines.pearl_set_userdataoutput_dir(data_out_path) # run the script by calling PEARL_focus function pearl_routines.PEARL_focus('92476_92479', 'raw', fmode='trans', ttmode='TT70', atten=True, van_norm=True, debug=True) # Custom code to create and run this single test suite # and then mark as success or a failure suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(LoadTests, "test")) runner = unittest.TextTestRunner() # Run using either runner res = runner.run(suite) if res.wasSuccessful(): self._success = True else: self._success = False
def _run_focus(focus_mode): # code to run the script starts here pearl_routines.PEARL_startup(usern="Mantid_Tester", thiscycle="15_4") # setting files directory here # DIRS[0] is the system test directory # setting raw files directory raw_path = os.path.join(DIRS[0], "PEARL/Focus_Test/RawFiles/") pearl_routines.pearl_set_currentdatadir(raw_path) pearl_routines.PEARL_setdatadir(raw_path) # setting calibration files directory cali_path = os.path.join(DIRS[0], "PEARL/Focus_Test/Calibration/") pearl_routines.pearl_initial_dir(cali_path) atten_path = os.path.join( DIRS[0], "PEARL/Focus_Test/Attentuation/PRL112_DC25_10MM_FF.OUT") pearl_routines.PEARL_setattenfile(atten_path) # setting data output folder data_out_path = os.path.join(DIRS[0], "PEARL/Focus_Test/DataOut/") pearl_routines.pearl_set_userdataoutput_dir(data_out_path) # run the script by calling PEARL_focus function ws_list = pearl_routines.PEARL_focus('92476_92479', 'raw', fmode=focus_mode, ttmode='TT70', atten=True, van_norm=True, debug=True) # We want to be sure that the nxs file loaded back in is the one used for reference for ws in ws_list: mantid.DeleteWorkspace(Workspace=ws) del ws