Skip to content

Commit

Permalink
set resampling to default bilinear
Browse files Browse the repository at this point in the history
  • Loading branch information
Emma Ai committed Nov 28, 2023
1 parent 1546899 commit 989b64c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions odc/stats/plugins/gm.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def __init__(
] = None,
basis_band=None,
aux_names: Dict[str, str] = None,
resampling: str = "nearest",
work_chunks: Tuple[int, int] = (400, 400),
**kwargs,
):
Expand All @@ -44,7 +43,6 @@ def __init__(
if nodata_classes is not None:
nodata_classes = tuple(nodata_classes)
self._nodata_classes = nodata_classes
self.resampling = resampling
input_bands = self.bands
if self._nodata_classes is not None:
# NOTE: this ends up loading Mask band twice, once to compute
Expand All @@ -54,7 +52,6 @@ def __init__(
super().__init__(
input_bands=input_bands,
basis=basis_band or self.bands[0],
resampling=self.resampling,
**kwargs,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_gm_ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def test_resampling(dataset):

dataset = dataset.copy()
stats_gmls = StatsGMLS(cloud_filters=mask_filters, nodata_classes=(-999,))
assert stats_gmls.resampling == "nearest"
assert stats_gmls.resampling == "bilinear"


def test_no_data_value(monkeypatch):
Expand Down

0 comments on commit 989b64c

Please sign in to comment.