Skip to content

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
MultiSAR:mainfrom
s-sasaki-earthsea-wizard:fix/sicd-rgzero-radar-grid
Open

s-sasaki-earthsea-wizard wants to merge 3 commits into
MultiSAR:mainfrom
s-sasaki-earthsea-wizard:fix/sicd-rgzero-radar-grid

Conversation

@s-sasaki-earthsea-wizard

Copy link
Copy Markdown

Fixes #80.

Three small fixes to src/multirtc/sicd.py, one commit each, each with a CHANGELOG line:

commit change
adfac02 Fix SICD center frequency operator precedence (Min + Max) / 2 instead of Min + Max / 2 (SicdSlc, all SICD inputs)
67ab961 Fix one-line-early sensing start on time-reversed RGZERO SICDs last column time at NumCols - 1, PRF over NumCols - 1 intervals
e7aa57b Fix RGZERO starting range of SicdRzdSlc R_CA_SCP - (SCPPixel.Row - FirstRow) * Row.SS instead of get_starting_range(0)

The second commit changes two lines together on purpose.
Moving only last_col_time to NumCols - 1 would scale the PRF by NumCols / (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_start is 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 (develop 2919e1c9), with matched options:

MultiRTC sensing start − GCOV input starting range − GCOV input median tile-correlation offset vs GCOV (along / toward near range) gamma0 within 0.01 dB of GCOV
v0.5.4 −1.006 line −6.323 m −1.172 m / 8.843 m 0.17 % of 8,094,986 px
this PR −0.006 line 0 < 0.001 m / < 0.001 m 99.974 % of 8,097,578 px

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.

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.
  • With NumCols == 1, the new PRF is 0 / 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 ValueError for NumCols < 2 if preferred.
  • The test suite has no SICD fixtures, so I have not added a unit test.
    I can add one built on a small synthetic SICD metadata object (increasing and decreasing TimeCAPoly, one column) if you would like.
  • The entries are under a new [0.5.5] heading; please change the version as you see fit.
  • ICEYE inputs go through the same 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.

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.
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