Improved single sites metrics calculation.
This commit is contained in:
parent
6b7395b617
commit
d7b18baf2e
2 changed files with 18 additions and 10 deletions
|
|
@ -1,11 +1,9 @@
|
|||
"""Pipeline wrapper: run steps 1 → 2 → 3 → 4 → 5.
|
||||
|
||||
Steps 1 and 2 run once for the whole year (skipped when their output already
|
||||
exists). Steps 3 and 4 run site-by-site for every PASS site from
|
||||
``data/phenocam_screening/{year}.json``; a site is skipped when
|
||||
``data/metrics/{year}/{site}/metrics.json`` already exists. Step 5 always
|
||||
runs once at the end without ``--site`` so that ``manifest.json`` is written
|
||||
with all processed sites (not just the last one).
|
||||
exists). Steps 3–5 run site-by-site for every PASS site from
|
||||
``data/phenocam_screening/{year}.json``; a site is skipped entirely when
|
||||
``data/metrics/{year}/{site}/metrics.json`` already exists.
|
||||
|
||||
Any failure stops the run immediately. Fix the issue and re-run — completed
|
||||
steps and sites are skipped automatically.
|
||||
|
|
@ -13,7 +11,7 @@ steps and sites are skipped automatically.
|
|||
CLI:
|
||||
|
||||
- ``--evaluation-year`` (default 2025)
|
||||
- ``--site`` single site to run steps 3–4 for (default: all PASS sites)
|
||||
- ``--site`` single site to run steps 3–5 for (default: all PASS sites)
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -38,6 +36,7 @@ GLOBAL_STEPS: list[tuple[str, Path]] = [
|
|||
PER_SITE_STEPS = [
|
||||
"3-sentinel-data.py",
|
||||
"4-fusion.py",
|
||||
"5-metrics.py",
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -101,7 +100,7 @@ def main(argv: list[str] | None = None) -> int:
|
|||
f"[pipeline] {script} failed (exit {rc}); cannot continue"
|
||||
)
|
||||
|
||||
# --- Per-site steps (steps 3–5) ---
|
||||
# --- Per-site steps (steps 3, 4, 5) ---
|
||||
sites = _load_pass_sites(year)
|
||||
if args.site:
|
||||
if args.site not in sites:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue