Request for SENTINEL1_IW_ASC is empty

This request returns two empty results (all zeros o NaNs). But I’ve confirmed in EO explorer that this data is available pre 2017 if the EO cloud option is selected. Am I getting empty results because I need to enable EOClloud in my SentinelHubRequest somehow? If so I can’t find how to do this.

I see in the S1 docs that:

Mosaicking

SIMPLE and ORBIT mosaicking types are supported.

But what if I want to download the time series without mosaicking? The way I understand mosaicking is that images from different times will be stitched together into a single image, but I want the time series of individual images.

Also, when I select Orbit Direction in the request builder, I get SENTINEL1_IW_ASC as the data_collection. Is there a way to get both Ascending and Descending?

from sentinelhub import SentinelHubRequest, SentinelHubDownloadClient, DataCollection, MimeType, DownloadRequest, CRS, BBox, SHConfig, Geometry
config = SHConfig()
# confusing SH-specific script for getting outputs is described here
# https://docs.sentinel-hub.com/api/latest/evalscript/v3/
# mosaicking of TILE means full time series returned without mosaicking
evalscript = """
//VERSION=3
function setup() {
  return {
    input: ["VV", "localIncidenceAngle", "scatteringArea", "shadowMask"],
    output: [{ id:"s1_rtc_VV_area", bands: 2, sampleType: "FLOAT32"},
             { id:"s1_rtc_angle_mask", bands: 2, sampleType: "UINT8"}],
    mosaicking: "TILE"
  }
}
function evaluatePixel(samples){
    return {
    s1_rtc_VV_area: [10 * Math.log(samples.VV) / Math.LN10, samples.scatteringArea],
    s1_rtc_angle_mask: [samples.localIncidenceAngle, samples.shadowMask]
   }
}
"""
bbox = BBox(bbox=[-63.335390675843286, -19.315383298843127, -61.39430647448334, -17.462644319757963], crs=CRS.WGS84)
geometry = Geometry(geometry={"type":"Polygon","coordinates":[[[-63.335391,-19.25932],[-61.440385,-19.315384],[-61.394307,-17.513133],[-63.269917,-17.462645],[-63.335391,-19.25932]]]}, crs=CRS.WGS84)

request = SentinelHubRequest(
  data_folder= "data/test/s1/bolivia_santa_cruz/"
  evalscript=evalscript,
  input_data=[
    SentinelHubRequest.input_data(
    data_collection=DataCollection.SENTINEL1_IW_ASC,
    time_interval=('2014-10-01', '2016-09-30'),    
      other_args = {"dataFilter":{"resolution":"HIGH"},"processing":{"orthorectify":True,"demInstance":"COPERNICUS_30","backCoeff":"GAMMA0_TERRAIN"}}
)
  ],
  responses=[
    SentinelHubRequest.output_response('s1_rtc_VV_area', MimeType.TIFF),
      SentinelHubRequest.output_response('s1_rtc_angle_mask', MimeType.TIFF)
    
  ],
  bbox=bbox,  
  geometry=geometry,
  size=[512, 512.31],
  config=config
)
response = request.get_data() 

Hi @ryan,

The use of the EO Cloud option is a bit tricky with sentinelhub-py. EOCloud deployment doesn’t support our Process API. So to be able to use EO Cloud, you would have to get separate credentials from us and set up layers for OGC requests. But you might not need to do this: let’s look at your other questions first.

Also, when I select Orbit Direction in the request builder, I get SENTINEL1_IW_ASC as the data_collection. Is there a way to get both Ascending and Descending?

In order to obtain both ascending and descending orbits you can use the collection DataCollection.SENTINEL1_IW instead of DataCollection.SENTINEL1_IW_ASC.

But what if I want to download the time series without mosaicking?

When you select the ORBIT mosaicking, the option allows you to access the full stack of images.

For example, if you want all VV bands for a given area and time range, you would write the following Evalscript (return this as a tiff, and don’t go to large on your AOI or date range, as it can potentially return a LOT of data):

//VERSION=3

// Setup for VV time-series
// For the moment we set the output bands to 1, this will be updated
// by a function later.
function setup() {
  return {
    input: ["VV"],
    output: { bands: 1, sampleType: "FLOAT32" },
    // ORBIT to be able to fetch all images in the stack
    mosaicking: Mosaicking.ORBIT
  };
}

// The following function is designed to update the number of
// output bands without knowing beforehand how many there are
function updateOutput(outputs, collection) {
    Object.values(outputs).forEach((output) => {
        output.bands = collection.scenes.length;
    });
}

// Convert linear scale to Decibels
function toDB(LinearInput){
  return 10 * Math.log(LinearInput) / Math.LN10;
}

function evaluatePixel(samples) {
  // Precompute an array to contain VV observations
  var n_observations = samples.length;
  let band_vv = new Array(n_observations).fill(0);
  
  // Fill the array
  samples.forEach((sample, index) => {
    band_vv[index] = toDB(sample.VV);
  });
                     
  return band_vv;
}

You can modify this evalscript to match what you were doing in yours and should have access to more data.

Maxim

Does this mean I can only download Sentinel scenes after 2017 using the Processes API? Thanks for the code and suggestions, going to try this out.

This is correct, only scenes after 2017. We are trying to onboard older scenes as well, will keep you posted once we get there.