Module: sarpyx.processor.algorithms.constants
File: sarpyx/processor/algorithms/constants.py
Constants module for SAR autofocus processing. This module provides functions to load and compute constants required for SAR autofocus algorithms, supporting both metadata-driven and default configurations.
Exported Symbols (__all__)
No explicit __all__ list. Public symbols inferred from implementation.
Public Functions (4)
load_constants_from_meta function
Load SAR processing constants from metadata.
File location: sarpyx/processor/algorithms/constants.py:149
Signature
load_constants_from_meta(meta: Any, patch_dim: Tuple[int, int]=(4096, 4096), use_torch: bool=True) -> Dict[str, Any]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
meta | Any | yes | - | SAR metadata containing acquisition parameters. |
patch_dim | Tuple[int, int] | no | (4096, 4096) | Dimensions of the processing patch (azimuth, range). |
use_torch | bool | no | True | Whether to use PyTorch tensors (if available). |
Return Type
Dict[str, Any]
Dict[str, Any]: Dictionary containing all processing constants.
Exceptions
ImportErrorValueError
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.algorithms.constants import load_constants_from_meta
result = load_constants_from_meta(meta=<meta>)
Edge Cases
May raise: ImportError, ValueError. Includes optional parameters with implementation-defined fallback behavior.
load_constants function
Load default SAR processing constants.
File location: sarpyx/processor/algorithms/constants.py:217
Signature
load_constants(patch_dim: Tuple[int, int]=(18710, 25780), use_torch: bool=True) -> Dict[str, Any]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
patch_dim | Tuple[int, int] | no | (18710, 25780) | Dimensions of the processing patch (azimuth, range). |
use_torch | bool | no | True | Whether to use PyTorch tensors (if available). |
Return Type
Dict[str, Any]
Dict[str, Any]: Dictionary containing default processing constants.
Exceptions
ImportError
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.algorithms.constants import load_constants
result = load_constants()
Edge Cases
May raise: ImportError. Includes optional parameters with implementation-defined fallback behavior.
validate_constants function
Validate that all required constants are present and reasonable.
File location: sarpyx/processor/algorithms/constants.py:289
Signature
validate_constants(constants: Dict[str, Any]) -> bool
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
constants | Dict[str, Any] | yes | - | Dictionary of processing constants. |
Return Type
bool
bool: True if constants are valid, False otherwise.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- io
Example Usage
from sarpyx.processor.algorithms.constants import validate_constants
result = validate_constants(constants=<constants>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
get_processing_info function
Get human-readable information about the processing parameters.
File location: sarpyx/processor/algorithms/constants.py:326
Signature
get_processing_info(constants: Dict[str, Any]) -> Dict[str, str]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
constants | Dict[str, Any] | yes | - | Dictionary of processing constants. |
Return Type
Dict[str, str]
Dict[str, str]: Dictionary with formatted parameter information.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.processor.algorithms.constants import get_processing_info
result = get_processing_info(constants=<constants>)
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
Public Classes (0)
No public classes detected.