2013-08-12 13:17:03 -04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
# import statepoint
|
|
|
|
|
sys.path.append('../../src/utils')
|
|
|
|
|
import statepoint
|
|
|
|
|
|
|
|
|
|
# read in statepoint file
|
2013-08-21 16:19:54 -04:00
|
|
|
if len(sys.argv) > 1:
|
2013-08-22 12:17:28 -04:00
|
|
|
sp = statepoint.StatePoint(sys.argv[1])
|
2013-08-21 16:19:54 -04:00
|
|
|
else:
|
2013-08-22 12:17:28 -04:00
|
|
|
sp = statepoint.StatePoint('statepoint.10.binary')
|
2013-08-12 13:17:03 -04:00
|
|
|
sp.read_results()
|
|
|
|
|
|
|
|
|
|
# set up output string
|
|
|
|
|
outstr = ''
|
|
|
|
|
|
|
|
|
|
# write out k-combined
|
|
|
|
|
outstr += 'k-combined:\n'
|
2013-08-22 17:00:57 -04:00
|
|
|
outstr += "{0:12.6E} {1:12.6E}\n".format(sp.k_combined[0], sp.k_combined[1])
|
2013-08-12 13:17:03 -04:00
|
|
|
|
|
|
|
|
# write results to file
|
|
|
|
|
with open('results_test.dat','w') as fh:
|
|
|
|
|
fh.write(outstr)
|