My question is similar to:

I am new to GEE and JavaScript.

I want to create the following number of bands for each Sentinel1 scene other than original bands (vv,vh in linear scale).

  1. RVI, NRPB, VV-db, VH-db, VV/VH (db), VH/VV(db), VV+VH (db).
//// RVI calculation
var RVI = vvVhIw.map(function (image){
  var rvi = image.expression('sqrt((vv)/(vv+vh)) *  ((4*(vh))/(vv+vh))',
    {'vv': image.select('VV'),
     'vh': image.select('VH')
    return rvi;

// calculate NRPB Band
var NRPB = vvVhIw.map(function (image){
  var nrpb = image.expression('(vv-vh)/(vv+vh)',
    {'vv': image.select('VV'),
     'vh': image.select('VH')
    return nrpb;

// convert Linear to DB
var TO_DB = vvVhIw.map(function (image){
  var to_db = image.expression('10 * log10(linear)',
    {linear: image.select(['VV','VH']),
    return to_db;

How to call the VV and VH bands that are in decibel in a function to create bands such as VV/VH (db), VH/VV (db), VV+VH (db). At the end, I will have 7 bands for each Sen1 image.

1 Answer 1


To begin with, you might want to start off your processing in linear, and convert to dB in the last step. For that, use COPERNICUS/S1_GRD_FLOAT. Otherwise, you convert with this:


Inspect a pixel in this script to verify that the collections and conversions looks as expected.


  • Thank you for your reply. I will update you once I finish it.
    – Mohana
    Commented Mar 20, 2023 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.