S1 L0
Prefect flow for processing a S1 L0 product
PrefectS1L0FlowConfig
Configuration for Prefect flow related to S1 Level 0 data.
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
|
__init__(stac_client, url_dpr, mission, cadip_session_id, product_types, adgs_files, s3_path, temp_s3_path)
Initialize the PrefectS1L0FlowConfig object with provided parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stac_client |
StacClient
|
StacClient instance |
required |
url_dpr |
str
|
The URL of the dpr endpoint |
required |
mission |
str
|
The mission name. |
required |
cadip_session_id |
str
|
The CADIP session ID. |
required |
product_types |
list
|
The list with the products types to be processed by the DPR |
required |
adgs_files |
list
|
ADGS files in the catalog. |
required |
s3_path |
str
|
The S3 path. |
required |
temp_s3_path |
str
|
The temporary S3 path. |
required |
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
|
build_eopf_triggering_yaml(cadip_files, adgs_files, product_types, temp_s3_path)
Builds the EOPF triggering YAML file using CADIP and ADGS file paths.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cadip_files |
dict
|
CADIP files metadata. |
required |
adgs_files |
dict
|
ADGS files metadata. |
required |
product_types |
list
|
The types for the output products |
required |
temp_s3_path |
str
|
Temporary S3 path. |
required |
Returns:
Name | Type | Description |
---|---|---|
response |
dict
|
The generated YAML template with updated inputs and I/O products, or None if unsuccessful. |
Raises: FileNotFoundError: If the YAML template file is not found. yaml.YAMLError: If there is an error loading the YAML template file. IOError: If there is an input/output error while accessing the YAML template file.
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
create_cql2_filter(properties, op='and')
Create a CQL2 filter based on provided properties, see: https://pystac-client.readthedocs.io/en/stable/tutorials/cql2-filter.html
Parameters:
Name | Type | Description | Default |
---|---|---|---|
properties |
dict
|
Dictionary containing field-value pairs for filtering. |
required |
op |
str
|
Logical operator to combine filter conditions. Defaults to "and". |
'and'
|
Returns:
Name | Type | Description |
---|---|---|
ret |
dict
|
CQL2 filter. |
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
|
gen_payload_inputs(cadu_list, adgs_list)
Generate payload inputs for the EOPF triggering YAML file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cadu_list |
list
|
List of CADU file paths. |
required |
adgs_list |
list
|
List of ADGS file paths. |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
[list, list]
|
A tuple containing the composer dictionary and the YAML content list. |
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
gen_payload_outputs(product_types, temp_s3_path)
Generate payload outputs for product types.
This function generates composer and output_body payloads for a list of product types, each associated with a temporary S3 path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
product_types |
list
|
A list of product types. |
required |
temp_s3_path |
str
|
The temporary S3 path where the products will be stored. |
required |
Returns:
Name | Type | Description |
---|---|---|
Tuple |
[list, list]
|
A tuple containing composer and output_body payloads. |
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
|
get_adgs_catalog_data(stac_client, collection, files)
Prefect task to retrieve ADGS catalog data for specific files in a collection.
This task retrieves ADGS catalog data by sending a request to the ADGS catalog search endpoint with filters based on the collection and file IDs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stac_client |
StacClient
|
The StacClient instance for accessing the ADGS catalog. |
required |
collection |
str
|
The name of the collection. |
required |
files |
list
|
A list of file IDs to retrieve from the catalog. |
required |
Returns:
Name | Type | Description |
---|---|---|
response |
dict
|
The ADGS catalog data if retrieval is successful, otherwise None. |
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
|
get_cadip_catalog_data(stac_client, collection, session_id)
Prefect task to retrieve CADIP catalog data for a specific collection and session ID.
This task retrieves CADIP catalog data by sending a request to the CADIP catalog search endpoint with a filter based on the collection and session ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stac_client |
StacClient
|
The StacClient instance for accessing the CADIP catalog. |
required |
collection |
str
|
The name of the collection. |
required |
session_id |
str
|
The session ID associated with the collection. |
required |
Returns:
Name | Type | Description |
---|---|---|
response |
dict
|
The CADIP catalog data if retrieval is successful, otherwise None. |
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
|
get_yaml_outputs(template)
Extract the paths of YAML outputs from the template.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
template |
dict
|
The YAML template. |
required |
Returns:
Name | Type | Description |
---|---|---|
list |
list
|
A list of paths for YAML outputs. |
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
198 199 200 201 202 203 204 205 206 207 |
|
s1_l0_flow(config)
Constructs a Prefect Flow for Sentinel-1 Level 0 processing.
This flow oversees the execution of tasks involved in processing Sentinel-1 Level 0 data. It coordinates sequential and parallel tasks, including retrieving catalog data concurrently from CADIP and ADGS stations, generating YAML configuration based on the retrieved data, initiating the processing based on the YAML configuration, updating the STAC catalog according to processing results, and publishing the processed files contingent upon catalog updates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config |
PrefectS1L0FlowConfig
|
Configuration for the flow. |
required |
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
|
start_dpr(dpr_endpoint, yaml_dpr_input)
Starts the DPR processing with the given YAML input.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dpr_endpoint |
str
|
The endpoint of the DPR processor |
required |
yaml_dpr_input |
dict
|
The YAML input for DPR processing. |
required |
Returns:
Name | Type | Description |
---|---|---|
response |
dict
|
The response JSON from the DPR simulator if successful, else None. |
Source code in docs/rs-client-libraries/rs_workflows/s1_l0.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|