|
1 | 1 | #!/usr/bin/env python3
|
2 | 2 | """
|
3 |
| -v1.3.1 20200911 Yu Morishita, GSI |
| 3 | +v1.3.2 20201116 Yu Morishita, GSI |
4 | 4 |
|
5 | 5 | ========
|
6 | 6 | Overview
|
|
44 | 44 | """
|
45 | 45 | #%% Change log
|
46 | 46 | '''
|
| 47 | +v1.3.2 20201116 Yu Morioshita, GSI |
| 48 | + - Exit if suffix is not set |
47 | 49 | v1.3.1 20200911 Yu Morioshita, GSI
|
48 | 50 | - Change default to -c 0.05 -u 0.3
|
49 | 51 | v1.3 20200703 Yu Morioshita, GSI
|
@@ -83,7 +85,7 @@ def main(argv=None):
|
83 | 85 | argv = sys.argv
|
84 | 86 |
|
85 | 87 | start = time.time()
|
86 |
| - ver="1.3.1"; date=20200911; author="Y. Morishita" |
| 88 | + ver="1.3.2"; date=20201116; author="Y. Morishita" |
87 | 89 | print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
|
88 | 90 | print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
|
89 | 91 |
|
@@ -247,19 +249,28 @@ def main(argv=None):
|
247 | 249 | print('# unw_cov_thre: {0}, coh_thre: {1}'.format(unw_cov_thre, coh_thre), file=fstats)
|
248 | 250 | print('# ifg dates bperp dt unw_cov coh_av', file=fstats)
|
249 | 251 |
|
250 |
| - ### Identify suffix of raster image (ras or bmp?) |
| 252 | + ### Identify suffix of raster image (png, ras or bmp?) |
251 | 253 | unwfile = os.path.join(ifgdir, ifgdates[0], ifgdates[0]+'.unw')
|
252 | 254 | if os.path.exists(unwfile+'.ras'):
|
253 | 255 | suffix = '.ras'
|
254 | 256 | elif os.path.exists(unwfile+'.bmp'):
|
255 | 257 | suffix = '.bmp'
|
256 | 258 | elif os.path.exists(unwfile+'.png'):
|
257 | 259 | suffix = '.png'
|
| 260 | + else: |
| 261 | + print('\nERROR: No browse image available for {}!\n' |
| 262 | + .format(unwfile), file=sys.stderr) |
| 263 | + return 2 |
258 | 264 |
|
259 | 265 | for i, ifgd in enumerate(ifgdates):
|
260 | 266 | rasname = ifgdates[i]+'.unw'+suffix
|
261 | 267 | rasorg = os.path.join(ifgdir, ifgdates[i], rasname)
|
262 |
| - |
| 268 | + |
| 269 | + if not os.path.exists(rasorg): |
| 270 | + print('\nERROR: No browse image {} available!\n' |
| 271 | + .format(rasorg), file=sys.stderr) |
| 272 | + return 2 |
| 273 | + |
263 | 274 | ### Identify bad ifgs and link ras
|
264 | 275 | if rate_cov[i] < unw_cov_thre or coh_avg_ifg[i] < coh_thre:
|
265 | 276 | bad_ifgdates.append(ifgdates[i])
|
|
0 commit comments