diff --git a/4-fusion.py b/4-fusion.py index 5950c44..cdcc4bc 100644 --- a/4-fusion.py +++ b/4-fusion.py @@ -117,11 +117,7 @@ def compute_gcc_from_refl(refl_dir: Path, gcc_dir: Path) -> None: """Derive GCC from ``REFL_YYYYMMDD.tif`` files (BtI fusion output). Reads every ``REFL_*.tif`` and writes a co-located single-band - ``GCC_YYYYMMDD.tif``. Pixels where any reflectance band is negative (which - can arise from EFAST's temporal correction) are written as NaN; the GCC - ratio is undefined there because the denominator B+G+R is near-zero or - negative due to band cancellation. All-zero pixels (cloud mask) remain - zero. + ``GCC_YYYYMMDD.tif``. Zero pixels remain zero. """ gcc_dir.mkdir(parents=True, exist_ok=True) for src_path in sorted(refl_dir.glob("REFL_*.tif")): @@ -132,10 +128,9 @@ def compute_gcc_from_refl(refl_dir: Path, gcc_dir: Path) -> None: b, g, r = src.read(1), src.read(2), src.read(3) profile = src.profile total = b + g + r - invalid = (b < 0) | (g < 0) | (r < 0) - gcc = np.where(invalid, np.nan, g / (total + 1e-10)) - gcc[total == 0] = np.nan - profile.update(count=1, dtype="float32") + gcc = g / (total + 1e-10) + gcc[total == 0] = 0 + profile.update(count=1) with rasterio.open(out_path, "w", **profile) as dst: dst.write(gcc[np.newaxis].astype("float32")) diff --git a/index.html b/index.html index 13fa34f..7929b3b 100644 --- a/index.html +++ b/index.html @@ -123,15 +123,6 @@ body { margin: 0; font: 13px/1.4 system-ui, sans-serif; background: #f5f5f5; col } #worldMapBtn:hover { background: #3a5278; } -#repoLink { - margin-left: auto; - font-size: 12px; - color: #7eb8f7; - text-decoration: none; - white-space: nowrap; -} -#repoLink:hover { color: #9ecef8; text-decoration: underline; } - /* worldwide map overlay */ #worldOverlay { display: none; position: fixed; inset: 0; z-index: 3000; @@ -167,7 +158,6 @@ body { margin: 0; font: 13px/1.4 system-ui, sans-serif; background: #f5f5f5; col - Source code