sentinel-hub / sentinel2-cloud-detector

Sentinel Hub Cloud Detector for Sentinel-2 images in Python
Creative Commons Attribution Share Alike 4.0 International
410 stars 87 forks source link

Fix for `get_mask_from_prob` to work with single-temporal features. #41

Closed batic closed 1 year ago

batic commented 1 year ago

The fix moves the check for is_single_temporal to corresponding functions (to compute cloud probabilities and consequent masks from the probabilities).

Additionally, the tests now include running both separate functions as well as one-in-all.

codecov-commenter commented 1 year ago

Codecov Report

Base: 92.78% // Head: 92.78% // No change to project coverage :thumbsup:

Coverage data is based on head (5381fba) compared to base (a0f8dc7). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #41 +/- ## ======================================= Coverage 92.78% 92.78% ======================================= Files 5 5 Lines 194 194 ======================================= Hits 180 180 Misses 14 14 ``` | [Impacted Files](https://codecov.io/gh/sentinel-hub/sentinel2-cloud-detector/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentinel-hub) | Coverage Δ | | |---|---|---| | [s2cloudless/cloud\_detector.py](https://codecov.io/gh/sentinel-hub/sentinel2-cloud-detector/pull/41/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentinel-hub#diff-czJjbG91ZGxlc3MvY2xvdWRfZGV0ZWN0b3IucHk=) | `98.30% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentinel-hub). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentinel-hub)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.