@@ -319,7 +319,7 @@ def fc_wo_dataset():
319
319
def test_native_transform (fc_wo_dataset , bits ):
320
320
xx = fc_wo_dataset .copy ()
321
321
xx ["water" ] = da .bitwise_or (xx ["water" ], bits )
322
- stats_veg = StatsVegCount ()
322
+ stats_veg = StatsVegCount (measurements = [ "veg_frequency" , "water_frequency" ] )
323
323
out_xx = stats_veg .native_transform (xx ).compute ()
324
324
325
325
expected_valid = (
@@ -349,7 +349,7 @@ def test_native_transform(fc_wo_dataset, bits):
349
349
350
350
351
351
def test_fusing (fc_wo_dataset ):
352
- stats_veg = StatsVegCount ()
352
+ stats_veg = StatsVegCount (measurements = [ "veg_frequency" , "water_frequency" ] )
353
353
xx = stats_veg .native_transform (fc_wo_dataset )
354
354
xx = xx .groupby ("solar_day" ).map (partial (StatsVegCount .fuser , None )).compute ()
355
355
valid_index = (
@@ -369,7 +369,7 @@ def test_fusing(fc_wo_dataset):
369
369
370
370
371
371
def test_veg_or_not (fc_wo_dataset ):
372
- stats_veg = StatsVegCount ()
372
+ stats_veg = StatsVegCount (measurements = [ "veg_frequency" , "water_frequency" ] )
373
373
xx = stats_veg .native_transform (fc_wo_dataset )
374
374
xx = xx .groupby ("solar_day" ).map (partial (StatsVegCount .fuser , None ))
375
375
yy = stats_veg ._veg_or_not (xx ).compute ()
@@ -386,7 +386,7 @@ def test_veg_or_not(fc_wo_dataset):
386
386
387
387
388
388
def test_water_or_not (fc_wo_dataset ):
389
- stats_veg = StatsVegCount ()
389
+ stats_veg = StatsVegCount (measurements = [ "veg_frequency" , "water_frequency" ] )
390
390
xx = stats_veg .native_transform (fc_wo_dataset )
391
391
xx = xx .groupby ("solar_day" ).map (partial (StatsVegCount .fuser , None ))
392
392
yy = stats_veg ._water_or_not (xx ).compute ()
@@ -403,7 +403,7 @@ def test_water_or_not(fc_wo_dataset):
403
403
404
404
405
405
def test_reduce (fc_wo_dataset ):
406
- stats_veg = StatsVegCount ()
406
+ stats_veg = StatsVegCount (measurements = [ "veg_frequency" , "water_frequency" ] )
407
407
xx = stats_veg .native_transform (fc_wo_dataset )
408
408
xx = xx .groupby ("solar_day" ).map (partial (StatsVegCount .fuser , None ))
409
409
xx = stats_veg .reduce (xx ).compute ()
@@ -437,7 +437,7 @@ def test_reduce(fc_wo_dataset):
437
437
438
438
439
439
def test_consecutive_month (consecutive_count ):
440
- stats_veg = StatsVegCount ()
440
+ stats_veg = StatsVegCount (measurements = [ "veg_frequency" , "water_frequency" ] )
441
441
xx = stats_veg ._max_consecutive_months (consecutive_count , 255 ).compute ()
442
442
expected_value = np .array (
443
443
[
0 commit comments