From 89434d44fc91bf6dbaf023b3f3218c892420d908 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Sun, 03 Jul 2016 20:00:18 +0000
Subject: [PATCH] fixed some of the issues while reconstructing wesicles. Added Nbw/Nb metrics to the tspoststat tool.

---
 python/trisurf/statistics.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/python/trisurf/statistics.py b/python/trisurf/statistics.py
index 9b3d454..016e24c 100644
--- a/python/trisurf/statistics.py
+++ b/python/trisurf/statistics.py
@@ -1,19 +1,20 @@
 from trisurf import trisurf
 import os
 
-def combine(Runs):
+def combine(Runs,filename="statistics.csv",output="combinedStatistics.csv"):
 	"""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")
+		statfile=os.path.join(dir.fullpath(),filename)
 		with open (statfile,"r") as myfile:
 			#lines = [line.rstrip('\n') for line in myfile]
 			data=data+myfile.readlines()[1:]
-	
-	print("Header line placer... Not yet implemented")
-	for line in data:
-		print(line.replace('\n',''))
+
+	with open (output,"w") as output:
+		output.write("Header line placer... Not yet implemented\n")
+		for line in data:
+			output.write(line)
 
 	
 

--
Gitblit v1.9.3