2 Commits

Author SHA1 Message Date
99f44adfc9 Added deployment stages 2022-01-09 08:07:35 +01:00
0f0aba676b Added operating temperature 2022-01-09 05:19:45 +00:00

View File

@ -6,6 +6,8 @@ import pandas as pd
from matplotlib import pyplot as plt
import matplotlib.dates as md
SHOW_DEPLOYMENTS = True
plt.rcParams["figure.autolayout"] = True
data_frame = pd.read_csv("data.csv", delimiter=';')
@ -43,6 +45,56 @@ plt.plot(datenums, data_frame.tempCoolSide2C, label='Cool 2', color='navy', mark
for i, j in zip(datenums, data_frame.tempCoolSide2C):
ax.annotate(str(round(j, 2)), xy=(i, j), rotation=45)
plt.axhline(y=-223, color='darkblue', linestyle=':', label='Operating temperature')
launch_date = datetime.datetime.fromisoformat('2021-12-25T12:20+00:00')
deployment_names = [
'Sunshield Pallet',
'DTA Deployment',
'Sunshield Covers Release',
'Sunshield Mid-Boom',
'Sunshield Layer Tensioning Ongoing',
'Sunshield Tensioning Complete',
'Secondary Mirror Deployment',
'Aft Deployed Instrument Radiator',
'Port Primary Mirror Wing',
'WEBB IS FULLY DEPLOYED!',
'Individual Mirror Segment Movements',
'L2 Insertion Burn',
'WEBB IS ORBITING L2'
]
# deployment dates, based on "+ X days"
deployment_dates = [md.date2num(launch_date + datetime.timedelta(days=x)) for x in [
3,
4,
5,
6,
9,
10,
11,
12,
13,
14,
15,
26,
29.5]
]
latest_available_temp_date = max(datenums)
earliest_available_temp_date = min(datenums)
deployments_data = zip(deployment_names, deployment_dates)
filtered_deployments_data = filter(lambda tup:
tup[1] >= earliest_available_temp_date and
tup[1] <= latest_available_temp_date, deployments_data)
max_temp = max(max(data_frame.tempWarmSide1C), max(data_frame.tempWarmSide2C))
if SHOW_DEPLOYMENTS:
for label, date in filtered_deployments_data:
plt.axvline(x=date, color='gray', linestyle=':')
plt.text(x=date, y=max_temp+30, s=label, rotation=25)
plt.legend(bbox_to_anchor=(1, 1), loc="upper left")
plt.show()