Quality masks are all empty for Sentinel-2

Hello,
I noticed that the MSK_QUALIT_B*.jp files contain only zero values.

I’ve checked several products, L1C and L2A from 2023 and 2024. All the same. All values are zero.
The files shall contain no-data information. I found pixels which are no-data, but they are not marked. For example, pixels outside of the swath and also often some specific pixels in band B08.

Also, in the documentation it is said

L1C masks main file types (TTTTTTTTTT) are in the and listed again hereafter:
MSK_QUALIT gathers the following masks:

  1. MSK_CLOLOW (Coarse cloud mask files)
  2. MSK_TECQUA (Technical quality mask)
  3. MSK_DEFECT (Radiometric quality mask)
  4. MSK_SATURA (Radiometric Saturation mask)
  5. MSK_NODATA (Radiometric No Data mask)

But the jp2 image has 8 bands and not 5.

Can someone clarify this?

Maybe @Jan @Chenocq?

I know this should be posted in the CDSE forum. I tried but I always get an error message. And no one answered my comment yet.

Hi @Marco_EOM Marco,
I’m not involved in the day to day of S2 anymore, sadly. But I’ve raised it to the Operators at MPC. Which version of SNAP are you using?

Cheers

Jan

1 Like

Hi @Marco_EOM
I was able to make a post on the CDSE page.[STEP Forum] Quality masks are all empty for Sentinel-2 - Sentinel-2 - Copernicus Data Space Ecosystem | Community forum

If you have some specific filenames, that would make life easier for them.
Cheers

Jan

1 Like

Thanks Jan, I’m sorry to hear that you are not anymore involved int the daily operation of S2.
I think it is not a software issue. Because I see the same emptiness when opening the jp2 files in QGIS.

1 Like

I got a detailed answer in the CDSE Forum.

The data is correct. The part of the confusion was caused by an outdated/incorrect PSD.
The other part is caused by SNAP and that the no-data masks for Sentinel-2 are not correct.
Currently, values below or equal to zero are considered as no-data.
But they are actually valid.

So, the no-data mask should be created using the detector footprints and the no-data mask.

@diana_harosa @TomBlock @mengdahl

Would also be great if this could be fixed

I wonder why the issue [SNAP-3442] is closed now. Because the issue persists. The current implementation makes B1 unusable for some applications.

Yes, upscaling the masks might be necessary as said in the latest comment of the issue, but this is possible.

A much simpler solution would be to stay in the native resolution of B1 and ignore the up sampled 20m data. For this I have added a pull-request.
[snap-3442] masks and reflectance data at native 60m of B1 by eomasters-repos · Pull Request #86 · senbox-org/optical-toolbox

You might like to also read my discussion with the opt-mpc.
Masks not at same resolution for B1 in L2A - Data Collections / Sentinel-2 - Copernicus Data Space Ecosystem | Community forum