Spaces:
Sleeping
Sleeping
better graph display
Browse files
app.py
CHANGED
|
@@ -1257,14 +1257,19 @@ if st.session_state["experiment"] is not None:
|
|
| 1257 |
# get_graph(placeholder)
|
| 1258 |
|
| 1259 |
while True:
|
| 1260 |
-
|
| 1261 |
-
|
| 1262 |
-
|
| 1263 |
-
|
| 1264 |
-
|
| 1265 |
-
|
| 1266 |
-
|
| 1267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1268 |
|
| 1269 |
temp_graph = None
|
| 1270 |
od_graph = None
|
|
@@ -1275,13 +1280,13 @@ if st.session_state["experiment"] is not None:
|
|
| 1275 |
"experiment": st.session_state["experiment"],
|
| 1276 |
"reactor": reactor,
|
| 1277 |
"filter_mod": 1,
|
| 1278 |
-
"lookback":
|
| 1279 |
"filter_mod2": 1,
|
| 1280 |
-
"lookback2":
|
| 1281 |
"filter_mod3": 1,
|
| 1282 |
-
"lookback3":
|
| 1283 |
"filter_mod4": 1,
|
| 1284 |
-
"lookback4":
|
| 1285 |
"amount": amount_of_data,
|
| 1286 |
"amount2": amount_of_data2,
|
| 1287 |
"amount3": amount_of_data3,
|
|
|
|
| 1257 |
# get_graph(placeholder)
|
| 1258 |
|
| 1259 |
while True:
|
| 1260 |
+
if st.session_state.get("df", None) is not None and st.session_state.get("temp_radio", None) == amount_of_data:
|
| 1261 |
+
placeholder.line_chart(st.session_state["df"], x_label="Time", y_label="Temperature (°C)")
|
| 1262 |
+
if st.session_state.get("df2", None) is not None and st.session_state.get("od_radio", None) == amount_of_data2:
|
| 1263 |
+
placeholder2.line_chart(st.session_state["df2"], x_label="Time", y_label="OD Reading")
|
| 1264 |
+
if st.session_state.get("df3", None) is not None and st.session_state.get("norm_od_radio", None) == amount_of_data3:
|
| 1265 |
+
placeholder3.line_chart(st.session_state["df3"], x_label="Time", y_label="Normalized OD Reading")
|
| 1266 |
+
if st.session_state.get("df4", None) is not None and st.session_state.get("growth_rate_radio", None) == amount_of_data4:
|
| 1267 |
+
placeholder4.line_chart(st.session_state["df4"], x_label="Time", y_label="Growth Rate")
|
| 1268 |
+
|
| 1269 |
+
st.session_state["temp_radio"] = amount_of_data
|
| 1270 |
+
st.session_state["od_radio"] = amount_of_data2
|
| 1271 |
+
st.session_state["norm_od_radio"] = amount_of_data3
|
| 1272 |
+
st.session_state["growth_rate_radio"] = amount_of_data4
|
| 1273 |
|
| 1274 |
temp_graph = None
|
| 1275 |
od_graph = None
|
|
|
|
| 1280 |
"experiment": st.session_state["experiment"],
|
| 1281 |
"reactor": reactor,
|
| 1282 |
"filter_mod": 1,
|
| 1283 |
+
"lookback": 10000000,
|
| 1284 |
"filter_mod2": 1,
|
| 1285 |
+
"lookback2": 10000000,
|
| 1286 |
"filter_mod3": 1,
|
| 1287 |
+
"lookback3": 10000000,
|
| 1288 |
"filter_mod4": 1,
|
| 1289 |
+
"lookback4": 10000000,
|
| 1290 |
"amount": amount_of_data,
|
| 1291 |
"amount2": amount_of_data2,
|
| 1292 |
"amount3": amount_of_data3,
|