PEATDB/Ekin/Tables.py
def createData(self, ek):
        """Populate table model from ekin dataset"""
        modeldata={}
        label0,label1 = ek.labels
        label2='xerr'
        label3='yerr'
        labels = self.labels = [label0,label1,label2,label3]        
        modeldata['columnnames']=labels
        modeldata['columntypes']={}; modeldata['columnorder']={}
        modeldata['columnlabels']={}
        i=0
        for l in labels:
            modeldata['columntypes'][l] = 'number'
            modeldata['columnorder'][i]=l
            i+=1
        for colname in modeldata['columnnames']:
            modeldata['columnlabels'][colname]=colname
        
        for i in range(ek.length()): 
            x=ek.x[i]; y=ek.y[i]
            modeldata[i] = {label0:x,label1:y}
            modeldata[i][label2] = ek.xerr(i)
            modeldata[i][label3] = ek.yerr(i)
        
        return modeldata
Populate table model from ekin dataset
Populate table model from ekin dataset
Populate table model from ekin dataset
def createData(self, ek):
        modeldata={}
        label0,label1 = ek.labels
        label2='xerr'
        label3='yerr'
        labels = self.labels = [label0,label1,label2,label3]        
        modeldata['columnnames']=labels
        modeldata['columntypes']={}; modeldata['columnorder']={}
        modeldata['columnlabels']={}
        i=0
        for l in labels:
            modeldata['columntypes'][l] = 'number'
            modeldata['columnorder'][i]=l
            i+=1
        for colname in modeldata['columnnames']:
            modeldata['columnlabels'][colname]=colname
        for i in range(ek.length()): 
            x=ek.x[i]; y=ek.y[i]
            modeldata[i] = {label0:x,label1:y}
            modeldata[i][label2] = ek.xerr(i)
            modeldata[i][label3] = ek.yerr(i)
        return modeldata
def createData ( self , ek ) : modeldata = { } label0 , label1 = ek . labels label2 = 'xerr' label3 = 'yerr' labels = self . labels = [ label0 , label1 , label2 , label3 ] modeldata [ 'columnnames' ] = labels modeldata [ 'columntypes' ] = { } ; modeldata [ 'columnorder' ] = { } modeldata [ 'columnlabels' ] = { } i = 0 for l in labels : modeldata [ 'columntypes' ] [ l ] = 'number' modeldata [ 'columnorder' ] [ i ] = l i += 1 for colname in modeldata [ 'columnnames' ] : modeldata [ 'columnlabels' ] [ colname ] = colname for i in range ( ek . length ( ) ) : x = ek . x [ i ] ; y = ek . y [ i ] modeldata [ i ] = { label0 : x , label1 : y } modeldata [ i ] [ label2 ] = ek . xerr ( i ) modeldata [ i ] [ label3 ] = ek . yerr ( i ) return modeldata
Populate table model from ekin dataset
Populate table model from ekin dataset
"""Populate table model from ekin dataset"""
self
ek