Architecture
Folder Structure
sarpyx/
cli/
__init__.py
algorithms/AdaptiveThresholding.py
algorithms/__init__.py
decode.py
focus.py
main.py
shipdet.py
unzip.py
upload.py
utils.py
worldsar.py
processor/
__init__.py
algorithms/__init__.py
algorithms/backprojection.py
algorithms/constants.py
algorithms/mbautofocus.py
algorithms/rda.py
core/__init__.py
core/aux.py
core/code2physical.py
core/constants.py
core/decode.py
core/dim_updater.py
core/focus.py
core/meta.py
core/signal.py
core/spectrum.py
... (14 more files)
root/
sarpyx/__init__.py
science/
__init__.py
indices.py
sla/
__init__.py
core/__init__.py
core/meta.py
core/spectrum.py
metrics.py
utilis.py
snapflow/
__init__.py
engine.py
op.py
snap2stamps.py
snap2stamps_pipelines.py
utils/
__init__.py
complex_losses-OLD.py
dem_utils.py
executor.py
geos.py
grid.py
hf.py
io.py
losses.py
meta.py
metrics.py
nisar_utils.py
peorb.py
rfigen.py
sar_loss.py
up.py
... (3 more files)
Core Modules and Responsibilities
| Namespace | Modules | Representative Modules |
|---|---|---|
__init__.py | 1 | sarpyx.__init__ |
cli | 11 | sarpyx.cli.__init__, sarpyx.cli.algorithms.AdaptiveThresholding, sarpyx.cli.algorithms.__init__ ... |
processor | 30 | sarpyx.processor.__init__, sarpyx.processor.algorithms.__init__, sarpyx.processor.algorithms.backprojection ... |
science | 2 | sarpyx.science.__init__, sarpyx.science.indices |
sla | 6 | sarpyx.sla.__init__, sarpyx.sla.core.__init__, sarpyx.sla.core.meta ... |
snapflow | 5 | sarpyx.snapflow.__init__, sarpyx.snapflow.engine, sarpyx.snapflow.op ... |
utils | 19 | sarpyx.utils.__init__, sarpyx.utils.complex_losses-OLD, sarpyx.utils.dem_utils ... |
Data Flow
- Input ingestion (raw products, SAFE archives, or Zarr arrays).
- Decode/focus transforms in
sarpyx.processor.core. - Optional SNAP pipeline operations via
sarpyx.snapflow.engine.GPT. - Persistence via Zarr and export utilities.
- Metric/analysis stages in
sarpyx.slaandsarpyx.science.
External Integrations
- ESA SNAP GPT command-line tooling.
- Hugging Face Hub for upload workflows.
- Numerical and geospatial stack (NumPy, SciPy, rasterio, geopandas, zarr, dask).
Design Patterns
- Command-style CLI dispatch in
sarpyx.cli.main. - Wrapper abstraction for external GPT execution in
sarpyx.snapflow.engine.GPT. - Pipeline orchestration helpers in
sarpyx.snapflow.snap2stampswith a deprecated compatibility alias atsarpyx.snapflow.snap2stamps_pipelines. - Manager-style APIs for structured Zarr data access in
sarpyx.utils.zarr_utils.
Figma Diagram Specifications
The following JSON blocks are export-ready structured specs for recreation in Figma.