21
21
NODATA = 255
22
22
23
23
24
- def image_groups (l34 , urban , cultivated , woody , pv_pc_50 , water_frequency , water_season ):
24
+ def image_groups (
25
+ l34 , urban , cultivated , woody , pv_pc_50 , water_frequency , water_season
26
+ ):
25
27
26
28
tuples = [
27
29
(np .datetime64 ("2000-01-01T00" ), np .datetime64 ("2000-01-01" )),
@@ -63,7 +65,7 @@ def image_groups(l34, urban, cultivated, woody, pv_pc_50, water_frequency, water
63
65
dims = ("spec" , "y" , "x" ),
64
66
attrs = {"nodata" : 255 },
65
67
),
66
- "water_season" :xr .DataArray (
68
+ "water_season" : xr .DataArray (
67
69
da .from_array (water_season , chunks = (1 , - 1 , - 1 )),
68
70
dims = ("spec" , "y" , "x" ),
69
71
attrs = {"nodata" : 255 },
@@ -148,7 +150,7 @@ def test_ntv_classes_woody_herbaceous():
148
150
],
149
151
dtype = "uint8" ,
150
152
)
151
-
153
+
152
154
water_season = np .array (
153
155
[
154
156
[
@@ -161,7 +163,9 @@ def test_ntv_classes_woody_herbaceous():
161
163
dtype = "uint8" ,
162
164
)
163
165
164
- xx = image_groups (l34 , urban , cultivated , woody , pv_pc_50 , water_frequency , water_season )
166
+ xx = image_groups (
167
+ l34 , urban , cultivated , woody , pv_pc_50 , water_frequency , water_season
168
+ )
165
169
166
170
stats_l4 = StatsLccsLevel4 ()
167
171
level3 = lc_level3 .lc_level3 (xx )
@@ -245,7 +249,6 @@ def test_ntv_herbaceous_seasonal_water_veg_cover():
245
249
]
246
250
],
247
251
dtype = "uint8" ,
248
-
249
252
)
250
253
water_frequency = np .array (
251
254
[
@@ -258,7 +261,7 @@ def test_ntv_herbaceous_seasonal_water_veg_cover():
258
261
],
259
262
dtype = "uint8" ,
260
263
)
261
-
264
+
262
265
water_season = np .array (
263
266
[
264
267
[
@@ -271,7 +274,9 @@ def test_ntv_herbaceous_seasonal_water_veg_cover():
271
274
dtype = "uint8" ,
272
275
)
273
276
274
- xx = image_groups (l34 , urban , cultivated , woody , pv_pc_50 , water_frequency , water_season )
277
+ xx = image_groups (
278
+ l34 , urban , cultivated , woody , pv_pc_50 , water_frequency , water_season
279
+ )
275
280
276
281
stats_l4 = StatsLccsLevel4 ()
277
282
level3 = lc_level3 .lc_level3 (xx )
@@ -285,7 +290,7 @@ def test_ntv_herbaceous_seasonal_water_veg_cover():
285
290
l4_ctv_ntv_nav = l4_natural_aquatic .natural_auquatic_veg (
286
291
l4_ctv_ntv , veg_cover , xx .water_season
287
292
)
288
-
293
+
289
294
assert (l4_ctv_ntv_nav .compute () == expected_l4_ntv_classes ).all ()
290
295
291
296
@@ -356,7 +361,7 @@ def test_ntv_woody_seasonal_water_veg_cover():
356
361
],
357
362
dtype = "uint8" ,
358
363
)
359
-
364
+
360
365
water_frequency = np .array (
361
366
[
362
367
[
@@ -368,7 +373,7 @@ def test_ntv_woody_seasonal_water_veg_cover():
368
373
],
369
374
dtype = "uint8" ,
370
375
)
371
-
376
+
372
377
water_season = np .array (
373
378
[
374
379
[
@@ -380,7 +385,9 @@ def test_ntv_woody_seasonal_water_veg_cover():
380
385
],
381
386
dtype = "uint8" ,
382
387
)
383
- xx = image_groups (l34 , urban , cultivated , woody , pv_pc_50 , water_frequency , water_season )
388
+ xx = image_groups (
389
+ l34 , urban , cultivated , woody , pv_pc_50 , water_frequency , water_season
390
+ )
384
391
385
392
stats_l4 = StatsLccsLevel4 ()
386
393
level3 = lc_level3 .lc_level3 (xx )
0 commit comments