Repository navigation
Fix SICD radar grid: center frequency, sensing start on time-reversed scenes, RGZERO starting range - #81
Open
s-sasaki-earthsea-wizard wants to merge 3 commits into
Conversation
TxFrequency.Min + TxFrequency.Max / 2 evaluates as Min + (Max / 2). For a Capella X-band SICD (9.55-9.75 GHz) it gives 14.425 GHz instead of 9.650 GHz, so the wavelength is 2.078 cm instead of 3.107 cm.
last_col_time was evaluated at column index NumCols, one past the image. When the azimuth axis is time-reversed, that value becomes sensing_start, one line before the first output line. Evaluate it at NumCols - 1 and compute the PRF over NumCols - 1 intervals, so the PRF is unchanged for a linear TimeCAPoly and non-reversed scenes keep the same sensing_start.
get_starting_range(0) measures from the ARP at closest approach to a point on the plane tangent at the SCP. That equals the RGZERO row-0 range only at the SCP column; elsewhere it is short by a term quadratic in the along-track distance (-6.3 m at column 0 on a 19191-column Capella stripmap scene), and the column-0 value was used for the whole grid. In an RGZERO/INCA grid the row coordinate is R_CA - R_CA_SCP, so the row-0 range is the same for every column: R_CA_SCP - (SCPPixel.Row - FirstRow) * Row.SS.
s-sasaki-earthsea-wizard
requested a review
from forrestfwilliams
as a code owner
November 10, 2026 08:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #80.
Three small fixes to
src/multirtc/sicd.py, one commit each, each with a CHANGELOG line:adfac02Fix SICD center frequency operator precedence(Min + Max) / 2instead ofMin + Max / 2(SicdSlc, all SICD inputs)67ab961Fix one-line-early sensing start on time-reversed RGZERO SICDsNumCols - 1, PRF overNumCols - 1intervalse7aa57bFix RGZERO starting range of SicdRzdSlcR_CA_SCP - (SCPPixel.Row - FirstRow) * Row.SSinstead ofget_starting_range(0)The second commit changes two lines together on purpose.
Moving only
last_col_timetoNumCols - 1would scale the PRF byNumCols / (NumCols - 1), which drifts by about one line across the image.With both lines changed, the PRF stays the same for a linear
TimeCAPoly, and so does the sensing start of scenes that are not time-reversed.Verification on Capella data
The patched package, with no other change, was run on the 7 Capella stripmap SICDs of #80 (3 right-looking, 4 left-looking), and its radar grid was compared against the SICD metadata.
On all 7, the sensing start and starting range equal the SICD definition exactly in double precision, the PRF matches the SICD line rate to within 1.1e-16 (relative), and the wavelength is
c / ((TxFrequency.Min + TxFrequency.Max) / 2).On the right-looking scenes,
sensing_startis the v0.5.4 value bit for bit, and the PRF differs from v0.5.4 only by floating-point rounding (at most 1.8e-12 Hz).RTC on
CAPELLA_C14_SM_SICD_HH_20240626150051_20240626150055(Mexico City, left-looking), compared with isce3's GCOV workflow on the same SICD, DEM and isce3 build (develop2919e1c9), with matched options:The offset is a relative estimate from 99 tile phase correlations, not absolute geolocation.
The pixel counts are each run's common support with GCOV (finite and positive on both sides, within the GCOV mask).
The remaining −0.006 line is the nanosecond part of
Timeline/CollectStart, which this PR does not address (see #80).With the zero-Doppler
LUT2d()used here and matched area-projection options, restoring the v0.5.4 wavelength leaves all 8 Mexico City output rasters bit-identical.The fix also corrects the wavelength exposed in
RadarGridParameters; phase-sensitive and non-zero-Doppler uses remain untested.artifacts/multirtc-sicd-fix-20261108/Notes for review
get_starting_range()has no callers after this change.I left it in to keep the diff small, and can remove it here if you prefer.
NumCols == 1, the new PRF is0 / 0(NaN), where v0.5.4 returned a finite rate from the out-of-image column.This endpoint-based PRF calculation does not handle a one-column image.
I have left that limitation explicit here and can add a
ValueErrorforNumCols < 2if preferred.I can add one built on a small synthetic SICD metadata object (increasing and decreasing
TimeCAPoly, one column) if you would like.[0.5.5]heading; please change the version as you see fit.SicdRzdSlc, but I only had Capella data to test with.Disclosure
This PR was developed with AI assistance.
I have reviewed, tested, and take responsibility for all of the changes.