I’m trying to retrieve sentinel1 images using evalscript.
I have followed the instruction as appear here but I couldn’t understand the reason why I keep getting the 400 client error (bad request).
This is my evalscript:
evalscript = """
function setup() {
return {
input: {bands: d"VV","VH"]}
output:{bands: 2, sampleType:"FLOAT32"}}
}
function evaluatePixel(sample) {
return u10 * Math.log((sample.VV)+0.0001) / Math.LN10, 10 * Math.log((sample.VH)+0.0001) / Math.LN10]
}
"""
and this is how I have tried to use it,
when dates is list of dates strings (e.g e‘2020-07-01’,‘2020-07-12’]…
or d in dates:
request = SentinelHubRequest(
evalscript=evalscript,
input_data=
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL1_IW_DES,
time_interval=(d,d),
other_args = other_args = {"dataFilter":{"resolution":"HIGH","acquisitionMode":"IW"},"processing":{"backCoeff":"GAMMA0_TERRAIN","orthorectify":True,"demInstance":"COPERNICUS"},"id":"S1GRD"}
)
],
responses=
SentinelHubRequest.output_response('default', MimeType.TIFF)
],
bbox=bbox,
config=config
)
image = request.get_data()e0]
plt.figure(figsize=(10,8))
plt.imshow(image)
That returns the error:
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/api/v1/process
Server response: “{“error”:{“status”:400,“reason”:“Bad Request”,“message”:“Failed to evaluate script!\nevalscript.js:5: SyntaxError: Unexpected identifier\n output:{bands: 2, sampleType:“FLOAT32”}}\n ^^^^^^\n”,“code”:“RENDERER_EXCEPTION”}}”
I haven’t been able to find the source of this error yet, please help me to understand what am I doing wrong as it seems to me very similar to the evaluate script in the doc.