Exemplo n.º 1
0
def wheat_leaf_db():
    from alinea.adel.wheat.extract_wheat import extract_leaf_info
    import alinea.adel.fitting as fitting
    leaves = extract_leaf_info(datadir + '/data/So99.RData',
                               datadir + '/data/SRSo.RData')
    leaves, discard = fitting.fit_leaves(leaves, 9)
    return leaves
Exemplo n.º 2
0
def leaves_db():
    import cPickle as Pickle
    f = open('../src/alinea/adel/data/leaves.db')
    leaves = Pickle.load(f)
    f.close()
    leaves = fitting.fit_leaves(leaves, 9)
    #print "leaves ", leaves
    return leaves[0]
Exemplo n.º 3
0
def leaves_db():
    import cPickle as Pickle
    fn = r'../src/alinea/adel/data/leaves.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves = fitting.fit_leaves(leaves, 9)
    return leaves[0]
Exemplo n.º 4
0
def leaves_db():
    import cPickle as Pickle
    f = open('../adel/data/leaves.db')
    leaves = Pickle.load(f)
    f.close()
    leaves = fitting.fit_leaves(leaves, 9)
    print "leaves ", leaves
    return leaves
Exemplo n.º 5
0
def leaves_db(dlevel=9):
    import cPickle as Pickle
    fn = r'../adel/data/leaves_simple.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves,discard = fitting.fit_leaves(leaves, dlevel)
    return leaves
Exemplo n.º 6
0
def leaves_db(dlevel=9):
    import cPickle as Pickle
    fn = r'../adel/data/leaves_simple.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves, discard = fitting.fit_leaves(leaves, dlevel)
    return leaves
Exemplo n.º 7
0
def leaves_db():
    import cPickle as Pickle
    fn = r'../adel/data/leaves.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves = fitting.fit_leaves(leaves, 9)
    return leaves[0]
Exemplo n.º 8
0
def leaves_db():
    import cPickle as Pickle
    import alinea.adel.fitting as fitting
    fn = datadir + '/data/leaves_simple.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves,discard = fitting.fit_leaves(leaves, 9)
    return leaves
Exemplo n.º 9
0
def leaves_db():
    import cPickle as Pickle
    import alinea.adel.fitting as fitting
    fn = datadir + '/data/leaves_simple.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves, discard = fitting.fit_leaves(leaves, 9)
    return leaves
Exemplo n.º 10
0
def leaves_db():
    import cPickle as Pickle
    fn = r'../adel/data/leaves_simple.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves = fitting.fit_leaves(leaves, 9)
    
    db = leaves
    functions = build_symbols(db)
    return functions
Exemplo n.º 11
0
def leaves_db():
    import cPickle as Pickle
    fn = r'../src/alinea/adel/data/leaves.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves = fitting.fit_leaves(leaves, 9)

    db = leaves[0]
    functions = build_symbols(db)
    return functions
Exemplo n.º 12
0
def load_leaves_db():
    import cPickle as Pickle
    import alinea.adel.fitting as fitting
    from alinea.adel.symbol import build_symbols

    fn = r'leaves_simple.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves = fitting.fit_leaves(leaves, 9)
    symbols = build_symbols(leaves[0])
    db = leaves[0]
    return db, symbols
Exemplo n.º 13
0
def load_leaves_db():
    import cPickle as Pickle
    import alinea.adel.fitting as fitting
    from alinea.adel.symbol import build_symbols
    
    fn = r'leaves_simple.db'
    f = open(fn)
    leaves = Pickle.load(f)
    f.close()
    leaves = fitting.fit_leaves(leaves, 9)
    symbols = build_symbols(leaves[0])
    db = leaves[0]
    return db, symbols
Exemplo n.º 14
0
 def fit_leaves(self):
     leaves = {}
     xy = self.xydb
     sr = self.srdb
     for k in xy.keys():
         leaves[k]=[]
         for i in range(len(xy[k])):
             if self.dynamic :
                 xysr = {age:(list(xy[k][i][age]['x']), list(xy[k][i][age]['y']), list(sr[k]['s']), list(sr[k]['r'])) for age in xy[k][i]}
             else:
                 xysr = (xy[k][i][0], xy[k][i][1], sr[k][0], sr[k][1])
             leaves[k].append(xysr)
     leaves,discard = fitting.fit_leaves(leaves, self.discretisation_level, self.dynamic)
         
     self.leaves = leaves
Exemplo n.º 15
0
 def fit_leaves(self):
     leaves = {}
     xy = self.xydb
     sr = self.srdb
     for k in xy.keys():
         leaves[k]=[]
         for i in range(len(xy[k])):
             if self.dynamic :
                 xysr = {age:(list(xy[k][i][age]['x']), list(xy[k][i][age]['y']), list(sr[k]['s']), list(sr[k]['r'])) for age in xy[k][i]}
             else:
                 xysr = (xy[k][i][0], xy[k][i][1], sr[k][0], sr[k][1])
             leaves[k].append(xysr)
     leaves,discard = fitting.fit_leaves(leaves, self.discretisation_level, self.dynamic)
         
     self.leaves = leaves
Exemplo n.º 16
0
def fit_leaves(db, nb_points):
    db, discard = fitting.fit_leaves(db, nb_points)
    return db, discard
Exemplo n.º 17
0
def wheat_leaf_db():
    from alinea.adel.wheat.extract_wheat import extract_leaf_info
    import alinea.adel.fitting as fitting
    leaves= extract_leaf_info(datadir + '/data/So99.RData',datadir + '/data/SRSo.RData')
    leaves,discard = fitting.fit_leaves(leaves, 9)
    return leaves
Exemplo n.º 18
0
def fit_leaves( db, nb_points):
    db,discard = fitting.fit_leaves(db, nb_points)
    return db,discard