# HG changeset patch # User map01bf # Date 1278069806 0 # Node ID 70542745f4736a242a084ee48e26ae05c23306e1 # Parent 2fad8cfdb2d8b0ed361799fa0683a89e51da562e db creation can now use non-default values for datasize, ntracks and datadim diff -r 2fad8cfdb2d8 -r 70542745f473 bindings/python/pyadb.py --- a/bindings/python/pyadb.py Fri Jun 25 19:49:30 2010 +0000 +++ b/bindings/python/pyadb.py Fri Jul 02 11:23:26 2010 +0000 @@ -32,7 +32,10 @@ "falsePositives":bool, "accumulation":str, "distance":str, "npoints":int, "ntracks":int, "includeKeys":list, "excludeKeys":list, "radius":float, "absThres":float, "relThres":float, "durRatio":float, "hopSize":int, "resFmt":str} - def __init__(self, path, mode='w'): + def __init__(self, path, mode='w', datasize=0, ntracks=0, datadim=0): + """ + initialize the database. By default db will hold 20000 tracks, be 2GB in size and determine datadim from the first inserted feature + """ self.path = path self.configQuery = {} if not (mode=='w' or mode =='r'): @@ -40,7 +43,7 @@ if os.path.exists(path): self._db = _pyadb._pyadb_open(path, mode) else: - self._db = _pyadb._pyadb_create(path,0,0,0) + self._db = _pyadb._pyadb_create(path,datasize,ntracks,datadim) self._updateDBAttributes() return