Page 1 of 1

Proper HLS data averaging for a desert

Posted: Wed Nov 12, 2025 2:52 am America/New_York
by amigdala999
Hi,
I would like to get an average image of HLS S30 granule for a certain month. It must contaiin a minimal possible SR, so during the averaging I choose a pixel with a minimal value. For that I'm fetching a monthly B02-B04 granules across different years. Then I'm averaging this COG files considering their FMask to filter some pixel types. The FMask values of averaged pixels is OR'ed. After that I build a rgb thumbnail from averaged B02-B04 result with an official python script.

My first results had some color artifact for a desert areas (image1 attached, this is a tile 37RDM averaged from 109 granules).
I believe this is because I filtered only "Cirrus | Cloud | AdjCloud | ShadowCloud | Water" pixels and left Aerosol* ones. And pixels marked as Aerosol* often contain a big negative values. At least AerosolHigh for sure.

So I deside to filer an Aerosol* pixels too. And end up with nothing to average, bcs all pixels for this desert region were marked with Aerosol*.

Then I exclude only AerosolHigh (0b11000000) pixels and leave AerosolLow and AerosolModerate as is. This produces an image which is only a little better.

And at the end I additionally excluded all pixels with values < 0 from averaging. And got image3, which is a much better. But it still contains a few bad (pink) pixels in it.

I also can see some bad pixels if their valies are really averaged (not chosen by min), but a fewer (image5).

The question is: could there be any recommendation on filtering outlier aerosol pixels values other than throwing out negative values?

Re: Proper HLS data averaging for a desert

Posted: Fri Nov 14, 2025 9:17 am America/New_York
by LP DAAC - dgolon
Hello @amigdala999 Apologies for the delay in response. We are looking into your question. In your post you mentioned you attached pictures but we do not see any. Please try attaching them again or email them to us at lpdaac@usgs.gov and reference this post. Thanks -- Danielle

Re: Proper HLS data averaging for a desert

Posted: Tue Nov 18, 2025 4:21 pm America/New_York
by LP DAAC - dgolon
Hi @amigdala999 Please ensure you are using the quality flag to properly filter out the data. It sounds like you are doing so, and if so then that is how the quality of the data is and filtering by quality will filter down to a smaller amount of data. However, we are happy to review the quality portion of your workflow for you, if you are interested, to ensure it is not overly filtering data out by accident. If interested, please email it to us at lpdaac@usgs.gov. Thanks --Danielle