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)
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)
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)
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)
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)