Skip to content

Commit

Permalink
Fix foolish refactoring mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
omad committed Nov 5, 2021
1 parent 2dd4314 commit bbb232b
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions datacube_alchemist/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,27 @@ def compute(self, data) -> xr.Dataset:
# Filter Bands
# Filter bad S2 BE data
# Filter bad S2 NRT data
filter_bands = [
"s2be_blue",
"s2be_red",
"s2be_nir_1",
"s2be_swir_2",
filter_ard_bands = (
"nbart_blue",
"nbart_red",
"nbart_nir_1",
"nbart_swir_2",
]
for band in filter_bands:
)

for band in filter_ard_bands:
data[band] = (
data[band]
.where(gm_data[band] != -999, numpy.NaN)
.where(numpy.isfinite(gm_data[band]), numpy.NaN)
)

filter_gm_bands = (
"s2be_blue",
"s2be_red",
"s2be_nir_1",
"s2be_swir_2",
)
for band in filter_gm_bands:
gm_data[band] = (
gm_data[band]
.where(gm_data[band] != -999, numpy.NaN)
Expand Down

0 comments on commit bbb232b

Please sign in to comment.