foo
This commit is contained in:
parent
be17f64aa2
commit
e3af4bf2f4
5 changed files with 333 additions and 32 deletions
|
|
@ -7,11 +7,8 @@ import json
|
|||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
from phenology_timesat import (
|
||||
build_yraw_three_years,
|
||||
phenocam_phenology_path,
|
||||
run_timesat_phenology_from_yraw,
|
||||
)
|
||||
from fusion_phenology import timesat_transitions_from_by_date
|
||||
from phenology_timesat import phenocam_phenology_path
|
||||
|
||||
from gap_validation.batch_spatial import (
|
||||
PRIMARY_SEASON,
|
||||
|
|
@ -35,9 +32,7 @@ def _day_offset(iso_a: str | None, iso_b: str | None) -> int | None:
|
|||
|
||||
|
||||
def _timesat_transitions(by_date: dict[str, float], season: int) -> dict[str, str | None]:
|
||||
y1, y2, y3 = season - 1, season, season + 1
|
||||
yraw, _mode = build_yraw_three_years(by_date, y1, y2, y3)
|
||||
out = run_timesat_phenology_from_yraw(yraw, (y1, y2, y3))
|
||||
out = timesat_transitions_from_by_date(by_date, season)
|
||||
return {
|
||||
"green_up": out.get("green_up_50pct_date"),
|
||||
"green_down": out.get("green_down_50pct_date"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue