## snap_client.SNAPClient


Low-level client for SNAP GPT processing.


Usage

``` python
snap_client.SNAPClient(
    file_manager,
    config=None,
)
```


Provides direct interface to SNAP GPT for processing Sentinel-1 bursts. For batch processing with progress tracking, use BurstProcessor instead.


## Parameters


`file_manager: FileManager`  
File manager resolving input SLC and output product paths.

`config: SNAPConfig | None = None`  
Runtime configuration for SNAP GPT; defaults to [SNAPConfig()](snap_client.SNAPConfig.md#s1bursts.snap_client.SNAPConfig).


## Methods

| Name | Description |
|----|----|
| [create_backscatter()](#create_backscatter) | Compute backscatter from a burst, terrain-flattened (RTC) or geocoded (GTC). |
| [create_coherence()](#create_coherence) | Compute the coherence from a burst pair. |

------------------------------------------------------------------------


#### create_backscatter()


Compute backscatter from a burst, terrain-flattened (RTC) or geocoded (GTC).


Usage

``` python
create_backscatter(self, burst: Burst, crs: CRSInput | Literal['auto'], config: RTCConfig, overwrite: bool = False) -> OperationResult[RTCProduct]
create_backscatter(self, burst: Burst, crs: CRSInput | Literal['auto'], config: GTCConfig, overwrite: bool = False) -> OperationResult[GTCProduct]
```


The type of `config` selects the product: an [RTCConfig](snap_graph.RTCConfig.md#s1bursts.snap_graph.RTCConfig) gives an [RTCProduct](product.RTCProduct.md#s1bursts.product.RTCProduct), terrain-flattened gamma-0 backscatter; a [GTCConfig](snap_graph.GTCConfig.md#s1bursts.snap_graph.GTCConfig) a [GTCProduct](product.GTCProduct.md#s1bursts.product.GTCProduct), beta-0 backscatter that is geocoded only.


##### Parameters


`burst: Burst`  
Burst to process.

`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](burst.Burst.md#s1bursts.burst.Burst.utm_zone)). Use `"auto"` for bursts processed on their own, such as a time series, and the target cell's `crs` for products meant for a composite: an input in another zone than the cell raises [InconsistentInputsError](errors.InconsistentInputsError.md#s1bursts.errors.InconsistentInputsError) when composited.

`config: RTCConfig | GTCConfig`  
Graph-shape configuration, [RTCConfig](snap_graph.RTCConfig.md#s1bursts.snap_graph.RTCConfig) or [GTCConfig](snap_graph.GTCConfig.md#s1bursts.snap_graph.GTCConfig).

`overwrite: bool = ``False`  
Whether to overwrite an existing product. Without it, an existing product is returned as skipped, after checking that the settings it records match `config`.


##### Returns


`OperationResult`  
Result of the backscatter processing.


##### Raises


`TypeError`  
If `config` is neither an [RTCConfig](snap_graph.RTCConfig.md#s1bursts.snap_graph.RTCConfig) nor a [GTCConfig](snap_graph.GTCConfig.md#s1bursts.snap_graph.GTCConfig).

`ValueError`  
If `crs` is not a WGS 84 / UTM zone. Raised, not recorded, because a wrong `crs` would fail every burst. Under `"auto"`, a footprint outside the UTM zones fails this item alone and is recorded as a [NoUTMZoneError](errors.NoUTMZoneError.md#s1bursts.errors.NoUTMZoneError).

`(OSError, SnapProcessingError or RasterWriteError)`  
If the disk is full, over quota or read-only, which would fail every remaining item alike: an `OSError` saying so, or an error caused by one or whose message or GPT output says so.

`ProductSettingsMismatchError`  
If the product exists, `overwrite` is `False`, and the product records other settings than `config` or another SNAP version, or does not record one of them. An undetermined SNAP version is not compared.

`OSError or RasterioError`  
If the product exists, `overwrite` is `False`, and it cannot be read to check its settings.


------------------------------------------------------------------------


#### create_coherence()


Compute the coherence from a burst pair.


Usage

``` python
create_coherence(pair, crs, *, config, overwrite=False)
```


Runs the single-shot SLC→Coherence→Terrain-Correction graph.


##### Parameters


`pair: BurstPair`  
Burst pair to process.

`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](burst.Burst.md#s1bursts.burst.Burst.utm_zone)). Use `"auto"` for pairs processed on their own, such as a time series, and the target cell's `crs` for products meant for a composite: an input in another zone than the cell raises [InconsistentInputsError](errors.InconsistentInputsError.md#s1bursts.errors.InconsistentInputsError) when composited.

`config: CoherenceConfig`  
Graph-shape configuration (window size, DEM, …).

`overwrite: bool = ``False`  
Whether to overwrite an existing product. Without it, an existing product is returned as skipped, after checking that the settings it records match `config`.


##### Returns


`OperationResult`  
Result of the coherence processing.


##### Raises


`ValueError`  
If `crs` is not a WGS 84 / UTM zone. Raised, not recorded, because a wrong `crs` would fail every burst. Under `"auto"`, a footprint outside the UTM zones fails this item alone and is recorded as a [NoUTMZoneError](errors.NoUTMZoneError.md#s1bursts.errors.NoUTMZoneError).

`(OSError, SnapProcessingError or RasterWriteError)`  
If the disk is full, over quota or read-only, which would fail every remaining item alike: an `OSError` saying so, or an error caused by one or whose message or GPT output says so.

`ProductSettingsMismatchError`  
If the product exists, `overwrite` is `False`, and the product records other settings than `config` or another SNAP version, or does not record one of them. An undetermined SNAP version is not compared.

`OSError or RasterioError`  
If the product exists, `overwrite` is `False`, and it cannot be read to check its settings.
