Skip to content

Commit

Permalink
Fixed a few errors after rewriting the logic on aquatic vegetation
Browse files Browse the repository at this point in the history
  • Loading branch information
tebadi committed Nov 15, 2024
1 parent 02de18c commit bd278c7
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 441 deletions.
17 changes: 8 additions & 9 deletions odc/stats/plugins/l34_utils/l4_natural_aquatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ def natural_auquatic_veg(l4, veg_cover, water_seasonality):
dtype="uint8",
)

res = expr_eval(
"where((a!=124)|(a!=125), 255, a)",
{
"a": res,
},
name="mark_nodata",
dtype="uint8",
)
# res = expr_eval(
# "where((a!=124)|(a!=125), 255, a)",
# {
# "a": res,
# },
# name="mark_nodata",
# dtype="uint8",
# )

# mark water season
# use some value not used in final class
Expand Down Expand Up @@ -120,7 +120,6 @@ def natural_auquatic_veg(l4, veg_cover, water_seasonality):
name="mark_final",
dtype="uint8",
)

#########################################
res = expr_eval(
"where((a==254)&(b==12), 67, a)",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lc_l4_natural_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def test_ns():
xx, stats_l4.water_seasonality_threshold
)
l4_ctv_ntv_nav = l4_natural_aquatic.natural_auquatic_veg(
l4_ctv_ntv, lifeform, veg_cover, water_seasonality
l4_ctv_ntv, veg_cover, water_seasonality
)

# Bare gradation
Expand Down
Loading

0 comments on commit bd278c7

Please sign in to comment.