Closed probberechts closed 3 months ago
~For Wyscout v3 it was unclear whether timestamps are reset at the start of each period. That is, does the first event of the second period get timestamp "00:00" or "45:00". This is not clear from the test data which contains artificial data. Maybe @DriesDeprest can answer this?~
For DataFactory, I am not sure whether the timestamps are in UTC or local time. The test file contains a field match.stadiumGMT = +03.00
. Does this mean that all timestamps are in the UTC+03.00 local time or are all timestamps in UTC time and can we get the local time by adding 3 hours?
For Wyscout v3 it was unclear whether timestamps are reset at the start of each period. That is, does the first event of the second period get timestamp "00:00" or "45:00". This is not clear from the test data which contains artificial data.
In Wyscout V3 event data, the second period starts at timestamp "45:00".
{
"matchPeriod": "2H",
"minute": 45,
"second": 2,
"matchTimestamp": "00:45:02.581",
"videoTimestamp": "3011.581222",
}
Thanks, @JanVanHaaren! I guessed incorrectly 😅 but it should be fixed.
@probberechts Can you please resolve the merge conflicts? Thanks!
The representation of timestamps was inconsistent between different data providers.
This commit implements a uniform implementation between data providers. The timestamps of events and frames are now relative to the kick-off event in each period. This implies that timestamps are reset to zero for each period and that tracking frames before the kick-off event get a negative timestamp. The standard implementation for the start_timestamp and end_timestamp of periods is the absolute UTC datetime of respectively the kick-off and final whistle of the corresponding period. If the absolute datetime is not available, we use the offset between the start of the period's data feed and the kick-off for the start_timestamp, and the offset between the start of the period's data feed and the final whistle for the end_timestamp.
BREAKING CHANGES:
Period.start_timestamp
andPeriod.end_timestamp
fields now have type datetime or timedelta instead of floatDataRecord.timestamp
field now has type timedelta instead of floatPeriod.start_timestamp
,Period.end_timestamp
andDataRecord.timestamp
fields changes for most data providers