another ttrty
Browse files
app.py
CHANGED
@@ -675,6 +675,8 @@ def get_data_default(time_scale, exp):
|
|
675 |
|
676 |
client.unsubscribe(f"pioreactor/{PIOREACTOR}/readings")
|
677 |
|
|
|
|
|
678 |
if temp_graph is not None:
|
679 |
for temp in temp_graph:
|
680 |
utc_time = datetime.strptime(temp["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
|
@@ -691,7 +693,8 @@ def get_data_default(time_scale, exp):
|
|
691 |
plt.ylabel("Temperature (C)")
|
692 |
plt.title("Temperature vs Time")
|
693 |
plt.legend()
|
694 |
-
|
|
|
695 |
else:
|
696 |
plot1 = None
|
697 |
|
@@ -711,7 +714,8 @@ def get_data_default(time_scale, exp):
|
|
711 |
plt.ylabel("OD")
|
712 |
plt.title("OD vs Time")
|
713 |
plt.legend()
|
714 |
-
|
|
|
715 |
else:
|
716 |
plot2 = None
|
717 |
|
@@ -731,7 +735,8 @@ def get_data_default(time_scale, exp):
|
|
731 |
plt.ylabel("Normalized OD")
|
732 |
plt.title("Normalized OD vs Time")
|
733 |
plt.legend()
|
734 |
-
|
|
|
735 |
else:
|
736 |
plot3 = None
|
737 |
|
@@ -751,11 +756,12 @@ def get_data_default(time_scale, exp):
|
|
751 |
plt.ylabel("Growth Rate")
|
752 |
plt.title("Growth Rate vs Time")
|
753 |
plt.legend()
|
754 |
-
|
|
|
755 |
else:
|
756 |
plot4 = None
|
757 |
|
758 |
-
return
|
759 |
|
760 |
|
761 |
# Define the interface components
|
|
|
675 |
|
676 |
client.unsubscribe(f"pioreactor/{PIOREACTOR}/readings")
|
677 |
|
678 |
+
plots = [None, None, None, None]
|
679 |
+
|
680 |
if temp_graph is not None:
|
681 |
for temp in temp_graph:
|
682 |
utc_time = datetime.strptime(temp["x"], "%Y-%m-%dT%H:%M:%S.%fZ")
|
|
|
693 |
plt.ylabel("Temperature (C)")
|
694 |
plt.title("Temperature vs Time")
|
695 |
plt.legend()
|
696 |
+
plots[0] = plt.gcf()
|
697 |
+
plt.close()
|
698 |
else:
|
699 |
plot1 = None
|
700 |
|
|
|
714 |
plt.ylabel("OD")
|
715 |
plt.title("OD vs Time")
|
716 |
plt.legend()
|
717 |
+
plots[1] = plt.gcf()
|
718 |
+
plt.close()
|
719 |
else:
|
720 |
plot2 = None
|
721 |
|
|
|
735 |
plt.ylabel("Normalized OD")
|
736 |
plt.title("Normalized OD vs Time")
|
737 |
plt.legend()
|
738 |
+
plots[2] = plt.gcf()
|
739 |
+
plt.close()
|
740 |
else:
|
741 |
plot3 = None
|
742 |
|
|
|
756 |
plt.ylabel("Growth Rate")
|
757 |
plt.title("Growth Rate vs Time")
|
758 |
plt.legend()
|
759 |
+
plots[3] = plt.gcf()
|
760 |
+
plt.close()
|
761 |
else:
|
762 |
plot4 = None
|
763 |
|
764 |
+
return plots
|
765 |
|
766 |
|
767 |
# Define the interface components
|