def __init__(self, results, *args, **kw): super(IsoEvolutionResultsEditor, self).__init__(*args, **kw) na = grouped_name([r.identifier for r in results if r.identifier]) self.name = 'IsoEvo Results {}'.format(na) self.results = results
def __init__(self, results, *args, **kw): super(DefineEquilibrationResultsEditor, self).__init__(*args, **kw) na = grouped_name([r.identifier for r in results if r.identifier]) self.name = 'Define Eq. Results {}'.format(na) self.results = results self.selected = results[0]
def run(self, state): self.plotter_options = self.plotter_options_manager.selected_options po = self.plotter_options if not po: state.canceled = True return try: use_plotting = po.use_plotting except AttributeError: use_plotting = True if not state.unknowns and self.no_analyses_warning: raise NoAnalysesError self.unknowns = state.unknowns self.references = state.references if use_plotting: editor = self.editor if not editor: editor = self._editor_factory() self.editor = editor state.editors.append(editor) # print editor, state.unknowns if self.auto_set_items: editor.set_items(state.unknowns) oname = editor.name # self.name = editor.name else: a = list(set([ni.labnumber for ni in state.unknowns])) oname = '{} {}'.format(grouped_name(a), self.name) new_name = oname cnt = 1 for e in state.editors: if e.name == new_name: new_name = '{} {:02n}'.format(oname, cnt) cnt += 1 # self.name = new_name if use_plotting: self.editor.name = new_name return self.editor
def run(self, state): if not state.mdd_workspace: state.canceled = True return editor = self._editor_factory() editor.roots = state.mdd_workspace.roots na = sorted((os.path.basename(ni) for ni in editor.roots)) na = grouped_name(na) editor.name = '{} mdd'.format(na) editor.replot() state.editors.append(editor) self.editor = editor for name, es in groupby_key(state.editors, 'name'): for i, ei in enumerate(es): ei.name = '{} {:02n}'.format(ei.name, i + 1)
def _set_name(self): na = list(set([ni.sample for ni in self.items])) na = grouped_name(na) self.name = '{} {}'.format(na, self.basename)
def _set_name(self): na = list(set([ni.labnumber for ni in self.analyses])) na = grouped_name(na) self.name = '{} {}'.format(na, self.basename)
def _set_name(self): na = sorted(list(set([ni.identifier for ni in self.items]))) na = grouped_name(na) self.name = '{} {}'.format(na, self.basename)