PEATDB/Ekin/Convert.py
def xy2ekin(cls, inputlists, errorlists=None, activelist=None, labels=None):
        """Convert xyz lists to ekin dataset, accepts lists tuple"""
       
        if labels == None:
            labels = ('x','y','z')
        if len(inputlists[0]) != len(inputlists[1]):
            return
        ekindataset = {0:{},1:{}}
        for n in range(len(inputlists)):
            ekindataset[n]['label'] = labels[n]
        for i in range(len(inputlists[0])):
            for n in range(len(inputlists)):
                ekindataset[n][i]={}
                ekindataset[n][i]['var']= str(inputlists[n][i])
                if activelist != None:
                    ekindataset[n][i]['active']=activelist[i]
                else:
                    ekindataset[n][i]['active']=1
                if errorlists!=None and errorlists[n] != None:
                    ekindataset[n][i]['error']=str(errorlists[n][i])
        return ekindataset
Convert xyz lists to ekin dataset, accepts lists tuple
Convert xyz lists to ekin dataset, accepts lists tuple
Convert xyz lists to ekin dataset accepts lists tuple
def xy2ekin(cls, inputlists, errorlists=None, activelist=None, labels=None):
        if labels == None:
            labels = ('x','y','z')
        if len(inputlists[0]) != len(inputlists[1]):
            return
        ekindataset = {0:{},1:{}}
        for n in range(len(inputlists)):
            ekindataset[n]['label'] = labels[n]
        for i in range(len(inputlists[0])):
            for n in range(len(inputlists)):
                ekindataset[n][i]={}
                ekindataset[n][i]['var']= str(inputlists[n][i])
                if activelist != None:
                    ekindataset[n][i]['active']=activelist[i]
                else:
                    ekindataset[n][i]['active']=1
                if errorlists!=None and errorlists[n] != None:
                    ekindataset[n][i]['error']=str(errorlists[n][i])
        return ekindataset
def xy2ekin ( cls , inputlists , errorlists = None , activelist = None , labels = None ) : if labels == None : labels = ( 'x' , 'y' , 'z' ) if len ( inputlists [ 0 ] ) != len ( inputlists [ 1 ] ) : return ekindataset = { 0 : { } , 1 : { } } for n in range ( len ( inputlists ) ) : ekindataset [ n ] [ 'label' ] = labels [ n ] for i in range ( len ( inputlists [ 0 ] ) ) : for n in range ( len ( inputlists ) ) : ekindataset [ n ] [ i ] = { } ekindataset [ n ] [ i ] [ 'var' ] = str ( inputlists [ n ] [ i ] ) if activelist != None : ekindataset [ n ] [ i ] [ 'active' ] = activelist [ i ] else : ekindataset [ n ] [ i ] [ 'active' ] = 1 if errorlists != None and errorlists [ n ] != None : ekindataset [ n ] [ i ] [ 'error' ] = str ( errorlists [ n ] [ i ] ) return ekindataset
Convert xyz lists to ekin dataset, accepts lists tuple
Convert xyz lists to ekin dataset accepts lists tuple
"""Convert xyz lists to ekin dataset, accepts lists tuple"""
cls
inputlists
errorlists
activelist
labels