mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-11-25 15:06:20 +01:00
fix(pvforecast): align the calibration window to the UTC slot grid
Additional fixes PV meter energy comes from the quality-aware conversion. Calibration rows are binned by interval start with end-stamped rows. The fit covers only the period every PV meter covers and stays inside its lookback. The meter resolution is judged only where every PV meter reports. Snow feedback derives its window from the same slot window helper and shares one PV meter read per forecast with calibration. Window bounds and pandas timestamps are converted in one place, always to UTC; fit days are counted in the configured zone. Calibration tests write meters in bulk, stamp them in the configured zone and check every azimuth bin; snow feedback has its own slot window test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6fad58655f
commit
2bfb6eafab
@@ -418,7 +418,9 @@ async def test_calibration_skips_intervals_with_possible_snow(snow_instance, cap
|
||||
}
|
||||
)
|
||||
raw = await snow_instance._forecast_frame(fixture["openmeteo"], calibrate=False)
|
||||
calibration = await snow_instance._fit_calibration(raw)
|
||||
calibration = await snow_instance._fit_calibration(
|
||||
raw, await snow_instance._pv_measurement_window()
|
||||
)
|
||||
assert calibration is not None
|
||||
factors[snow_enabled] = calibration[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user