foo
This commit is contained in:
parent
be17f64aa2
commit
e3af4bf2f4
5 changed files with 333 additions and 32 deletions
|
|
@ -11,7 +11,7 @@ from rasterio.vrt import WarpedVRT
|
|||
from rasterio import shutil as rio_shutil
|
||||
|
||||
RESOLUTION_RATIO = 21
|
||||
# Centred temporal MA on S3 LR stack (METHODOLOGY §5.4.3); odd ≥3, or 1 to disable.
|
||||
# Centred temporal MA on S3 LR stack (thesis/Method.tex, sec:data_preparation); odd ≥3, or 1 to disable.
|
||||
S3_MOVING_AVERAGE_WINDOW_DAYS = 5
|
||||
|
||||
|
||||
|
|
@ -79,7 +79,9 @@ def _get_itb_base_dir(season, site_name, cleaning_strategy):
|
|||
|
||||
|
||||
def _compute_gcc_from_refl_array(blue, green, red):
|
||||
total = red.astype(np.float32) + green.astype(np.float32) + red.astype(np.float32)
|
||||
total = (
|
||||
blue.astype(np.float32) + green.astype(np.float32) + red.astype(np.float32)
|
||||
)
|
||||
mask = (total > 0) & np.isfinite(total)
|
||||
gcc = np.zeros_like(green, dtype=np.float32)
|
||||
gcc[mask] = green[mask].astype(np.float32) / total[mask]
|
||||
|
|
@ -90,8 +92,8 @@ def _link_dist_cloud_from_prepared(src_s2_dir, dst_s2_dir):
|
|||
dst_s2_dir.mkdir(parents=True, exist_ok=True)
|
||||
for src in src_s2_dir.glob("*DIST_CLOUD.tif"):
|
||||
dst = dst_s2_dir / src.name
|
||||
if dst.exists():
|
||||
continue
|
||||
if dst.is_symlink() or dst.exists():
|
||||
dst.unlink(missing_ok=True)
|
||||
try:
|
||||
dst.symlink_to(src.resolve())
|
||||
except OSError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue