Skip to content

Releases and windows

egms_client.releases

What a release covers, how old it is, and whether the archive published a new one.

A release is named by years ("2020-2025"), but the name is not the window. The 2020-2025 Ortho L3 series start on 9 December 2020 and end on 19 November 2025: the first eleven months of 2020 are not in it. A model that reads the name as 1 January 2020 - 31 December 2025 puts EGMS data before landslides it never saw.

:data:WINDOWS holds the windows read from real files, with the file each came from. For a release or level not read yet, :func:window knows only the years and says so (exact=False, no dates): not measured is not zero.

The archive publishes a new release about once a year, and the windows grow (2020-2024, then 2020-2025). :data:KNOWN_RELEASES is what this version of the library has seen; :func:new_releases tells what the archive lists beyond it (egms releases --check, and the weekly live test).

Window dataclass

The acquisitions a release holds, for one level.

first and last are the first and last acquisition dates when known (exact); otherwise None, and only the years of the name are known. source is the file the dates were read from.

text

text() -> str

For people and agents: "2020-12-09 to 2025-11-19" or what is not known.

window

window(release: str, level: str = 'L3') -> Window

The window of a release for a level: exact if read from a file, else the years only.

window_of

window_of(frame: Any, release: str, level: str, source: str = '') -> Window

The exact window of a table read with tables.read_csv: its first and last date.

age_days

age_days(w: Window, today: date) -> int | None

Days from the last acquisition to today; None if the last date is not known.

covers

covers(w: Window, day: date) -> bool | None

Whether a day falls inside the window; None when the window is not exact.

new_releases

new_releases(published: list[str]) -> list[str]

The releases the archive lists that this version of the library has not seen.