Skip to content

tests: invalid value encountered in divide #220

@pjonsson

Description

@pjonsson

Here's an excerpt of the test logs:

2025-07-25 20:36:40 [info     ] Task commencing                task=AlchemistTask(dataset=Dataset <id=7e96b76a-6b02-4427-9a1d-3c9104f2db96 product=ga_ls7e_ard_3 location=s3://dea-public-data/baseline/ga_ls7e_ard_3/102/071/2020/09/09/ga_ls7e_ard_3-1-0_102071_2020-09-09_final.stac-item.json>, settings=AlchemistSettings(specification=Specification(measurements=['nbart_blue', 'nbart_green', 'nbart_red', 'nbart_nir', 'nbart_swir_1', 'nbart_swir_2', 'oa_fmask'], transform='wofs.virtualproduct.WOfSClassifier', transform_url='https://github.com/GeoscienceAustralia/wofs/', product=None, products=['ga_ls5t_ard_3', 'ga_ls7e_ard_3', 'ga_ls8c_ard_3'], measurement_renames={'oa_fmask': 'fmask'}, transform_args={'dsm_path': 'https://dea-public-data.s3-ap-southeast-2.amazonaws.com/projects/elevation/ga_srtm_dem1sv1_0/dem1sv1_0.tif'}, transform_args_per_product=None, resampling=None, override_product_family='ard', basis='nbart_green', aws_unsigned=True), output=OutputSettings(location='/tmp/alchemist', write_data_settings={'overview_resampling': <Resampling.mode: 6>}, nodata=1, preview_image=None, preview_image_singleband={'measurement': 'water', 'lookup_table': {0: [150, 150, 110], 1: [0, 0, 0], 16: [119, 104, 87], 32: [89, 88, 86], 64: [216, 215, 214], 80: [242, 220, 180], 128: [79, 129, 189], 160: [51, 82, 119], 192: [186, 211, 242]}}, metadata={'product_family': 'wo', 'producer': 'ga.gov.au', 'dataset_version': '1.6.0', 'collection_number': '3', 'naming_conventions': 'dea_c3'}, properties={'dea:dataset_maturity': 'interim'}, reference_source_dataset=True, write_stac=True, inherit_geometry=True, explorer_url='https://explorer.dev.dea.ga.gov.au/'), processing=ProcessingSettings(dask_chunks={'x': -1, 'y': 4096}, dask_client={})))
/usr/local/lib/python3.10/dist-packages/wofs/__init__.py:1: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import get_distribution, DistributionNotFound
2025-07-25 20:36:45 [info     ] Data loaded                    task=UUID('7e96b76a-6b02-4427-9a1d-3c9104f2db96')
/usr/local/lib/python3.10/dist-packages/wofs/classifier.py:81: RuntimeWarning: divide by zero encountered in divide
  c = (a - b) / (a + b)
/usr/local/lib/python3.10/dist-packages/wofs/terrain.py:114: RuntimeWarning: overflow encountered in multiply
  norm_len = numpy.sqrt((xgrad * xgrad) + (ygrad * ygrad) + 1.0)
/usr/local/lib/python3.10/dist-packages/wofs/terrain.py:117: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
  x, y = tile.dims.keys()
/usr/local/lib/python3.10/dist-packages/wofs/terrain.py:120: RuntimeWarning: invalid value encountered in divide

The last line prints invalid value encountered in divide, which I'm guessing is a division by NaN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions