コード例 #1
0
 def co_load_run(self, workspace):
     run = lutils.hyphenise(self.co_runs)
     to_add = [
         self.add_runs(l, r, run) for l, r in zip(
             *lutils.flatten_run_data(self.workspace, workspace))
     ]
     self.workspace = lutils.group_by_detector(run, to_add)
コード例 #2
0
 def co_load_run(self, workspace):
     run = lutils.hyphenise(self.co_runs)
     self.last_loaded_runs.append(run)
     to_add = [
         self.add_runs(run1, run2, run)
         for run1, run2 in zip(*lutils.flatten_run_data(self.workspace, workspace))
     ]
     self.workspace = lutils.group_by_detector(run, to_add)
コード例 #3
0
 def test_group_by_detector(self):
     output, workspaces = [], []
     detectors = range(1, 5)
     for detector in detectors:
         workspace = self.var_ws_name.format(detector, self.test_run)
         workspaces.append(workspace)
         mantid.CreateSampleWorkspace(OutputWorkspace=workspace).getName()
         output.append("{}; Detector {}".format(self.test_run, detector))
     self.assertEquals(lutils.group_by_detector(self.test_run, workspaces),
                       output)
コード例 #4
0
 def test_group_by_detector(self):
     output, workspaces = [], []
     detectors = range(1, 5)
     for detector in detectors:
         workspace = self.var_ws_name.format(detector, self.test_run)
         workspaces.append(workspace)
         mantid.CreateSampleWorkspace(OutputWorkspace=workspace).getName()
         output.append("{}; Detector {}".format(self.test_run, detector))
     self.assertEquals(
         lutils.group_by_detector(
             self.test_run,
             workspaces),
         output)
コード例 #5
0
ファイル: load_model.py プロジェクト: mantidproject/mantid
 def co_load_run(self, workspace):
     run = lutils.hyphenise(self.co_runs)
     self.last_loaded_runs.append(run)
     to_add = [self.add_runs(l, r, run) for l, r in zip(*lutils.flatten_run_data(
         self.workspace, workspace))]
     self.workspace = lutils.group_by_detector(run, to_add)