Cloud mask detection and further calculation

Hi,
I would like to calculate how many times is some area under cloud for some defined period. My basic idea is to make cloud masks and then do overlay of many layers and some raster algebra. I have cloud mask calculated by Idepix and my problem is I would like to have a layer with just two values - 0 for area without cloud and 1 for cloud (or other classification - for raster analyses) , but cloud mask does not have these two discrete values but range from 254.004 (shown as no cloud) to 255 (shown as cloud) in my case.

My question are if I can classify this cloud mask as two discrete values or if there are other and betetr options how to do that - other tools/approaches. I want just layer with these two values that I could export to QGIS/GRASS and make some raster analysis there. I already tried to export this idepix cloud mask to QGIS and classify it there but result is all the time just black image. My last question is if it is possible to do all this procces in SNAP, or I should make cloud mask there and then do other steps in QGIS. Thank you.

After running IDEPIX you can create your own band based on the flags IDEPIX generates.
Use the Band Math and the expression

F_CLOUD ? 1 : 0

Or may be you use

F_CLOUD or F_CLOUD_BUFFER or F_CIRRUS_SURE ? 1 : 0

It depends on your and what fits your use case.
The you can create a subset of your product and export this single band.

1 Like

Hello, I am new to this, I already did the processing with idepix, and to apply the expression of Band Math I would like to know how the expression looks in the box of Band Math, it would be good a screenshot

thank you

like this?

This produces a raster which contains 1 wherever one of the cloud flags is true and 0 at all other pixels.

1 Like

Thank you very much, it has been very useful