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

KeyError: "No variable named 'ag_cloud_mask' #117

Open
robmarkcole opened this issue Nov 6, 2024 · 1 comment
Open

KeyError: "No variable named 'ag_cloud_mask' #117

robmarkcole opened this issue Nov 6, 2024 · 1 comment

Comments

@robmarkcole
Copy link
Collaborator

robmarkcole commented Nov 6, 2024

Not sure if this is a bug, or incorrect use. I followed the approach on https://earthdaily.github.io/earthdaily-python-client/_auto_examples/first_steps_create_datacube.html (Create datacube in three steps):

@robmarkcole
Copy link
Collaborator Author

robmarkcole commented Nov 6, 2024

I updated the approach to use the ag_cloud_mask but get an error:

datacube = earthdaily.earthdatastore.datacube(
    filtered_items, 
    intersects=gdf, 
    assets=["blue", "green", "red", "nir", "scl"],
    resolution=RESOLUTION,
    crs="EPSG:3857",
    rescale=rescale,
    mask_with = "ag_cloud_mask",
).load()

datacube = earthdaily.earthdatastore.mask.Mask(datacube, intersects=gdf).ag_cloud_mask(
    mask_statistics=True
)

KeyError: "No variable named 'ag_cloud_mask'. Variables on the dataset include ['blue', 'y', 'x', 'time', 'spatial_ref', 'green', 'red', 'nir', 'scl']"

@robmarkcole robmarkcole changed the title Cloud mask not applied KeyError: "No variable named 'ag_cloud_mask' Nov 6, 2024
@nkarasiak nkarasiak reopened this Nov 13, 2024
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

2 participants