def __init__(self, dataset=None, fitmodel=None): """create a model dict from ekin dataset and allow simple add/remove rows""" ek = self.ek = dataset modeldata = self.createData(ek) TableModel.__init__(self, modeldata) return
def __init__(self, dictdata=None): self.dict = dictdata TableModel.__init__(self) if dictdata == None: return for key in dictdata: #assumes D is dict with some text fields D = dictdata[key] if D.has_key('name'): del D['name'] self.addRecord(name=key, **D) return
def __init__(self, E): self.E = E TableModel.__init__(self) self.addColumn('name'); self.addColumn('model') for d in E.datasets: fdata = E.getFitData(d) M = E.getMetaData(d) if E.currentmode == 'NMR titration': try: edata = E.getDataset(d) M['residue'] = edata['residue'] M['resnum'] = edata['res_num'] M['atom'] = edata['atom_type'] except: pass if fdata != {} and fdata!= None: model = fdata['model'] else: model='' self.checkDict(M) self.addRecord(name=d, **M) return
def __init__(self, E): self.E = E TableModel.__init__(self) self.addColumn('name') self.addColumn('model') for d in E.datasets: fdata = E.getFitData(d) M = E.getMetaData(d) if E.currentmode == 'NMR titration': try: edata = E.getDataset(d) M['residue'] = edata['residue'] M['resnum'] = edata['res_num'] M['atom'] = edata['atom_type'] except: pass if fdata != {} and fdata != None: model = fdata['model'] else: model = '' self.checkDict(M) self.addRecord(name=d, **M) return