Commit 40c643b6 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed issue #74 (Small holes in L2C products).

parent 68c9bad1
......@@ -958,8 +958,15 @@ class AtmCorr(object):
oF_refl, oZ_refl, oS_refl = get_outFillZeroSaturated(inObj.arr.dtype)
surf_refl = np.dstack((self.results.data_ac[bandN] for bandN in ac_bandNs))
surf_refl *= CFG.scale_factor_BOARef # scale using scale factor (output is float16)
# FIXME really set AC nodata values to GMS outZero?
surf_refl[nodata] = oZ_refl # overwrite AC nodata values with GMS outZero
# set AC nodata values to GMS outFill
# NOTE: AC nodata contains a pixel mask where at least one band is no data
# => Setting these pixels to outZero would also reduce pixel values of surrounding pixels in
# spatial homogenization (because resampling only ignores -9999).
# It would be possible to generate a zero-data mask here for each subsystem and apply it after
# spatial homogenization. Alternatively zero-data pixels could be interpolated spectrally or
# spatially within L1A processor (also see issue #74).
surf_refl[nodata] = oF_refl # overwrite AC nodata values with GMS outFill
# apply the original nodata mask (indicating background values)
surf_refl[np.array(inObj.mask_nodata).astype(np.int8) == 0] = oF_refl
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment