Trisurf Monte Carlo simulator
Samo Penic
2016-06-01 f3a6c1779ed6eea30da3c120c05153e9494f6715
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from trisurf import trisurf
import os
 
def combine(Runs):
    """Runs are those runs of which statistics are to be combined"""
    data=[]
    for run in Runs:
        dir=trisurf.Directory(maindir=run.maindir,simdir=run.subdir)
        statfile=os.path.join(dir.fullpath(),"statistics.csv")
        with open (statfile,"r") as myfile:
            #lines = [line.rstrip('\n') for line in myfile]
            data=data+myfile.readlines()[1:]
 
    with open ("combinedStatistics.csv","w") as output:
        output.write("Header line placer... Not yet implemented\n")
        for line in data:
            output.write(line)