stripmapStack: fix reference date ignored in offset inversion#28129
Open
huchangyang wants to merge 1 commit into
Open
stripmapStack: fix reference date ignored in offset inversion#28129huchangyang wants to merge 1 commit into
huchangyang wants to merge 1 commit into
Conversation
invertMisreg.py and invertOffsets.py always removed the first sorted date from the design matrix, ignoring the user-specified reference date from stackStripMap -m. Pass the stack reference date through Stack.py and use it when building the inversion so per-date offsets align with the chosen reference frame.
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.
Summary
This PR fixes a bug in stripmap stack offset network inversion where the user-specified stack reference date (
stackStripMap -m) was not used byinvertMisreg.pyorinvertOffsets.py.Changes:
stackStripMap.py/Stack.pyto both inversion scripts via a new-r/--referenceargumentrefIdx) instead of always dropping the first sorted acquisitionProblem
stackStripMap.pyallows selecting an arbitrary stack reference date via-m/--reference_date, and downstream steps (e.g.refineSecondaryTiming,resampleSlc) already use that date.However, before this fix, both
invertMisreg.pyandinvertOffsets.pyalways removed the first sorted date from the design matrix:and always prepended the zero-offset row at index 0:
This is only correct when the reference date happens to be the first sorted acquisition. If the user selects a different reference date, the inverted per-date offsets are expressed relative to the wrong frame, causing misregistration in fine coregistration (
resampleSlcreadsrefineSecondaryTiming/dates/<date>/misreg).Fix
Stack.py/stackStripMap.py: passstackReferenceDateto:invertMisreg.py ... -r <ref>invertOffsets.py ... -r <ref>(rubbersheet / dense-offset path)invertMisreg.py/invertOffsets.py:-r/--referencerefIdxfrom the reference date indateListA[:,1:]withnp.delete(A, refIdx, axis=1)refIdxin the solved time seriesinvertOffsets.pyonly:dateListfrom the internal HDF5 file usesYYYY-MM-DD HH:MM:SS, while the stack passesYYYYMMDD. A one-line format conversion is applied before matchingrefIdx, using the sameif / elif / elsestructure asinvertMisreg.py.Files changed
contrib/stack/stripmapStack/stackStripMap.pystackReferenceDateto inversion stepscontrib/stack/stripmapStack/Stack.py-rin generated run commandscontrib/stack/stripmapStack/invertMisreg.py-rin design matrix and output assemblycontrib/stack/stripmapStack/invertOffsets.pyTest
Dataset and motivation
We tested this fix using the same ALOS-2 dataset over Kyushu, Japan described in:
As shown in Fig. 13 of that paper, the temporal variation of range misregistration in this stack is dominated by ionospheric effects, with large delays during 2015–2016 associated with strong solar activity [Fig. 13(a)].
We chose this dataset deliberately because the acquisitions span both 2015 and 2019, i.e. epochs separated by large cumulative range offsets. This makes the test sensitive to reference-frame errors: if inversion assumes the wrong reference date, the misregistration time series is shifted to the wrong frame, and the resulting coregistration error is amplified rather than masked.
Stack configuration:
-m):2019021820150209,20150223,20150810,20150824,20190304stackStripMap.py -s slc/ -w . -d dem/elevation.dem -a 3 -r 3 -u snaphu -f 0.8 \ -W ionosphere -z --nofocus -m 20190218Before fix
With
-m 20190218, the stack still inverted offsets relative to the first sorted acquisition rather than the specified reference. Two symptoms were observed:dense_offsets/dates/was not zero, as it should be when offsets are expressed relative to the stack reference.After fix
Re-running the same stack with the patched code:
Results:
Backward compatibility
-ris not provided, behavior is unchanged: the first sorted date is used as reference (same as before).stackStripMap.py,-ris now always passed explicitly.