Sentinel 1 data - units

I’m relatively new to sentinl-hub and i’m trying to get acess to sentinel1 images.

My goal is to get sentinel-1 image with the VV and VH bands in db (decibels) values.

I have manage to retrieve image using the following script but there are few things I don’t understand:

  1. what are the units of that image? I have seen in the documentry that there are BETA0 , SIGMA0_ELLIPSOID or GAMMA0_ELLIPSOID but i’m not sure how can I define which one I want in the python API.

  2. From how I understand the script, what I gonna get is VV, 2VH, VV/VH /100 and dataMask. Is there any way to get only the VV and VH? without the 2VH ot the vv/vh?

  3. relate to question no. 2: why do you provide those bands (2 * VH ) ect. and not the VV and VH directly?

  4. is there any way to get it already in decibels?

  5. When I put large time interval, which image am I going to see? the first one? mosaic? mean value?

  6. It says that the Orthorectification correction is an optional correction that applied on the image. how can I make sure that this was applied on the image I retrieved?

this is how I manage to retrieve the image:

evalscript = """
    //VERSION=3

    return [VV, 2 * VH, VV / VH / 100.0, dataMask]
"""

time_interval = '2019-07-06', '2020-07-07'

request = SentinelHubRequest(
    evalscript=evalscript,
    input_data=[
        SentinelHubRequest.input_data(
            data_collection=DataCollection.SENTINEL1_IW_DES,
            time_interval=time_interval,
        )
    ],
    responses=[
        SentinelHubRequest.output_response('default', MimeType.PNG)
    ],
    bbox=bbox,
    config=config
)

image = request.get_data()[0]

plot_image(image, factor=3.5/255, clip_range=(0,1))

Hi!

Answering by points you raised:

  1. By default, units are going to be in GAMMA0_ELLIPSOID. You can choose any backscattering coefficient by adding e.g. "backCoeff":"SIGMA0_ELLIPSOID" to your Python request.
  2. This script you have seems to be a custom script, made for a very specific visualization that highlights certain features in certain colors. If you would like to return only VV, then your script should be simply returning the VV (with optional dataMask for transparent no-data values, if needed):
//VERSION=3
return [VV, dataMask]
  1. The reason that we multiply VV with 2 is to increase the brightness of the image, which improves how it looks, but if you’re interested in examining raw values, then we recommend you to only return VV. Try to multiply the band in EO Browser to see how it gets brighter. Try return [VV] (EOB link), and compare it to return [VV*2] (EOB link).
  2. To get your band in decibels, you need to modify the custom script. This script should visualize your band to be from -20 dB to 0 dB (this script is also a data product, that you can enable for your layers in the Configuration Utility).
return [Math.max(0, Math.log(VV) * 0.21714724095 + 1), dataMask];
  1. By default, mostRecent mosaicking option will be chosen, which means, that the most recent image will be returned first.
  2. Orthorectification can be enabled using "orthorectify":true in your requests. By default, MAPZEN DEM will be used, but you can also specify Copernicus DEM to be used instead.

In this Python request, orthorectification is enabled (using Copernicus DEM 30 meters), SIGMA0_ELLIPSOID is selected and VH returned in the evalscript.

evalscript = """
return [VH];
"""
bbox = BBox(bbox=[12.44693, 41.870072, 12.541001, 41.917096], crs=CRS.WGS84)

request = SentinelHubRequest(
  evalscript=evalscript,
  input_data=[
    SentinelHubRequest.input_data(
    data_collection=DataCollection.SENTINEL1_IW,
    time_interval=('2020-11-24', '2020-12-24'),    
      other_args = {"dataFilter":{"demInstance":"COPERNICUS_30"},"processing":{"orthorectify":true,"backCoeff":"SIGMA0_ELLIPSOID"}}
)
  ],
  responses=[
    SentinelHubRequest.output_response('default', MimeType.PNG),  
  ],
  bbox=bbox,  
  size=[512, 343.697],
  config=config
)
response = request.get_data() 

I would recommend you to go to our Requests Builder, select all the parameters in the UI, and then check the resulting request in Python by enabling it below. To learn how to to this, see our Process API webinar, especially the last part, where it is shown how to run any process API request in Python. How to use the Requests Builder is also explained in detail in the same webinar, specifically for Sentinel-1.

I hope this helps.

Best,
Monja

2 Likes

Thank you for your answer!
regard the convertion to decibels- I’m jsut wondering regard the equation you provide-
what is the source of this ofrmula? and why not using this formula? what is the advantes in having it between -20 to 0?

dB= 10* log (DN)

thanks you and happy holidays

Reut

This script gives a good visualization of data. Using the script you provided, most pixels would appear too dark. I would recommend you to compare the scripts in EO Browser to see the results and try tweaking them a bit (I think changing 0.2 to 0.3 might work even better):

However, use any script you feel is best for your needs.

Happy holidays to you too!

Best,
Monja

1 Like

Hi Monja,

Thank uou very much for your help,

I’m still recieving values of 0-255 instead of -20 -0 as suppose to ( and lower than -20 )
I care less in this case regard the visualization, I mainly wants to get the proper values of the image.
How can I get those values?

thanks

Reut

Hi Reut,

To return the values in db, I suggest you return:

var log = 10 * Math.log(VV) / Math.LN10;

Note that the Math.log in javascript is in base e .

1 Like

thank you,

I have tried to put this in the costum script in the configuration dashboard but it still return in uint8 .

I have also tried to paste it in the return inside the evalscript:

evalscript = """
    //VERSION=3
    

    return [10 * Math.log(VV) / Math.LN10,10 * Math.log(VH) / Math.LN10, dataMask]
"""

but the the values were 0 or 255 .

I believe I understood you wrong. Where should this be put?

Best

Reut

Check the manuals on how to define the sample type:

Perhaps this example will also be useful for you:

@gmilcinski

Thank you for the answer.
regard the first link of the Evalscript and the datatype- it doesn’t help me in this case as the result needs to be in decibels and suppose to be between ~-50 - ~0 and not in 0-255 or 0-1 or uint16. I have used the script that Maxim has suggested but then I have still gotten uint8 values and not the db values.

Regard the 2nd link :
I have used also:

return Math.max(0, Math.log(linear) * 0.21714724095 + 1)

in the configuration utillity page,as mentioned in previous posts, but as I said- I keep getting the uint8 values and not the db values,
So if you couls maybe put more light here why it doesn’t give the db values in the array it will be helpful.
Thank you for your time and patient,

Reut

You have to understand that we do not have example written for each and every use case as there are unlimited number of options on how people would want to access EO data. This is why I recommended to take a bit deeper look in the concepts, so that you will be able to understand, how a specific example could be ported to your specific use-case. At the end, you will have to do that (as a last resource, if required, we can offer you consulting services, for a dedicated budget, to work with you on one-to-one basis; but we realised it is much better it our users understand the technology and data to the point they can use it themselves).

As a side note - remote sensing data is quite a complex topic and radar data is an order of magnitude more complicated. Therefore, I feel your frustration. We needed years to get to the level of understanding, where we are now, and we still have to learn tons of things.