Made filtering deploxments optional

This commit is contained in:
Max Nuding 2022-01-09 08:16:16 +01:00
parent 99f44adfc9
commit 2cd91859e5
Signed by: phlaym
GPG Key ID: A06651BAB6777237

View File

@ -7,6 +7,7 @@ from matplotlib import pyplot as plt
import matplotlib.dates as md import matplotlib.dates as md
SHOW_DEPLOYMENTS = True SHOW_DEPLOYMENTS = True
FILTER_DEPLOYMENTS = True
plt.rcParams["figure.autolayout"] = True plt.rcParams["figure.autolayout"] = True
@ -85,9 +86,10 @@ latest_available_temp_date = max(datenums)
earliest_available_temp_date = min(datenums) earliest_available_temp_date = min(datenums)
deployments_data = zip(deployment_names, deployment_dates) deployments_data = zip(deployment_names, deployment_dates)
filtered_deployments_data = filter(lambda tup: filtered_deployments_data = (filter(lambda tup:
tup[1] >= earliest_available_temp_date and tup[1] >= earliest_available_temp_date and
tup[1] <= latest_available_temp_date, deployments_data) tup[1] <= latest_available_temp_date, deployments_data)
if FILTER_DEPLOYMENTS else deployments_data)
max_temp = max(max(data_frame.tempWarmSide1C), max(data_frame.tempWarmSide2C)) max_temp = max(max(data_frame.tempWarmSide1C), max(data_frame.tempWarmSide2C))