PEATDB/Ekin/Fitting.py
def loadModelsFile(modelsfile=None):
    """Update the current set of available models from a dict"""
    if modelsfile == None:
        path = os.path.abspath(os.path.dirname(__file__))
        modelsfile = os.path.join(path,'models.dict')
    if not os.path.exists(modelsfile):
        path = os.getcwd()
        modelsfile = os.path.join(path,'models.dict')
    if not os.path.exists(modelsfile):
        #write a default file if none available
        modelsdict = createModels()
        writeModelsFile(modelsfile, modelsdict)    
    currentmodels = pickle.load(open(modelsfile,'r'))
    updateModels(currentmodels)
    return currentmodels, modelsfile
Update the current set of available models from a dict
Update the current set of available models from a dict
Update the current set of available models from a dict
def loadModelsFile(modelsfile=None):
    if modelsfile == None:
        path = os.path.abspath(os.path.dirname(__file__))
        modelsfile = os.path.join(path,'models.dict')
    if not os.path.exists(modelsfile):
        path = os.getcwd()
        modelsfile = os.path.join(path,'models.dict')
    if not os.path.exists(modelsfile):
        modelsdict = createModels()
        writeModelsFile(modelsfile, modelsdict)    
    currentmodels = pickle.load(open(modelsfile,'r'))
    updateModels(currentmodels)
    return currentmodels, modelsfile
def loadModelsFile ( modelsfile = None ) : if modelsfile == None : path = os . path . abspath ( os . path . dirname ( __file__ ) ) modelsfile = os . path . join ( path , 'models.dict' ) if not os . path . exists ( modelsfile ) : path = os . getcwd ( ) modelsfile = os . path . join ( path , 'models.dict' ) if not os . path . exists ( modelsfile ) : modelsdict = createModels ( ) writeModelsFile ( modelsfile , modelsdict ) currentmodels = pickle . load ( open ( modelsfile , 'r' ) ) updateModels ( currentmodels ) return currentmodels , modelsfile
Update the current set of available models from a dict
Update the current set of available models from a dict
"""Update the current set of available models from a dict""" #write a default file if none available
modelsfile