Exemplo n.º 1
0
def sumDCandWrite(filelist, outname):
    alldc = []
    for f in filelist:
        dc = DataCollection(f)
        alldc.append(dc)
        rel = os.path.relpath(dc.dataDir, os.getcwd())
        dc.prependToSampleFiles(rel + '/')
        dc.dataDir = os.getcwd()

    merged = sum(alldc)
    print(outname)
    merged.writeToFile(outname)
Exemplo n.º 2
0
def sumDCandWrite(filelist, outname):
    alldc = []
    for f in filelist:
        try:
            dc = DataCollection(f)
        except:
            print('read in of ' + f + ' not working, skip')
            continue
        alldc.append(dc)
        rel = os.path.relpath(dc.dataDir, os.getcwd())
        dc.prependToSampleFiles(rel + '/')
        dc.dataDir = os.getcwd()

    merged = sum(alldc)
    print(outname)
    merged.writeToFile(outname)