sunAzimuthAngles and viewAzimuthMean

Dear SentinelHub team,

I wanted to reproduce the variables “viewAzimuthMean” and “sunAzimuthAngles” from Sentinelhub using Sentinel-2 L2A data.

According to the metadata file, sunAzimuthAngles seems to have 23 x 23 values while each value covers an area of 5000 x 5000 meters.
It is bigger than the general band extent and needs to get cropped in order to get calculated together with the bands as far as I understood.

According to here the variable viewAzimuthMean seems to have a resolution of 5000x5000m as well, so it also consists of 23 x 23 values. Looking at the metadata files, there is information on viewAzimuthMean for each band and for so called detector id’s. Thus, I do not know how one mean value per 5000x5000m pixel was calculated. Even if you would have taken the mean value of the Mean_Viewing_Incidence_Angle_List (see a random metadata file MTD_TL.xml), the question arises whether you took the mean over all bands and used that value for the whole Sentinel-2 tile.

I hope my question is not too complicated to understand.

Best regards,
Johannes

Hi Johannes,

values for viewAzimuthMean and viewZenithMean are calculated based on the values in <Viewing_Incidence_Angles_Grids> in MTD_TL.xml file. These are grids containing 23x23 values and each grid depends on band and detector (as you noticed yourself). The resulting viewAzimuthMean grid (analogically for viewZenithAngle) is calculated as follows:

  1. Grids for different detctors are simply “stitched” (note there are many NAN values in each grid).
  2. Mean azimuth value in each pixel is calculated as mean of azimuth values for all bands for this pixel.

Best, Anja

Hi Anja (@avrecko) ,
thanks for the Info!
I figured that out as well. However, do you also take the mean of the detector overlapping non-nan values or do you take the value of the last detector as I read in the ESA forum?

LG Johannes

Hi Johannes,

we take the value of the last detector in such cases.

1 Like