You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
search_data_sources and search_beliefs use slightly different filters for event timing
Passing a one-day resolution to search_beliefs leads to clipping off the 23-hour day of the spring DST transition.
Issue 1
search_beliefs uses event_ends_after and event_starts_before internally, resulting in events that partly fall in the searched time window to be included. After resampling, the results are clipped to the desired time interval.
search_data_sources uses event_starts_after and event_ends_before, resulting in event that partly fall in the searched time window to be excluded. On the day of the spring DST transition, the 23-hour event is being interpreted as a 24-hour event that extends 1 one hour past midnight.
Given some sensor (here, with ID 40755) with a "P1D" event resolution in the "Europe/Amsterdam" timezone, and an event registered on that sensor with event start at "2023-03-26 00:00:00+01:00" (day of spring DST):
from flexmeasures import Sensor
import pandas as pd
sensor = Sensor.query.get(40755)
# one row, as expected
sensor.search_beliefs(event_starts_after="2023-03-26 00:00:00+01:00", event_ends_before="2023-03-27 00:00:00+02:00")
# empty frame, unexpected
sensor.search_beliefs(event_starts_after="2023-03-26 00:00:00+01:00", event_ends_before="2023-03-27 00:00:00+02:00", resolution=pd.Timedelta("P1D"))
The text was updated successfully, but these errors were encountered:
Two underlying issues:
search_data_sources
andsearch_beliefs
use slightly different filters for event timingsearch_beliefs
leads to clipping off the 23-hour day of the spring DST transition.Issue 1
search_beliefs
usesevent_ends_after
andevent_starts_before
internally, resulting in events that partly fall in the searched time window to be included. After resampling, the results are clipped to the desired time interval.search_data_sources
usesevent_starts_after
andevent_ends_before
, resulting in event that partly fall in the searched time window to be excluded. On the day of the spring DST transition, the 23-hour event is being interpreted as a 24-hour event that extends 1 one hour past midnight.Related to #484.
Issue 2
Given some sensor (here, with ID 40755) with a
"P1D"
event resolution in the"Europe/Amsterdam"
timezone, and an event registered on that sensor with event start at"2023-03-26 00:00:00+01:00"
(day of spring DST):The text was updated successfully, but these errors were encountered: