1

I am requesting Sentinel-1 SAR data but rather than throwing an error the code is just returning zeros.

My request:

bbox = BBox([-145.8, 60.96, -146.5, 61.38], crs=CRS.WGS84)
bbox_size = bbox_to_dimensions(bbox, resolution=100)
time_interval = ('2018-07-01', '2018-07-16')

evalscript_all_bands = """
    //VERSION=3
    function setup() {
        return {
            input: [{
                bands: ["HV"],
            }],
            output: {
                bands: 1,
            }
        };
    }

    function evaluatePixel(sample) {
        return [sample.HV];
    }
"""

request_all_bands = SentinelHubRequest(
    evalscript=evalscript_all_bands,
    input_data=[
        SentinelHubRequest.input_data(
            data_collection=DataCollection.SENTINEL1_EW,
            time_interval=time_interval,
    )],
    responses=[
        SentinelHubRequest.output_response('default', MimeType.TIFF)
    ],
    bbox=bbox,
    size=bbox_size,
    config=config
)

data = request_all_bands.get_data()

print(len(data))

print(data[0][:,:].shape)

plt.imshow(data[-1][::],aspect='auto')

The output of this is an array of zeros - no error message. Can anybody suggest a time period or region where I can find some data?

2
  • I've since found a part of the website that gives you snippets of code to use (under 'layers'). But using that gives me the same result: //VERSION=3 function evaluatePixel(sample) { return [sample.HH, sample.HV, sample.dataMask]; } function setup() { return { input: [{ bands: [ "HH", "HV", "dataMask" ] }], output: { bands: 3, sampleType:"FLOAT32" } } } Mar 3, 2021 at 20:30
  • This is because you are searching for EW collection (SENTINEL1_EW), which is not available there. IW is much more common.
    – Grega M.
    Mar 3, 2021 at 20:42

1 Answer 1

1

The EW mode is quite rare, only available for specific regions, see the Sentinel-1 Observation scenario.

If you want these specific type of data, you can e.g. find them here, for the same time period:

bbox = BBox([-145.8, 60.96, -146.5, 61.38], crs=CRS.WGS84)

If you are not certain, where there are some data, I suggest to use EO Browser, select Sentinel-1, then "Advanced search" and filter for the type you are interested in. enter image description here

There is no error message as there is simply no data here.

1
  • Thanks, I will mark this as the correct answer once enough time has expired. Mar 4, 2021 at 11:21

Your Answer

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

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