Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in dc.load(): Error not raised when using resampling with a dictionary containing incorrect band names. #1700

Open
GL-S opened this issue Jan 15, 2025 · 0 comments

Comments

@GL-S
Copy link

GL-S commented Jan 15, 2025

Expected behaviour

When using "resampling" in dc.load() with a dictionary containing the methods for different bands, an error should be raised if a non-existent band name is entered.

Actual behaviour

An error is not raised if a non-existing band name is entered. Maybe the non-existing band is just ignored.
This could create issues when writing typos without realising it.

Steps to reproduce the behaviour

import datacube
dc = datacube.Datacube(app="04_Loading_data")
ds_customresampling = dc.load(product="ga_ls8cls9c_gm_cyear_3",
                              x=(153.3, 153.4),
                              y=(-27.5, -27.6),
                              time=("2015-01-01", "2015-12-31"),
                              output_crs="EPSG:32756",
                              resolution=(-250, 250),
                              resampling={"band_with_typo": "nearest", "*": "average"})
ds_customresampling

Environment information

datacube version 1.8.19

bug noticed when running the Beginners_guide notebook 04_Loading_data.ipynb

bug dcload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant