Actually, I am working with GLF-CR neuronal network with my own SAR images. I tried all ways to download data in that format but it was no posible for me.
The neuronal networks data works in this way:
-Load de SAR image with values in dB btw -34 or more to 0 in float32 format. Sentinel-1 Global Backscatter Model
-Them clipped btw [-35,0] and [-25,0] the VV and VH bands respectily.
-In the last step, normalize the image btw [0,1]
I have this code:
evalscript = """
//VERSION=3
function setup() {
return {
input: ["VV","VH"],
output: { id: "default", bands: 2, sampleType: "FLOAT32" },
}
}
function evaluatePixel(samples) {
var vvdB = toDb(samples.VV)
var vhdB = toDb(samples.VH)
return [vvdB, vhdB]
}
// displays VV in decibels from -20 to 0
function toDb(linear) {
// the following commented out lines are simplified below
// var log = 10 * Math.log(linear) / Math.LN10
// var val = Math.max(0, (log + 20) / 20)
return Math.max(0, Math.log(linear) * 0.21714724095 + 1)
}
"""
bbox = BBox(bbox=[xx,xy,yy,yx], crs=CRS.WGS84)
def get_alldata(time_interval):
return SentinelHubRequest(
evalscript=evalscript,
input_data=[
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL1_IW_DES.define_from("sd", service_url=config.sh_base_url),
time_interval=time_interval,
other_args={"dataFilter": {"resolution": "HIGH"},"processing": {"backCoeff":"SIGMA0_ELLIPSOID","orthorectify": True,"demInstance": "COPERNICUS"}}
),
],
responses=[SentinelHubRequest.output_response("default", MimeType.TIFF),],
bbox=bbox,
size=aoi_size,
config=config,
)
I get the images btw 0 and 2 but no in dB.
How can i download the data in that format?