Skip to content

Commit

Permalink
added output and plot options to pysg+_run
Browse files Browse the repository at this point in the history
  • Loading branch information
anh committed Aug 15, 2023
1 parent e935f58 commit 3d961be
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pysg_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ def build_layout(data, info):
# add buttons to run/quit/help
layout.extend([[sg.Text()],
[
sg.Button('Run'),
sg.Button('Output'),
sg.Button('Plot'),
sg.Button('View File'),
sg.Button('Help'),
sg.Button('Reset'),
Expand Down Expand Up @@ -400,9 +401,9 @@ def update_tk_sliders(f):
plot.kill()
lines = None
break
elif event in ('Run', 'Plot', 'Print Only'):
elif event in ('Output', 'Plot', 'Print Only'):
cmd = run(args.file, values['output-dir'], data, values)
if cmd and event == 'Plot' or (event == 'Run' and args.run):
if cmd and event == 'Plot':
if not path.exists(athena):
print('Athena not found\nExiting')
exit()
Expand All @@ -418,7 +419,7 @@ def update_tk_sliders(f):
remove(h[0])
# will the tlim variable always be like this?
display_pbar(cmd, values['time/tlim'])
print(info)
#print(info)
plots.append(Popen(['python', 'plot1d.py', '-d', values['output-dir'], '-n', info['problem']]))
plots.append(Popen(['python', 'plot1d.py', '-d', values['output-dir'], '--hst', '-n', info['problem'] + ' history']))
elif cmd:
Expand Down

0 comments on commit 3d961be

Please sign in to comment.