Mosaic of C2RCC output flag issue

Hi all,
I have been using snap gpt to mosaic daily L2 olci data derived by a few atmospheric correction algorithms. I believe I have an issue when mosaicking C2RCC output L2 files.
The issue is I use the following condition in the xml file:

        <conditions>
          <condition>
            <name>valid_PE</name>
            <expression>c2rcc_flags.Valid_PE</expression>
            <output>true</output>
          </condition>
        </conditions>

but the output mosaiced result is not masked out. With other AC’s (e.g., POLYMER) I am able to set to valid pixel value and those are removed. for general reference, I use python to create file lists to mosaic and then use subprocess.run to run the gpt with the xml file.
I couldn’t find an answer digging through the forum so hope someone might have insight.
attached is my xml file.
Thank you!
mosaic_c2rcc_PB.xml (3.1 KB)

Does it work for other c2rcc flags?
Maybe this happens because it is the highest bit of the flags. Maybe this is not properly handled.
You can try a different expression. It tests for the same flag:
bit_set(c2rcc_flags, 31)


EOMasters_icon_60 Marco from EOMasters - Mastering Earth Observation