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

i.landsat.acca: add test cases #5270

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

codersmiti
Copy link
Contributor

This PR introduces a test suite for the i.landsat.acca GRASS GIS module, covering a range of scenarios, including cloud mask creation, cloud shadow detection, and the effect of different input parameters on cloud identification. The test cases ensure correct functionality across scenarios like thermal correlation, binary output validation, and the impact of the b45ratio threshold.

Key updates in this PR include:

  • Functionality: Validate cloud mask creation using i.landsat.acca and ensure proper cloud detection.

  • Edge Cases: Test cloud shadow detection and the impact of the b45ratio parameter on cloud detection.

  • Cloud Mask Validations: Ensure the cloud mask is binary (with only two unique values) and accurately represents cloud and non-cloud pixels, while validating that cloud pixels have higher thermal values than non-cloud pixels.

Test Case Additions:

  • Basic Functionality:

    • Verify creation and existence of the cloud mask output.
    • Test cloud mask creation for different input data.
  • Edge Cases:

    • Cloud Shadow Detection: Test cloud shadow detection by ensure that shadow pixels are
      detected, and the output is valid.

    • b45ratio Parameter Effect: Test the impact of the b45ratio parameter on cloud detection by adjusting it. Ensure that a higher b45ratio threshold results in fewer detected cloud pixels, indicating a more conservative approach to cloud identification.

  • Cloud and Thermal Correlation Validation:

    • Binary Cloud Mask: Verify that the cloud mask output is binary, containing only two unique values (typically 0 for non-clouds and 1 for clouds), ensuring correct classification.
    • Thermal Band Correlation: Validate the correlation between detected cloud pixels and thermal band values. Ensure that cloud pixels have significantly higher thermal values than non-cloud pixels, indicating proper cloud detection based on temperature

@github-actions github-actions bot added Python Related code is in Python module imagery tests Related to Test Suite labels Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imagery module Python Related code is in Python tests Related to Test Suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant