@@ -919,7 +919,7 @@ def create_plot(self, df: pd.DataFrame):
919
919
print ("summary statistics " )
920
920
print (df ["erv_efficiency_oa" ].describe ())
921
921
print ("=" * 50 )
922
-
922
+
923
923
sys .stdout .flush ()
924
924
925
925
# Create the plot with four subplots
@@ -934,16 +934,19 @@ def create_plot(self, df: pd.DataFrame):
934
934
935
935
# Plot ERV Exhaust Air Side Temps
936
936
ax2 .plot (df .index , df [self .erv_eat_enter_col ], label = "Enter" , color = "red" )
937
- ax2 .plot (df .index , df [self .erv_eat_leaving_col ], label = "Leaving" , color = "purple" )
937
+ ax2 .plot (
938
+ df .index , df [self .erv_eat_leaving_col ], label = "Leaving" , color = "purple"
939
+ )
938
940
ax2 .legend (loc = "best" )
939
941
ax2 .set_ylabel ("ERV Exhaust Air Side Temps °F" )
940
942
941
-
942
943
# Plot ERV Efficiency
943
- ax3 .plot (df .index , df ["erv_efficiency_oa" ], label = "ERV Efficiency OA" , color = "b" )
944
+ ax3 .plot (
945
+ df .index , df ["erv_efficiency_oa" ], label = "ERV Efficiency OA" , color = "b"
946
+ )
944
947
ax3 .legend (loc = "best" )
945
948
ax3 .set_ylabel ("ERV Efficiency OA" )
946
-
949
+
947
950
# Plot Fault Flags
948
951
ax4 .plot (df .index , df [self .fault_col ], label = "Fault" , color = "k" )
949
952
ax4 .set_xlabel ("Date" )
@@ -970,14 +973,12 @@ def summarize_fault_times(self, df: pd.DataFrame) -> dict:
970
973
"flag_true_erv_oat_leave_temp" : round (
971
974
df [self .erv_oat_leaving_col ].where (df [self .fault_col ] == 1 ).mean (), 2
972
975
),
973
-
974
976
"flag_true_erv_eat_enter_temp" : round (
975
977
df [self .erv_eat_enter_col ].where (df [self .fault_col ] == 1 ).mean (), 2
976
978
),
977
979
"flag_true_erv_eat_leave_temp" : round (
978
980
df [self .erv_eat_leaving_col ].where (df [self .fault_col ] == 1 ).mean (), 2
979
981
),
980
-
981
982
"hours_motor_runtime" : round (
982
983
(delta * df [self .supply_vfd_speed_col ].gt (0.01 ).astype (int )).sum ()
983
984
/ pd .Timedelta (hours = 1 ),
0 commit comments