From 989b64cc2fb78b205baec73fc9d3e356d1b256f5 Mon Sep 17 00:00:00 2001 From: Emma Ai Date: Tue, 28 Nov 2023 00:47:37 +0000 Subject: [PATCH] set resampling to default bilinear --- odc/stats/plugins/gm.py | 3 --- tests/test_gm_ls.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/odc/stats/plugins/gm.py b/odc/stats/plugins/gm.py index 30981a67..fd6c0135 100644 --- a/odc/stats/plugins/gm.py +++ b/odc/stats/plugins/gm.py @@ -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, ): @@ -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 @@ -54,7 +52,6 @@ def __init__( super().__init__( input_bands=input_bands, basis=basis_band or self.bands[0], - resampling=self.resampling, **kwargs, ) diff --git a/tests/test_gm_ls.py b/tests/test_gm_ls.py index 0f1dfe43..4b65c3b7 100644 --- a/tests/test_gm_ls.py +++ b/tests/test_gm_ls.py @@ -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):