Skip to content

Fast-subsub#14

Merged
sirbastiano merged 2 commits intomainfrom
fast-subsub
Feb 24, 2026
Merged

Fast-subsub#14
sirbastiano merged 2 commits intomainfrom
fast-subsub

Conversation

@sirbastiano
Copy link
Copy Markdown
Collaborator

This PR improves subaperture processing in two areas:

  1. Subaperture pipeline refactor (sarpyx/processor/core/subaperture_full_img.py)
  • Adds automatic backend selection between NumPy and Dask based on memory pressure.
  • Introduces chunked, lazy Dask loading for I/Q ENVI pairs.
  • Adds helper utilities for image shape probing and memory estimation.
  • Converts complex image creation paths to favor complex64 for reduced memory usage.
  • Adds backend-aware sublook generation and safer recentering in Dask path.
  • Adds/updates vectorized helper behavior (DeHammWin) consistency for performance and dtype stability.
  1. Robustness fixes in Zarr metadata handling (sarpyx/utils/zarr_utils.py)
  • Adds recursive, attribute-safe serializers for metadata/ephemeris values.
  • Handles non-JSON-safe types (NumPy scalars, pd.Timestamp, Enum, NaN, Path, bytes, etc.).
  • Prevents broken Zarr attributes for complex/pandas/dtype-heavy metadata payloads.
  1. Test coverage expansion (tests/test_subaperture_dask.py)
  • Adds tests for:
    • NumPy vs Dask numerical equivalence.
    • NumPy and Dask output shapes/dtypes.
    • Output ENVI file creation and shape checks.
    • Backend auto-detection and force-Dask override behavior.
    • Dask recenter/roll behavior and complex64 dtype consistency.
    • Vectorized DeHammWin behavior (1D/2D).

Related commits

  • f8ae932 — enhance complex image handling and add comprehensive Dask subaperture tests
  • 2724054 — subfix + Zarr utility serialization fixes

Files changed

  • sarpyx/processor/core/subaperture_full_img.py
  • sarpyx/processor/core/utilis.py
  • sarpyx/utils/zarr_utils.py
  • tests/test_subaperture_dask.py

Notes

  • Source branch: fast-subsub
  • Target branch: main

…rture processing

- Updated `create_complex_image_from_file` and `create_complex_image_from_array` functions to use complex64 for memory efficiency.
- Introduced `get_image_shape_from_file` function to retrieve image dimensions without loading data.
- Added a new test suite `test_subaperture_dask.py` to validate the dask divide-and-conquer subaperture pipeline.
- Implemented synthetic ENVI image generation and metadata handling for testing.
- Verified that both numpy and dask backends produce identical results and maintain dtype consistency.
- Ensured output files are correctly generated and have the expected shape.
@sirbastiano sirbastiano merged commit 9c1b8b3 into main Feb 24, 2026
2 checks passed
@sirbastiano sirbastiano deleted the fast-subsub branch February 24, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant