Repository navigation
Commit c1ef8e2
Fix/propagate cslc date fmt to ministack (#710)
* fix(stack): propagate cslc_date_fmt to ministack output filenames
When run_wrapped_phase_sequential is invoked with a non-default
cslc_date_fmt (e.g. "%Y%m%d%H%M%S" for non-SSO cadences with same-day
repeats), the date format was not forwarded to MiniStackPlanner. As a
result, phase-linked SLCs and CRLB rasters were written using the
default "%Y%m%d", and create_ifgs in wrapped_phase later raised
IndexError trying to extract dates from those filenames with the
caller's longer format.
Two complementary fixes:
1. sequential.py: pass file_date_fmt=cslc_date_fmt when constructing
MiniStackPlanner.
2. stack.py: in MiniStackPlanner.plan(), forward self.file_date_fmt to
each MiniStackInfo it creates. The planner already accepted the
field but did not propagate it to its children.
With both in place, _name_slcs / _name_crlbs produce filenames that
preserve the time-of-day component, and create_ifgs can parse them
back round-trip.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(interferogram): propagate cslc_date_fmt to ifg VRT filenames
After the prior commit, phase-linked SLCs were written with the caller's
cslc_date_fmt (e.g. "%Y%m%d%H%M%S"), but the interferogram VRT names
were still hardcoded to "%Y%m%d" because Network and convert_pl_to_ifg
default to that format. The resulting "%Y%m%d_%Y%m%d.int.vrt" filenames
then failed downstream stitching: stitching_bursts.run calls
merge_by_date with file_date_fmt=cslc_date_fmt, the long-format regex
matches no dates in the date-only filenames, and merge_images either
groups all ifgs together or builds a clip window with negative
dimensions ("Computed -srcwin ... has negative width and/or height").
Forward file_date_fmt into:
- interferogram.Network(...) constructions in create_ifgs (3 sites)
- interferogram.VRTInterferogram(...) construction for the extra-ref
case
- interferogram.convert_pl_to_ifg(...) (2 sites)
convert_pl_to_ifg now accepts a date_format parameter (default unchanged
for backward compatibility) and uses it for both date extraction from
the input SLC name and output filename formatting.
With this and the prior MiniStack propagation in place, IFG VRT
filenames preserve the time-of-day component end-to-end and downstream
merge_by_date round-trips correctly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Tests added, new fix emerged in stitching
* fix(unwrap): propagate cslc_date_fmt to spurt --date-fmt flag
Spurt's emcf workflow now accepts a --date-fmt CLI flag (default
"%Y%m%d") that controls how acquisition dates are extracted from SLC
filenames and written into unwrapped output filenames. Without
forwarding the caller's cslc_date_fmt, dolphin's spurt subprocess used
the default %Y%m%d slice and same-day acquisitions collapsed to a
single date in the output (e.g. 20240709_20240709.unw.tif), losing the
time-of-day component already preserved in the upstream ifg names.
Thread file_date_fmt: str = "%Y%m%d" through:
- unwrap_spurt: append "--date-fmt <fmt>" to the spurt subprocess
command, and forward to filled_masked_unw_regions for the
ambiguity-interpolation gap-fill step (which already accepted the
parameter but was being called with the default).
- unwrap.run: forward into unwrap_spurt.
- workflows.unwrapping.run: forward into unwrap.run.
- workflows.displacement.run: pass cfg.input_options.cslc_date_fmt
into unwrapping.run.
With this in place, e.g. cslc_date_fmt="%Y%m%d%H%M%S" produces
spurt outputs like 20240709040329_20240712025153.unw.tif round-trippable
end-to-end.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(timeseries): propagate cslc_date_fmt to inverted/residual filenames
timeseries.run already accepted file_date_fmt, but it was not being
forwarded from displacement.run, and several internal call sites
ignored it. As a result, with cslc_date_fmt="%Y%m%d%H%M%S" the
upstream stages produced ifg/unw filenames with time-of-day, but the
timeseries/ outputs collapsed back to %Y%m%d (e.g.
20251002_20251005.tif), losing the disambiguation that motivated the
custom format in the first place.
Forward file_date_fmt at five sites:
- displacement.run: pass cfg.input_options.cslc_date_fmt into
timeseries.run.
- timeseries.run -> invert_unw_network: forward file_date_fmt (the
callee accepted but the caller did not pass it).
- _redo_reference: pass fmt=file_date_fmt into format_dates when
building the re-referenced filenames for extra_reference_date.
- invert_unw_network: pass fmt=file_date_fmt into both format_dates
calls that build out_paths and out_residuals_paths.
- create_nonzero_conncomp_counts: replace hardcoded
d.strftime('%Y%m%d') with d.strftime(file_date_fmt) (the function
already exposed the parameter).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c2f7c24 commit c1ef8e2
11 files changed
Lines changed: 112 additions & 9 deletions
File tree
- src/dolphin
- unwrap
- workflows
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
| 777 | + | |
777 | 778 | | |
778 | 779 | | |
779 | 780 | | |
| |||
793 | 794 | | |
794 | 795 | | |
795 | 796 | | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
796 | 802 | | |
797 | 803 | | |
798 | 804 | | |
| |||
802 | 808 | | |
803 | 809 | | |
804 | 810 | | |
805 | | - | |
806 | | - | |
| 811 | + | |
| 812 | + | |
807 | 813 | | |
808 | 814 | | |
809 | 815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
550 | 551 | | |
551 | 552 | | |
552 | 553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| |||
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
312 | | - | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| |||
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
1049 | | - | |
| 1050 | + | |
| 1051 | + | |
1050 | 1052 | | |
1051 | 1053 | | |
1052 | | - | |
| 1054 | + | |
| 1055 | + | |
1053 | 1056 | | |
1054 | 1057 | | |
1055 | 1058 | | |
| |||
1585 | 1588 | | |
1586 | 1589 | | |
1587 | 1590 | | |
1588 | | - | |
| 1591 | + | |
1589 | 1592 | | |
1590 | 1593 | | |
1591 | 1594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
| |||
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
| 168 | + | |
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| 90 | + | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| |||
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
160 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
430 | 431 | | |
431 | 432 | | |
432 | 433 | | |
| |||
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| 463 | + | |
462 | 464 | | |
463 | 465 | | |
464 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| 410 | + | |
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
| |||
426 | 427 | | |
427 | 428 | | |
428 | 429 | | |
429 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
430 | 435 | | |
431 | 436 | | |
432 | 437 | | |
| |||
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
| 449 | + | |
444 | 450 | | |
445 | 451 | | |
446 | 452 | | |
| |||
453 | 459 | | |
454 | 460 | | |
455 | 461 | | |
| 462 | + | |
456 | 463 | | |
457 | 464 | | |
458 | 465 | | |
| |||
479 | 486 | | |
480 | 487 | | |
481 | 488 | | |
| 489 | + | |
482 | 490 | | |
483 | 491 | | |
484 | 492 | | |
| |||
502 | 510 | | |
503 | 511 | | |
504 | 512 | | |
| 513 | + | |
505 | 514 | | |
506 | 515 | | |
507 | 516 | | |
| |||
0 commit comments