Skip to content

Commit ba71171

Browse files
committed
update reference plans for schedule plan page
1 parent e3fb340 commit ba71171

File tree

1 file changed

+28
-36
lines changed

1 file changed

+28
-36
lines changed

src/pages/4_SAT_Schedule_Plan.py

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,16 @@
2424
# dictionary goes dict[elevation][sun_keepout]
2525
schedule_files = {
2626
50 : {
27-
45: os.path.join(
28-
schedule_base_dir,
29-
'20250117_d-40,-10_e50_s0.5,0.8_a45.txt'
30-
),
31-
49: os.path.join(
32-
schedule_base_dir,
33-
'20250117_d-40,-10_e50_s0.5,0.8_a49.txt'
34-
),
27+
45: os.path.join(schedule_base_dir,
28+
'SAT-scan-schedules/20250625_d-40,-10_e50_t40_s0.5,0.8_a45_j2025-06-15T12:00+00:00_n365.txt'),
29+
49: os.path.join(schedule_base_dir,
30+
'SAT-scan-schedules/20250625_d-40,-10_e50_t40_s0.5,0.8_a49_j2025-06-15T12:00+00:00_n365.txt'),
3531
},
3632
60 : {
37-
45: os.path.join(
38-
schedule_base_dir,
39-
'20250117_d-40,-10_e60_s0.5,0.8_a45.txt'
40-
),
41-
49: os.path.join(
42-
schedule_base_dir,
43-
'20250117_d-40,-10_e60_s0.5,0.8_a49.txt'
44-
),
33+
45: os.path.join(schedule_base_dir,
34+
'SAT-scan-schedules/20250625_d-40,-10_e60_t40_s0.5,0.8_a45_j2025-06-15T12:00+00:00_n365.txt'),
35+
49: os.path.join(schedule_base_dir,
36+
'SAT-scan-schedules/20250625_d-40,-10_e60_t40_s0.5,0.8_a49_j2025-06-15T12:00+00:00_n365.txt'),
4537
}
4638
}
4739

@@ -69,12 +61,12 @@
6961

7062

7163
with right_column:
72-
start_time = st.time_input("Start time (UTC)",
73-
value="now",
64+
start_time = st.time_input("Start time (UTC)",
65+
value="now",
7466
key='start_time'
7567
)
76-
end_time = st.time_input("End time (UTC)",
77-
value="now",
68+
end_time = st.time_input("End time (UTC)",
69+
value="now",
7870
key='end_time'
7971
)
8072

@@ -97,15 +89,15 @@
9789
raise ValueError(f"Schedule file {sfile} does not exist")
9890
print(f"using schedule file {sfile}")
9991
t0_state_file = None
100-
92+
10193
match platform:
10294
case "satp1":
10395
Policy = SATP1Policy
10496
case "satp2":
10597
Policy = SATP2Policy
10698
case "satp3":
10799
Policy = SATP3Policy
108-
100+
109101
cfg = {'apply_boresight_rot': platform != "satp3", }
110102
policy = Policy.from_defaults(
111103
master_file=sfile,
@@ -119,8 +111,8 @@
119111
data = np.zeros( (0,6))
120112
def block_to_arr(block):
121113
return np.array([
122-
block.t0, block.alt,
123-
block.boresight_angle,
114+
block.t0, block.alt,
115+
block.boresight_angle,
124116
block.hwp_dir, block.az_speed,
125117
block.az_accel
126118
])
@@ -146,22 +138,22 @@ def block_to_arr(block):
146138

147139
for block in seq:
148140
tt = (block.t1-block.t0).total_seconds()
149-
ax1.fill_between(
150-
[block.t0, block.t1],
141+
ax1.fill_between(
142+
[block.t0, block.t1],
151143
[block.az+block.throw, block.az+block.throw+block.az_drift*tt],
152144
[block.az, block.az+block.az_drift*tt],
153145
)
154146
ax2.plot( [block.t0, block.t1], [block.alt, block.alt] )
155-
ax3.plot(
156-
[block.t0, block.t1],
157-
[block.boresight_angle, block.boresight_angle]
147+
ax3.plot(
148+
[block.t0, block.t1],
149+
[block.boresight_angle, block.boresight_angle]
158150
)
159-
ax4.plot(
160-
[block.t0, block.t1],
161-
[block.az_speed, block.az_speed]
151+
ax4.plot(
152+
[block.t0, block.t1],
153+
[block.az_speed, block.az_speed]
162154
)
163-
ax5.plot(
164-
[block.t0, block.t1],
155+
ax5.plot(
156+
[block.t0, block.t1],
165157
[block.hwp_dir, block.hwp_dir] , lw=2
166158
)
167159

@@ -170,7 +162,7 @@ def block_to_arr(block):
170162
while l <= t1:
171163
vlines.append(l)
172164
l += dt.timedelta(hours=24)
173-
165+
174166
locator = mdates.AutoDateLocator()
175167
formatter = mdates.ConciseDateFormatter(locator)
176168
for ax in [ax1, ax2, ax3, ax4, ax5]:
@@ -179,7 +171,7 @@ def block_to_arr(block):
179171
ax.set_ylim(y0,y1)
180172
ax.xaxis.set_major_locator(locator)
181173
ax.xaxis.set_major_formatter(formatter)
182-
174+
183175
ax1.set_ylabel("Azimuth")
184176
ax2.set_ylabel("Elevation")
185177
ax2.set_ylim(30,70)

0 commit comments

Comments
 (0)