-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathiseult.py
executable file
·68 lines (65 loc) · 2.28 KB
/
iseult.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#! /usr/bin/env python
import matplotlib
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
matplotlib.rcParams['image.origin'] = 'upper'
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(
description='Plotting program for Tristan-MP files.')
parser.add_argument(
'-n', nargs='?',
const=-1, default=-1,
help='Maximum file # to consider')
parser.add_argument(
'-framerate', nargs='?',
const=10, default=10,
help='FPS for the movie')
parser.add_argument(
'-outmovie', nargs='?',
const='out.mov', default='out.mov',
help='FPS for the movie')
parser.add_argument(
'-O', nargs='+',
default=[''],
help='Directory Iseult will open. Default is output')
parser.add_argument(
'-p', nargs='?',
const='Default', default='Default',
help='''Open Iseult with the given saved view.
If the name of view contains whitespace,
either it must be enclosed in quotation marks or given
with whitespace removed. Name is case sensitive.''')
parser.add_argument(
"-b", help="Run Iseult from bash script. Makes a movie.",
action="store_true")
parser.add_argument(
"-name", nargs='+',
default=[''], help='Plot Title')
parser.add_argument(
'--wait',
help='''Wait until current simulation is finished
before making movie.''',
action='store_true')
cmd_args = parser.parse_args()
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
sys.path.append(
os.path.join(os.path.dirname(__file__), 'src', 'popup_windows'))
sys.path.append(
os.path.join(os.path.dirname(__file__), 'src', 'utils'))
sys.path.append(
os.path.join(
os.path.dirname(__file__), 'src', 'utils', 'spectra_utils'))
sys.path.append(
os.path.join(
os.path.dirname(__file__), 'src', 'utils', 'shock_finders'))
sys.path.append(
os.path.join(os.path.dirname(__file__), 'src', 'plots'))
if not cmd_args.b:
from main_app import runMe
runMe(cmd_args)
else:
matplotlib.use('Agg')
pass