There are several ways of doing it.
You can create copies of the rtoa bands where the cloudy pixels are set to NaN.
Use the Band Maths with an if-else statement.
The OC4ME and the C2RCC NN chlorophyll values are calculated in the L2 standard from EUMETSAT. Maybe you can download it from CODA and merge with the C2RCC product to have all reflectance from both ACs
Thanks, but I didnot do c2rcc now, this time I run S3 L1 data into icor after completion of process I opened band and seen strange value on land that could see in below images, now I need to give land value is nan, for how to do that?
What command I need to enter in bandmath to get Land NaN
The equation for the Band Maths. You can try: if quality_flags.land then NaN else Oa1
This way you get a new band.
As alternative you can open the properties of a band (right-click and select from the contect menu) and set as valid-pixel expression not quality_flags.land
In general I would recommend that you experiment with the Band Maths. This way you will learn most.
Thank you, I tried your command it give output land value as NaN… but Water pixel value are very strange like 80,78, but before bandmath water pixel look liked 0.0458 , 0.0589,
can we give NaN value from pixel based band math, because after running atmosphere correction all the land and cloud pixel value are same that value you can see previous image i shared Oa1
My view is If I give that pixel = NaN may be I will get land and cloud Value is NaN
One thing you cannot do in SNAP is to change the values of an existing band.
You can create a new one and change the values with the band maths.
You can then save/export the product.
After running ICOR there is no quality flag. Land ,cloud … here I have only 21 band iwith this band what expression need to apply to become land value NaN…
I have threshold value 10
i want to give the pixel value more than 10 =NaN
For this how to make expression in band math
Thank you, I created new mask by fixing (min 0 0a3 max10) the file created in the name of new mask-1 The given value covered in red colour, I fixed limit and now how to make set other value NaN?
The mask is just masking the values but does not change them.
As said earlier, to set them to NaN you need to create a new band by the Band Maths. There you can use the created mask in the condition. if mask_1 then NaN else Oa3
I also wonder why your values are between 0 and 10. After atmospheric correction, the reflectance values are usually between 0 and 1.
hello dears
Now I know create new mask, bandmath in SNAP GUI…But i need to learn this process by using spyder python script, can you anyone suggest link to learn how to create new mask using python script…
It depends on where it is your starting point. If you are importing one image .dim to Python, flags are coded, so you have to decode them first. If you save your mask as a band, you can read it with rasterio, or envi directly.
If you are using Python because you need to do batch processing of many files, you should consider the gpt BandMaths operator.
Python has a much larger user community than SNAP, so you will get the most expert help in Python forums. For starters, however, you should investigate numpy masked arrays.