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 co_load_run(self, workspace): run = lutils.hyphenise(self.co_runs) to_add = [ self.add_runs(run1, run2, run) for run1, run2 in zip( *lutils.flatten_run_data(self.workspace, workspace)) ] self.loaded_runs[run] = to_add self.add_co_load_to_group(to_add, run)
def test_flatten_run_data(self): workspaces = [] for i in range(0, len(self.test_workspaces), 2): name = str(i) mantid.GroupWorkspaces(self.test_workspaces[i:i + 2], OutputWorkspace=name) workspaces.append(name) self.assertEquals(lutils.flatten_run_data(workspaces), [self.test_ws_names])
def test_flatten_run_data(self): workspaces = [] for i in range(0, len(self.test_workspaces), 2): name = str(i) mantid.GroupWorkspaces( self.test_workspaces[i:i + 2], OutputWorkspace=name) workspaces.append(name) self.assertEquals( lutils.flatten_run_data(workspaces), [ self.test_ws_names])
def test_flatten_run_data(self): test_1 = ["1_det_1", "1_det_2"] test_2 = ["2_det_1", "2_det_2"] self.assertEquals(lutils.flatten_run_data(test_1, test_2), [test_1, test_2])
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)