-
Notifications
You must be signed in to change notification settings - Fork 0
/
sky_animation.py
68 lines (45 loc) · 1.37 KB
/
sky_animation.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
### hard coding section
ant1 = 136
ant2 = 140
tGoal = 0.7854 # almost exactly 3 hours
###
import os
os.chdir(r"./skyflux/simulations")
#print(os.getcwd())
try:
exec(open("generate_wedge.py").read())
except:
print("Failure to import g_w")
os.chdir(r"../..")
try:
exec(open("index_test.py").read())
except:
print("Failure to import i_t")
print("Importing skyflux.")
import skyflux as sf
print("Skyflux imported.")
srcs = []
for src in sf.catalog.srcs:
if src.alpha == src.alpha:
srcs.append(src)
print("Full-alpha catalog assembled. Length is " + str(len(srcs)))
import numpy as np
srcs = np.array(srcs)
index = len(srcs) - 1
while index >= 0:
### todo
# just show one plot at each plotting step
# the one-source plotter still seems to be showing the wrong LST
label = "computer_" + str(len(srcs) - 1 - index)
print("Starting a new source.")
auto_wedge(srcs[np.array([index])], label=label, ptitle=label)
print("Printing said source.")
load_wedge_sim(label + ".pickle", ant1, ant2, tGoal)
if index == len(srcs) - 1:
index -= 1
continue
previous_label = "computer_" + str(len(srcs) - 2 - index)
merge_files(previous_label, label, label, label)
print("Printing the entire story so far.")
load_wedge_sim(label + ".pickle", ant1, ant2, tGoal)
index -= 1