-
Notifications
You must be signed in to change notification settings - Fork 1
/
generate_figures.py
168 lines (112 loc) · 3.21 KB
/
generate_figures.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Script for data and figure generation for Occam's Quantum Strop
import os
import subprocess
"""
# Make tikz figures of eMs
#######################
# PC
####
os.chdir("figures_and_code/perturbed_coin/eM")
# I use other flags in my TexShop, but only --shell-escape appears to be necessary here
#subprocess.call(["pdflatex", "--file-line-error", "--synctex=1", "--shell-escape", "perturbed_coin.tex"])
subprocess.call(["pdflatex", "--shell-escape", "perturbed_coin.tex"])
os.chdir("../../..")
# RkGM
####
os.chdir("figures_and_code/RkGM/eM")
subprocess.call(["pdflatex", "--shell-escape", "RkGM.tex"])
os.chdir("../../..")
# nemo
####
os.chdir("figures_and_code/nemo/eM")
subprocess.call(["pdflatex", "--shell-escape", "nemo.tex"])
os.chdir("../../..")
"""
"""
# Compute Cq(L) curves
#######################
# PC
####
os.chdir("figures_and_code/perturbed_coin/python")
subprocess.call(["python", "perturbed_coin.py"])
os.chdir("../../..")
# RkGM
####
os.chdir("figures_and_code/RkGM/python")
subprocess.call(["python", "RkGM.py"])
os.chdir("../../..")
# nemo
####
os.chdir("figures_and_code/nemo/python")
subprocess.call(["python", "nemo.py"])
os.chdir("../../..")
"""
"""
# Make composite figures using eMs and Cq(L) curves
# Convert to eps for Scientific Reports
#######################
# PC
####
os.chdir("figures_and_code/perturbed_coin/composite")
subprocess.call(["pdflatex", "--shell-escape", "multi_fig_w_tikz.tex"])
subprocess.call(["pdftops", "-eps", "multi_fig_w_tikz.pdf"])
os.chdir("../../..")
# RkGM
####
os.chdir("figures_and_code/RkGM/composite")
subprocess.call(["pdflatex", "--shell-escape", "multi_fig_w_tikz.tex"])
subprocess.call(["pdftops", "-eps", "multi_fig_w_tikz.pdf"])
os.chdir("../../..")
# nemo
####
os.chdir("figures_and_code/nemo/composite")
subprocess.call(["pdflatex", "--shell-escape", "multi_fig_w_tikz.tex"])
subprocess.call(["pdftops", "-eps", "multi_fig_w_tikz.pdf"])
os.chdir("../../..")
"""
"""
# Convert existing pdfs to eps
#######################
os.chdir("figures_and_code/img")
subprocess.call(["pdftops", "-eps", "R_vs_k_6.pdf"])
os.chdir("../../..")
"""
"""
# Make prediction generation tradeoff fig
# Convert to eps
#######################
os.chdir("figures_and_code/prediction_generation_tradeoff")
subprocess.call(["pdflatex", "--shell-escape", "prediction_generation_tradeoff.tex"])
subprocess.call(["pdftops", "-eps", "prediction_generation_tradeoff.pdf"])
os.chdir("../../..")
"""
"""
# Make pairwise merger machines
#######################
# PC
####
os.chdir("figures_and_code/PMM/perturbed_coin")
subprocess.call(["pdflatex", "--shell-escape", "perturbed_coin_PMM.tex"])
os.chdir("../../..")
# RkGM
####
os.chdir("figures_and_code/PMM/RkGM")
subprocess.call(["pdflatex", "--shell-escape", "RkGM_PMM.tex"])
os.chdir("../../..")
# nemo
####
os.chdir("figures_and_code/PMM/nemo")
subprocess.call(["pdflatex", "--shell-escape", "nemo_PMM.tex"])
os.chdir("../../..")
"""
"""
# Make composite figure of pairwise merger machines
# Convert to eps
#######################
# composite
####
os.chdir("figures_and_code/PMM/composite")
subprocess.call(["pdflatex", "--shell-escape", "multi_fig_w_tikz.tex"])
subprocess.call(["pdftops", "-eps", "multi_fig_w_tikz.pdf"])
os.chdir("../../..")
"""