Repository navigation
Compressed SLCs in manual-index (forward) networks - #744
Merged
Merged
Conversation
MiniStackPlanner.plan took the real files as file_list[first_real_slc_idx:], which assumes every compressed SLC occupies a contiguous block at the front of the date-sorted list. That holds when each one's reference precedes all the real dates -- historical mode and any sequential run -- but not when one is referenced to a date among them, which DISP-S1's forward mode permits: its 1002 precheck compares the reference against the NEWEST real date, not the earliest. Such a file fell inside the slice as well as being prepended, so it entered the ministack twice: two identical columns in the covariance, and -- because the ministack's own first_real_slc_idx then sat before it -- a phase-linked output named for the real acquisition that error 1001 had removed, which joined the interferogram network as though it were that acquisition. Chunk the real SLCs by their flag instead of by position. `ministack_size` still counts real SLCs, as it did. wrapped_phase's reference date label had the same root cause: ref_idx indexes the ministack, where compressed SLCs lead, so applying it to the sorted input list named a real date whenever one was interleaved. Index the compressed files in the order the ministack holds them. Historical is unaffected, and checked rather than assumed: 88 configurations (0-5 compressed SLCs x 5/15/30 real dates x ministack_size 15/100 x max_num_compressed 3/100 x both compressed plans) produce byte-identical planner output before and after. Measured motivation, OPERA DISP-S1 F11116 forward runs: 28 of 30 runs stacked one compressed SLC twice, 0 of 8 historical. On synthetic stacks with known truth the duplicate costs 12.9 mm on the reported date against 1.2 mm without it, and drops temporal coherence to 0.36.
A manual-index network addresses the phase-linked (real-date) list only, so the compressed SLC's reference epoch is never one of its nodes. That matters in exactly one case: when the epoch is the second-to-last date among all the inputs. DISP-S1's forward mode re-references its product to that date, so the product then reports an interval no interferogram spans -- and the real image for it cannot stand in, because rule 1001 removes any real SLC sharing the reference date. On F11116 those products came out at 36 / 9 / 10 % unconnected against ~2 % for every other dry-weather interval. Keeping the pair -- which already exists as a zero-cost VRT conjugate, since every phase-linked output is referenced to the epoch -- brings them to 4.5 / 2.1 / 2.0 % and restores the interval the product claims. Deliberately narrow. An earlier version kept every in-window pair after the reference. Measured over a year of F11116 that was worse in 9 of the 9 epochs where it acted, by ~1 pp of connectivity each, because those pairs reach back into the compressed epoch and are the least coherent observations in the network. Pairing at every position was worse still: 27 of 27 epochs, and worst at the storm it was meant to bridge. Off by default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The field description still described the first version -- keep every in-window pair after the reference epoch -- which was measured and dropped. The helper keeps one pair, in the one case where the product's own interval would have none. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`compressed_reference_anchor` (off by default) keeps one interferogram from the compressed SLC's reference epoch at every run: to the earliest in-window date after it, the shortest baseline the epoch has and so the most coherent of its pairs. That is the minimum needed to make the epoch a node of the unwrapped network, which is what lets a product be referenced to it rather than to the previous acquisition. Historical does the same with `single_ref_ifgs[:max_bandwidth]` and reaches the remaining dates through the real-real network: one edge suffices for connectivity, more only add redundancy. Measured on F11116, pairing with all in-window dates at every position cost ~1 pp of connectivity per epoch, so keeping it to one is the cheap way to buy the reference. At the second-to-last position the anchor is the same pair the default rule keeps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop `include_compressed_reference`: a manual-index network with compressed SLCs now always gets the (reference -> newest) pair when the reference is the second-to-last date. `compressed_reference_anchor` stays as the one switch, set by the caller that keeps outputs on the compressed epoch. Comments and docstrings trimmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
for more information, see https://pre-commit.ci
jax 0.10 warns when `jax.scipy.linalg.solve` gets a batched square right-hand side, because it may mean vectors or matrices. The CRLB inverses mean matrices, so use `jnp.linalg.solve`, which reads them that way. Results are unchanged. numpy 2.5 deprecates setting `arr.shape`, which osgeo_utils.gdal_calc still does. That code is GDAL's, so filter the warning in the pytest config. Both warnings are errors under the suite's `filterwarnings = error` and fail every PR on a fresh environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 9ea50d5)
mirzaees
marked this pull request as ready for review
November 16, 2026 15:51
mirzaees
approved these changes
Nov 16, 2026
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.
Compressed SLCs in manual-index (forward) networks
Three fixes for runs where a compressed SLC's reference epoch falls among, or
just before, the real dates. This happens in OPERA DISP-S1 forward mode.
Changes
1. A compressed SLC was stacked twice.
MiniStackPlanner.plantook the realfiles as
file_list[first_real_slc_idx:], which assumes every compressed SLCsorts before every real date. A compressed SLC referenced to a date among the
reals fell inside that slice and was also prepended. It then entered the
ministack twice, as two identical covariance columns. Real files are now chosen
by the
is_compressedflag.The phase-linking reference date had the same assumption. It was indexed into
the date-sorted list, which mislabelled every interferogram, and is now indexed
over the compressed files in ministack order.
2. Missing interval after a compression. A manual-index network addresses
real dates only. When the compressed reference epoch is the second-to-last
date, the newest interval had no interferogram. With compressed SLCs present,
create_ifgsnow adds the (epoch → newest) pair, which phase linking alreadywrote. Nothing is added in any other case. Pairing deeper into the window was
measured and lowered connectivity.
On F11116 the affected products went from 36 / 9 / 10 % unconnected to
4.5 / 2.1 / 2.0 %.
3.
InterferogramNetwork.compressed_reference_anchor(defaultFalse).When set, one interferogram is added at every run, from the compressed epoch
to the earliest in-window date after it. This makes the epoch a node of the
unwrapped network, so outputs can stay referenced to it rather than to the
previous acquisition. DISP-S1 sets it when
forward_redo_referenceis false.Defaults are unchanged for every existing configuration except item 2, which
only acts on manual-index networks with compressed SLCs.
on the one pair from the compressed epoch, and not more
The compressed epoch summarises the acquisitions before the window, so every
epoch-to-date pair is long-baseline by construction and is among the least
coherent observations in the network. Adding more of them was measured on
F11116 and lowered accuracy in proportion to how many were added:
One pair is the minimum that makes the epoch a node of the unwrapped network.
The pair goes to the earliest in-window date after the epoch, the shortest
baseline available, and the real-to-real network carries the rest. Historical
uses the same arrangement.
Caveat, to test and confirm. The comparison above was run with the product
re-referenced to the second-to-last date. With
forward_redo_reference: false,the single anchor pair is the epoch's only link to the network, so the L1
inversion cannot reject an unwrapping error on it. Its span also grows through
the cycle, to about 66 days on a 6-day series by the last run. Whether a
second pair from the epoch helps late in the cycle, where the anchor is
longest, has not been tested. Before relying on
falsein production, compare1 against 2 to 3 epoch pairs at positions near the end of the cycle.
Tests
tests/test_stack_ordering.pycovers the de-duplication and real-SLCchunking.
tests/test_compressed_reference_ifgs.pycovers the position-1 rule,the anchor and
create_ifgswith and without compressed SLCs.Not included
timeseries._redo_referencesnaps to the nearest date when the requested oneis missing, which silently does nothing. It should raise instead, in a
separate PR.