Commit b1cec9c0 authored by Fabian Kovac's avatar Fabian Kovac
Browse files

[b] added 15min timedelta to transmissions

parent 79b73131
...@@ -14,6 +14,7 @@ import datetime ...@@ -14,6 +14,7 @@ import datetime
import numpy as np import numpy as np
import pandas as pd import pandas as pd
from pandas.tseries.offsets import Minute
def parse_arguments() -> argparse.Namespace: def parse_arguments() -> argparse.Namespace:
...@@ -455,6 +456,10 @@ def prep() -> None: ...@@ -455,6 +456,10 @@ def prep() -> None:
df_link['BEGINTIME'] = df_link['BEGINTIME'].dt.tz_localize('Europe/Vienna').dt.tz_convert('UTC').dt.tz_localize(None) df_link['BEGINTIME'] = df_link['BEGINTIME'].dt.tz_localize('Europe/Vienna').dt.tz_convert('UTC').dt.tz_localize(None)
_log('Converted BEGINTIME to UTC') _log('Converted BEGINTIME to UTC')
# fix 15min time-lag in transmissions
df_link['BEGINTIME'] = df_link['BEGINTIME'] - pd.Timedelta(15, unit = 'min')
_log('Fixed 15min timelag in transmissions')
# only use transmissions with begintime matching INCA date # only use transmissions with begintime matching INCA date
date_inca = np.datetime64(f'{str(dir_inca.stem)[0:4]}-{str(dir_inca.stem)[-4:-2]}-{str(dir_inca.stem)[-2:]}') date_inca = np.datetime64(f'{str(dir_inca.stem)[0:4]}-{str(dir_inca.stem)[-4:-2]}-{str(dir_inca.stem)[-2:]}')
df_link = df_link[df_link['BEGINTIME'].dt.date == date_inca] df_link = df_link[df_link['BEGINTIME'].dt.date == date_inca]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment