Hello,
I want to access sentinel-1 images but for some reason I get blank image.
I use time interval before the failure (23/12/21).
This is my evalscript:
evalscript_sen1 = """
//VERSION=3
function setup() {
return {
input: ["VV","VH"],
output: { bands: 2 },
sampleType:"FLOAT32"
};
}
function evaluatePixel(sample) {
return [10 * Math.log((sample.VV)+0.0001) / Math.LN10 , 10 * Math.log((sample.VH)+0.0001) / Math.LN10];
}
"""
Then I have list of dates (which I generated with wms get dates functuin). I run this dates list in order to access the images by date, but all I get is blank image:
#get dates
wms_s1= WmsRequest(
data_collection=DataCollection.SENTINEL1_IW,
data_folder='fake',
layer='BANDS-S1-IW',
bbox=bbox,
time=time_interval,
width=bbox_size[0],
height=bbox_size[1],
image_format=MimeType.TIFF,
time_difference=datetime.timedelta(hours=2),#get one image when there is small time differences between them
config=config
)
dates_s1_wms= wms_s1.get_dates()
dates_s1=[]
for t in dates_s1_wms:
new_date=t.date().strftime('%Y-%m-%d')
dates_s1.append(new_date)
for d in dates_s1:
request = SentinelHubRequest(
evalscript=evalscript_sen1,
input_data=[
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL1_IW,
time_interval=time_interval,
other_args={"dataFilter": {"mosaickingOrder": "mostRecent","resolution": "HIGH"},"processing": {"backCoeff": "GAMMA0_TERRAIN","orthorectify": True,"demInstance": "MAPZEN","upsampling": "BICUBIC","downsampling": "BICUBIC"}}
),
],
responses=[
SentinelHubRequest.output_response('default', MimeType.TIFF),
],
bbox=bbox,
size=bbox_size,
config=config
)
response = request.get_data()
plt.imshow(response[0][:,:,1])
plt.show()
When i plot the response I get blank image:
I couldn’t find yet where is the mistake, could you please help me to understand where is the problem?
Best
Reut