processor.BurstProcessor
Batch processor for Sentinel-1 bursts and burst pairs.
Usage
processor.BurstProcessor(
file_manager, config=None, *, show_progress=True, continue_on_error=True
)Runs one SNAP GPT job per burst or pair with progress tracking, skips products that already exist with the requested settings, records failures per item, and returns an OperationSummary. Takes bursts and burst pairs, as collections or lists, rather than product classes.
Parameters
file_manager: FileManager-
File manager resolving input SLC and output product paths.
config: SNAPConfig | None = None-
Runtime configuration for SNAP GPT processing; defaults to SNAPConfig().
show_progress: bool = True-
Whether to show progress bars.
continue_on_error: bool = True-
Whether to continue processing after an error.
True, the default, attempts every item and records each failure in the summary, so one bad burst does not end a long job;Falseraises at the first error, once the items already running have finished, without starting the queued ones. Follow a run with OperationSummary.raise_on_failure() to fail once all items have been attempted.
Methods
| Name | Description |
|---|---|
| create_backscatter() | Create backscatter products from bursts, terrain-flattened (RTC) or geocoded (GTC). |
| create_coherences() | Create coherence products from burst pairs. |
create_backscatter()
Create backscatter products from bursts, terrain-flattened (RTC) or geocoded (GTC).
Usage
create_backscatter(self, bursts: Iterable[Burst], crs: CRSInput | Literal['auto'], config: GTCConfig, overwrite: bool = False) -> OperationSummary[GTCProduct]
create_backscatter(self, bursts: Iterable[Burst], crs: CRSInput | Literal['auto'], config: RTCConfig | None = None, overwrite: bool = False) -> OperationSummary[RTCProduct]The type of config selects the product. RTCConfig, the default, gives terrain-flattened gamma-0 backscatter (RTCProduct), called Normalised Radar Backscatter (NRB) in CEOS-ARD and RTC-S1 by OPERA. GTCConfig gives beta-0 backscatter that is geocoded only, not terrain-flattened (GTCProduct).
Parameters
bursts: Iterable[Burst]-
Bursts to process, such as a BurstCollection or a list of Burst objects.
crs: CRSInput | Literal["auto"]-
The coordinate reference system of the geocoded output, a WGS 84 / UTM zone, north or south, which product file names record. Given as a CRS object, an authority string such as
"EPSG:32632"or an EPSG code, or"auto"to process each burst in the UTM zone that holds its footprint (utm_zone). Use"auto"for bursts processed on their own, such as a time series, and the target cell’scrsfor products meant for a composite: an input in another zone than the cell raises InconsistentInputsError when composited. config: RTCConfig | GTCConfig | None = None-
Graph-shape configuration, RTCConfig or GTCConfig; defaults to RTCConfig() (Copernicus 30m DEM, multilook
(5, 1)). overwrite: bool = False-
Whether to overwrite existing products. Without it, every existing product is checked against
configbefore any item is processed, and skipped if its recorded settings match.
Returns
OperationSummary-
Summary of processing results, holding RTCProduct or GTCProduct as
configselects.
Raises
TypeErrorValueError-
If
crsis not a WGS 84 / UTM zone, raised before any item is processed. Under"auto", a footprint outside the UTM zones fails its item alone, recorded as a NoUTMZoneError. BurstMapUnavailableError-
With
"auto", if an item carries no footprint and the burst map has not been downloaded, which every such item would meet. (OSError, SnapProcessingError or RasterWriteError)-
If the disk is full, over quota or read-only, which would fail every remaining item alike: an
OSErrorsaying so, or an error caused by one or whose message or GPT output says so. ProductSettingsMismatchError-
If a product exists with other settings than
configor from another SNAP version, or without recording all of them, andoverwriteisFalse. An undetermined SNAP version is not compared. Every product existing when the call starts is checked before any item is processed, so for those it is raised before any GPT run; a product written by another process meanwhile is checked when its item is reached. OSError or RasterioError-
If a product exists,
overwriteisFalse, and it cannot be read to check its settings; checked up front in the same way.
create_coherences()
Create coherence products from burst pairs.
Usage
create_coherences(pairs, crs, *, config=None, overwrite=False)Parameters
pairs: Iterable[BurstPair]-
Burst pairs to process, such as a BurstPairCollection or a list of BurstPair objects.
crs: CRSInput | Literal["auto"]-
The coordinate reference system of the geocoded output, a WGS 84 / UTM zone, north or south, which product file names record. Given as a CRS object, an authority string such as
"EPSG:32632"or an EPSG code, or"auto"to process each pair in the UTM zone that holds its footprint (utm_zone). Use"auto"for pairs processed on their own, such as a time series, and the target cell’scrsfor products meant for a composite: an input in another zone than the cell raises InconsistentInputsError when composited. config: CoherenceConfig | None = None-
Graph-shape configuration; defaults to CoherenceConfig() (25x5 window, Copernicus 30m DEM).
overwrite: bool = False-
Whether to overwrite existing products. Without it, every existing product is checked against
configbefore any item is processed, and skipped if its recorded settings match.
Returns
OperationSummary- Summary of processing results.
Raises
ValueError-
If
crsis not a WGS 84 / UTM zone, raised before any item is processed. Under"auto", a footprint outside the UTM zones fails its item alone, recorded as a NoUTMZoneError. BurstMapUnavailableError-
With
"auto", if an item carries no footprint and the burst map has not been downloaded, which every such item would meet. (OSError, SnapProcessingError or RasterWriteError)-
If the disk is full, over quota or read-only, which would fail every remaining item alike: an
OSErrorsaying so, or an error caused by one or whose message or GPT output says so. ProductSettingsMismatchError-
If a product exists with other settings than
configor from another SNAP version, or without recording all of them, andoverwriteisFalse. An undetermined SNAP version is not compared. Every product existing when the call starts is checked before any item is processed, so for those it is raised before any GPT run; a product written by another process meanwhile is checked when its item is reached. OSError or RasterioError-
If a product exists,
overwriteisFalse, and it cannot be read to check its settings; checked up front in the same way.