Skip to content

Commit 6cbbf29

Browse files
authored
diff: support unw/off - timeseries (#1011)
+ `diff.py`: - support the differencing between a *.unw (or offset file with FILE_TYPE of displacement) file and a time-series file, as used frequently in phase correction procedures, by adding a sub-function `diff_ifgram_and_timeseries()` - split `diff_timeseries()` and `diff_ifgram_stack()` out of `diff_file()` for clarity. - prepare isce metadata file, to be consistent with mask.py and subset.py + call `diff.py` to handle the correction procedure in the following scripts: - iono_tec.py - legacy/tropo_pyaps.py - solid_earth_tides.py - tropo_gacos.py - tropo_pyaps3.py + `cli/geocode.py`: if `--lat-file` is specified, honor this manually set file as the default lookupFile, rather than searching for the default file patterns, which could be NOT consistent with input files.
1 parent a52256d commit 6cbbf29

File tree

9 files changed

+277
-294
lines changed

9 files changed

+277
-294
lines changed

src/mintpy/cli/diff.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
diff.py timeseries.h5 inputs/ERA5.h5 -o timeseries_ERA5.h5 --force
1919
diff.py timeseries_ERA5_ramp_demErr.h5 ../GIANT/Stack/LS-PARAMS.h5 -o mintpy_giant.h5
2020
diff.py reconUnwrapIfgram.h5 ./inputs/ifgramStack.h5 -o diffUnwrapIfgram.h5
21+
diff.py filt_20220905_20230220.unw ./inputs/ERA5.h5 -o filt_20220905_20230220_ERA5.unw
2122
2223
# multiple files
2324
diff.py waterMask.h5 maskSantiago.h5 maskFernandina.h5 -o maskIsabela.h5
@@ -51,7 +52,7 @@ def cmd_line_parse(iargs=None):
5152
# check
5253
# check: number of files == 2 for time-series and ifgram stack
5354
ftype = readfile.read_attribute(inps.file1)['FILE_TYPE']
54-
if ftype in ['timeseries', 'ifgramStack']:
55+
if ftype in ['timeseries', 'ifgramStack', '.unw']:
5556
if len(inps.file2) > 1:
5657
raise SystemExit(f'ERROR: ONLY ONE file2 is inputed for {ftype} type!')
5758

src/mintpy/cli/geocode.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ def cmd_line_parse(iargs=None):
127127

128128
# check: --lookup (lookup table existence)
129129
if not inps.lookupFile:
130-
# grab default lookup table
131-
inps.lookupFile = ut.get_lookup_file(inps.lookupFile)
132-
133130
# use isce-2 lat/lon.rdr file
134131
if not inps.lookupFile and inps.latFile:
135132
inps.lookupFile = inps.latFile
136133

134+
# grab default lookup table
135+
inps.lookupFile = ut.get_lookup_file(inps.lookupFile)
136+
137137
# final check
138138
if not inps.lookupFile:
139139
raise FileNotFoundError('No lookup table found! Can not geocode without it.')

0 commit comments

Comments
 (0)