Skip to content

Add bulk SAR mocomp operator - #1230

Merged
tbensonatl merged 4 commits into
mainfrom
tbenson/add-sar-bulk-mocomp-operator
Aug 25, 2026
Merged

Add bulk SAR mocomp operator#1230
tbensonatl merged 4 commits into
mainfrom
tbenson/add-sar-bulk-mocomp-operator

Conversation

@tbensonatl

Copy link
Copy Markdown
Collaborator

Add an experimental operator to apply bulk motion compensation to frequency domain SAR phase history history. It applies a frequency-dependent phase ramp to each pulse, referencing its phase to the specified per-pulse reference range.

Add a --bulk-mocomp option to the sarbp example that applies bulk mocomp based on the reference ranges contained in the CPHD file (or in the sarbp input file, which is typically generated from a CPHD). Applying mocomp to data that has already been mocomped will effectively reference the phase to the wrong point (i.e., mocomp is not idempotent and applying it multiple times will generate errors). Most CPHD files are already mocomped, so this option is for special cases where the data is not mocomped or the sarbp input file was generated with non-mocomped data.

Add an experimental operator to apply bulk motion compensation to frequency
domain SAR phase history history. It applies a frequency-dependent phase ramp
to each pulse, referencing its phase to the specified per-pulse reference range.

Add a --bulk-mocomp option to the sarbp example that applies bulk mocomp based
on the reference ranges contained in the CPHD file (or in the sarbp input file,
which is typically generated from a CPHD). Applying mocomp to data that
has already been mocomped will effectively reference the phase to the wrong point
(i.e., mocomp is not idempotent and applying it multiple times will generate
errors). Most CPHD files are already mocomped, so this option is for special cases
where the data is not mocomped or the sarbp input file was generated with
non-mocomped data.

Signed-off-by: Thomas Benson <tbenson@nvidia.com>
@tbensonatl tbensonatl self-assigned this Aug 23, 2026
@copy-pr-bot

copy-pr-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds an experimental lazy operator for frequency-domain SAR bulk motion compensation and integrates it into the SAR backprojection example.

  • Adds host, CUDA, and CUDA JIT-compatible phase-ramp evaluation with float and double range arithmetic.
  • Adds a --bulk-mocomp example path supporting complex and scaled-int16 FX input, block processing, windowing, and FloatFloat backprojection.
  • Adds API documentation, executor compatibility information, constants cleanup, and operator and SAR integration tests.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
include/matx/operators/sar_bulk_mocomp.h Implements the lazy bulk-motion-compensation expression, parameter and shape validation, phase arithmetic, and CUDA JIT capability propagation.
examples/sarbp/sarbp.cu Integrates optional bulk motion compensation into FX preprocessing, including int16 conversion, windowing, block staging, timing, and FloatFloat handling.
test/00_operators/sar_bulk_mocomp_test.cu Tests phase correction, odd and even frequency grids, batched reference changes, composed range expressions, precision behavior, and validation.
test/00_transform/SarBp.cu Extends SAR backprojection validation to cover the new motion-compensation workflow and coordinated phase-reference behavior.
include/matx/kernels/sar_bp.cuh Moves the speed-of-light constant to the shared constants API while preserving the established SAR phase-LUT calculation.
docs_input/api/signalimage/radar/sar_bulk_mocomp.rst Documents the operator’s tensor contract, phase equation, precision behavior, restrictions, and executor support.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[FX phase-history input] --> B{Input encoding}
    B -->|Complex| C[FX tensor]
    B -->|Int16 IQ| D[Scale and convert to complex]
    D --> C
    C --> E[Optional range window]
    R[Per-pulse range to MCP] --> F[Bulk motion compensation]
    P[Center frequency, sample spacing, sign] --> F
    E --> F
    F --> G[Range compression and upsampling]
    G --> H[SAR backprojection]
    R --> H
    H --> I[Focused SAR image]
Loading

Reviews (4): Last reviewed commit: "Run previously JIT-only mocomp tests thr..." | Re-trigger Greptile

@tbensonatl

Copy link
Copy Markdown
Collaborator Author

/build

When the ranges are double-precision and the FX data is complex<float>, add
a fast-path that uses double-precision for range reduction and then uses
sincospif() rather than sincospi() for the complex exponential. Thus, the
complex exponential itself is reduced precision relative to the double-precision
version, but ultimately we will narrow to complex<float> in the stored FX data,
so loss is minimal in applying sincospif() on a reduced input argument.

Signed-off-by: Thomas Benson <tbenson@nvidia.com>
@tbensonatl

Copy link
Copy Markdown
Collaborator Author

/build

@coveralls

coveralls commented Aug 24, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 93.289%tbenson/add-sar-bulk-mocomp-operator into main. No base build found for main.

Include an example from the unit test suite in the documentation rather than
an inlined example that is never executed.

Signed-off-by: Thomas Benson <tbenson@nvidia.com>
Comment thread examples/sarbp/sarbp.cu
Comment thread test/00_operators/sar_bulk_mocomp_test.cu Outdated
Signed-off-by: Thomas Benson <tbenson@nvidia.com>
@tbensonatl

Copy link
Copy Markdown
Collaborator Author

/build

@tbensonatl
tbensonatl merged commit 1c26c4a into main Aug 25, 2026
2 checks passed
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.

3 participants