added reference png export

This commit is contained in:
2026-06-23 12:34:48 +03:00
parent 716fd0b07a
commit 02bbe83446
4 changed files with 141 additions and 0 deletions
+10
View File
@@ -411,5 +411,15 @@ class NpzStore(StoreApi):
"""Return directory for set kind and radar key."""
return self._root_dir / kind / radar_key
def preview_png_dir(self, kind: str, set_name: str, radar_key: str) -> Path:
"""Return directory for preview PNGs of one set/radar variant.
Lives under ``preview_png/`` inside the store so saved graphs sit next to
the data they describe, grouped by set name then radar variant. The set
name is operator-supplied, so it is sanitized; ``radar_key`` is already
filesystem-safe by construction.
"""
return self._root_dir / "preview_png" / kind / sanitize_path_component(set_name) / radar_key
__all__ = ["NpzStore", "radar_key_from_config"]