Skip to content

During multiscale calculation no data values are not masked #246

Closed

Description

@shollendEODC

During coarsening, no data values at the border of tiles are included in the resampling operation (s2_multiscale.py/ def _coarsen_variable(...) in line 133)

Just add some filtering and masking during the casting of arrays in the pyramid calculation processes

Activity

  1. added a commit that references this issue on Sep 11, 2026
  2. emmanuelmathot commented on Sep 28, 2026

    @emmanuelmathot
    Contributor

    Closing: nodata is masked when the Sentinel-2 overviews are averaged (masked mean since #247). #287 extends this to decoded input and rounds the packed values.

  3. emmanuelmathot commented on Sep 28, 2026

    @emmanuelmathot
    Contributor

    Reopening: my closing comment was wrong. On main, _coarsen_variable reads the fill value with if not fill_value:, so the Zarr v3 CPM products (nodata fill_value: 0, no _FillValue in the encoding) fall back to an unmasked mean: nodata is still included at the tile borders. #287 (#281) fixes it: it checks fill_value is None, averages decoded values with NaN skipped, rounds packed integers, and decodes finer bands before injection. This issue closes when #287 merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions