|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
import os
|
|
|
import re
|
|
|
+import json
|
|
|
import shlex
|
|
|
import collections
|
|
|
import datetime
|
|
@@ -348,10 +349,15 @@ class Application(object):
|
|
|
' --params-filename params.json'
|
|
|
.format(opt_params=opt_params, params=params, prefix=self.prefix))
|
|
|
|
|
|
- with open('log.txt', 'w') as f:
|
|
|
- f.write(cmd)
|
|
|
+ result = self.run_command(cmd)
|
|
|
|
|
|
- return self.run_command(cmd)
|
|
|
+ if result == 0:
|
|
|
+ with open('params.json') as f:
|
|
|
+ opt = json.load(f)
|
|
|
+ self.log.highlight(" Optimal axis: {}".format(opt['lamino-angle']['value']))
|
|
|
+ self.log.highlight(" Optimal center: {}".format(opt['x-center']['value']))
|
|
|
+
|
|
|
+ return result
|
|
|
|
|
|
def do_nothing(self):
|
|
|
return True
|