Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
oeigner
LINK - Forschungsprojekt Repo
Commits
b1cec9c0
Commit
b1cec9c0
authored
Jul 09, 2021
by
Fabian Kovac
Browse files
[b] added 15min timedelta to transmissions
parent
79b73131
Changes
2
Hide whitespace changes
Inline
Side-by-side
FHSTP/Datenvorverarbeitung.pdf
View file @
b1cec9c0
No preview for this file type
FHSTP/prep.py
View file @
b1cec9c0
...
...
@@ -14,6 +14,7 @@ import datetime
import
numpy
as
np
import
pandas
as
pd
from
pandas.tseries.offsets
import
Minute
def
parse_arguments
()
->
argparse
.
Namespace
:
...
...
@@ -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
)
_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
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
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment