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