Skip to content

Commit fb564de

Browse files
committed
Apply offset correctly
1 parent 2635df5 commit fb564de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

efast/s2_processing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ def extract_mask_s2_bands(
114114
offset = int(offsets.get(band_id, 0))
115115
with rasterio.open(band_path) as src:
116116
raw_data = src.read(1).astype("int16")
117-
data = (raw_data - offset) / 10000
117+
#data = (raw_data - offset) / 10000
118+
# Offset is negative, so this must be a +! 2025-09-26 HN
119+
data = (raw_data + offset) / 10000
118120
data[data < 0] = 0
119121
data[mask] = 0
120122
s2_image[i] = data

0 commit comments

Comments
 (0)