|
@@ -574,10 +574,16 @@ def main():
|
|
if len(res_avg[0]) != 0:
|
|
if len(res_avg[0]) != 0:
|
|
begintime = res_avg[0][0][res_avg[1].index("begintime")]
|
|
begintime = res_avg[0][0][res_avg[1].index("begintime")]
|
|
runs_range = (begintime, None)
|
|
runs_range = (begintime, None)
|
|
|
|
+ logging.info(f"only_last flag enabled. Time range for runs database is used: {runs_range}")
|
|
|
|
|
|
res_rdb = rdb.load_tables(runs_range)
|
|
res_rdb = rdb.load_tables(runs_range)
|
|
runs_df = pd.DataFrame(res_rdb[0], columns=res_rdb[1])
|
|
runs_df = pd.DataFrame(res_rdb[0], columns=res_rdb[1])
|
|
|
|
|
|
|
|
+ if args.only_last:
|
|
|
|
+ # Remain the studied season only (important for the first averaging in the season with turned on only last flag)
|
|
|
|
+ start_season_run, stop_season_run = SEASONS['start_run'][idx], SEASONS['start_run'][idx+1] if SEASONS['start_run'][idx+1] else np.inf
|
|
|
|
+ runs_df = runs_df.query(f'(run>=@start_season_run)&(run<@stop_season_run)')
|
|
|
|
+
|
|
tdlt0 = timedelta(days=2)
|
|
tdlt0 = timedelta(days=2)
|
|
time_range = (runs_df.starttime.min() - tdlt0, runs_df.stoptime.max() + tdlt0)
|
|
time_range = (runs_df.starttime.min() - tdlt0, runs_df.stoptime.max() + tdlt0)
|
|
|
|
|