Page MenuHomec4science

exp-statistics.py
No OneTemporary

File Metadata

Created
Fri, Jul 4, 13:19

exp-statistics.py

#!/usr/bin/env python
import sys
from os import listdir
from os.path import isfile, join
if len(sys.argv) != 3:
print "Usage: " + sys.argv[0] + " <exp_folder> <exp_type>"
exit(1)
exp_folder = sys.argv[1]
exp_type = sys.argv[2]
file_suffix = ".jrt.cdf"
for f in listdir(exp_folder):
if isfile(join(exp_folder, f)):
if exp_type in f and f.endswith(file_suffix) and not "avg" in f:
print f
with open(join(exp_folder, f), "r") as in_file:
lines = in_file.readlines()
print len(lines)

Event Timeline