Band Math Expression Error in Collocate

When I type in the equation [(S2-S1)/(M-S1)], it says there are no errors, however once I try to run it, I receive the error message attached. I tried to ‘reproject’ the NDVI images, and I still got the same error.

What does this error mean/how can I fix it?

Please list all processing steps you have applied to the product until this error occurred.

I opened up the three NDVI images I wanted to use on SNAP. Then I clicked Raster>GeometricOperations>Collocation. I selected one NDVI as my ‘master function’ and the other two as ‘slave functions’. The collocate image was produced. I then right clicked to Band Maths, and then selected Edit Expression. I typed in my equation, to which it said no errors, and tried to run it. It keeps giving me the error message I attached.

Did you produce the NDVI images yourself? What is their file format?

Yes I did. Their file format is listed as _ndvi.

The problem is that SNAP expects masks/flags attached to the NDVI product, but cannot find them. They should actually be stored as part of the BEAM DIMAP format.

Can you please check in the band properties (after collocation) if there are “valid pixel expressions”?

Sorry, how do I check for valid pixel expressions?

I tried to make the collocate from the BEAMP DIMAP format, and I then got this error message. The image that has the error is an L1C, whereas the other two are L2A-- the Sen2Cor Processor to reformat the L1C image to L2A also isn’t working so I’m using the L1C images as is. Could this be why it isn’t working-- because they’re different image formats?

right click on each collocted band and select Properties

grafik

Your second message confuses me. Subset, another subset, reproject… Seems to be a different pre-processing and a different error. I am now trying to reproduce your first problen with the “Undefined symbol…” error first.

When I right click on properties, I don’t see the valid pixel expression option…

please right-click on the bands not on the product.

Oh- sorry about that! When I selected, the valid pixel expression box was blank for all 3 of them.

This is what I did:

  1. Download two S2 products (same tile) and extract them
  2. Apply S2 Resampling to bring the product into a common resolution
  3. Create a subset for each (same area)*
  4. Perfom the NDVI operator
  5. Collocate both NDVI products (get the same error, I don’t understand it)
  6. Alternative: Use Create Stack (Radar Coregistration > Stack Tools), select Product Geolocation instead of Orbit in the second tab

*whenever you create a subset you have to make sure that it is correctly written and that all bands are correctly transferred into the subsequent product. Sometimes, SNAP “loses” some of the bands during S2 subsetting.

NDVI images

Collocation

Collocation error message

grafik

Stack

grafik

Result

Success! Thank you so much!

Sorry-- is this method a ‘radar’ process for Sentinel-1? Will it still work if I’m hoping for an ‘optical’ data process for Sentinel-2?

Stacking can be applied to all products. The only difference is the estimation of the offset, based on orbit information (radar) or on geolocation (other).

Excuse me. My question is if I was made the process ‘collocation’ normally, however when I opened the S2, I have made without extract them files, and… that’s has worked. Is there any problem for the final product if I’ve jumped this step for example?
Best regards

https://forum.step.esa.int/t/band-math-expression-error-in-collocate/22818/13?u=usuariote

if the data looks alright to you and contains all information you need, you can go on.

Yeah you’re right. Thanks, I will comment you how I’m going with this.