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

feat: apply ESA pixel level quality mask for lost or degraded packets #167

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

ceholden
Copy link
Collaborator

This PR addresses #155

In NASA-IMPACT/hls-utilities#15 we added a CLI utility to apply ESA's pixel level mask to mask pixels that were affected by lost or degraded packets during transmission to ground receiving stations. This utility modifies the L1C granule imagery in place for any band affected by the issue.

The script is intended to be very lazy,

  • It first checks a metadata file to identify if any bands used by HLS product are affected and exits early if no bands are affected by any potential quality issue.
  • If a band is affected we first check to see if the band's mask is affected by the 2 conditions we're concerned about (lost or degraded packets). The mask image is a bitmask for 8 possible conditions, and we exit early if none of the pixels are affected by the lost or degraded packet issue.
  • The script will only perform the relatively expensive process of masking and rewriting the JP2 images if these two checks do not exit early

I put this masking step ahead of running Fmask so that we can get a more accurate assessment of if there are any valid and non-(cloudy | shadowed | etc) pixels in the image.

@ceholden
Copy link
Collaborator Author

Waiting on the prod release of the HLS-VI product before we can merge this into the main branch

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

Successfully merging this pull request may close these issues.

2 participants