Skip to main content

Hi, I am using Sentinel hub to download Sentinel-3 OLCI data using the code below.


                indices_evalscript = """
//VERSION=3

function setup() {
return {
input: ["B17", "B08", "QUALITY_FLAGS"],
output:[{
id: "BANDS",
bands: 2,
sampleType: SampleType.FLOAT32
},
{
id: "CLOUD_MASK",
bands: 1,
sampleType: SampleType.UINT8
}]
}
}

function evaluatePixel(sample) {
let cld = (sample.QUALITY_FLAGS & 134217728);
return {
CLOUD_MASK: [cld],
BANDS: [sample.B17, sample.B08]
};
}
"""

add_indices = SentinelHubEvalscriptTask(
features=[(FeatureType.DATA, "BANDS"),
(FeatureType.MASK, "CLOUD_MASK")],
evalscript=indices_evalscript,
data_collection=DataCollection.SENTINEL3_OLCI,
resolution=300
)

print('downloading data '+time_interval[0]+'-'+time_interval[1])
input_node = EONode(add_indices)
filter_clouds = EONode(AddValidDataMaskTask(),inputs=[input_node])
output_node = EONode(OutputTask("final_eopatch"), inputs=[filter_clouds])
workflow = EOWorkflow([input_node, filter_clouds, output_node])
result = workflow.execute({input_node: {"bbox": roi_bbox, "time_interval": time_interval}})
eopatch_clean = result.outputs['final_eopatch']


However I would like to distinguish the data from S3A and S3B. I tried to look to the data product description but I couldn’t find anything useful. Do you have any advices?


Thank you in advance

Paolo

Hi,

This is not a feature that you can implement in either your evalscript or Process API request. However, you can combine Catalog and Process APIs like in this example. You should be able to extract out the platform (S3A, S3B) from the Catalog API request and use this to filter out the acquisitions you want in the Process API request.

Hope that this helps you out!


Reply