ISCE2与Mintpy处理GNSS点SAFE数据

此笔记记录使用ISCE2Mintpy处理burst2safe下载的ASF sentinel burst数据并进行GNSS点SBAS-InSAR的步骤。

1. 数据检查

下载的SAFE数据暂存与~/Documents/00_data/sentinel/AHBB,一共90幅影像,使用SNAP打开其中一幅检查数据完整性。

检查SAFE数据

2. Preprocessing with ISCE2

2.1 数据准备

  • 将所有的SAFE放到SLC文件夹,并同级创建orbits, AUXFILE, DEM, stacks 文件夹。
1
2
3
4
5
6
7
8
9
10
(base) yuchi@yuchi-MSI:~/Documents/00_data/sentinel/AHBB$ tree -L 1
.
├── AUXFILE
├── DEM
├── orbits
├── SLC
└── stacks

5 directories, 0 files

  • 修改~/tools/conda-envs/insar/config.rc文件
1
2
3
4
5
6
7
8
9
# Inside ~/tools/conda-envs/insar/config.rc 

##---------------------- Work Dirs ----------------##
export WORK_DIR=~/Documents/00_data/sentinel/AHBB
export ORBIT_PATH=${WORK_DIR}/orbits
export AUX_PATH=${WORK_DIR}/AUXFILE
export DEM_PATH=${WORK_DIR}/DEM
export SLC_PATH=${WORK_DIR}/SLC
export INSAR_WORK_DIR=${WORK_DIR}/stacks

2.2 下载DEM

  • 使用dem.py下载此研究区数据的DEM
1
2
3
4
5
6
7
8
9

# 准备conda环境
load_insar

# 指向到DEM下载目录
cd $DEM_PATH

# 运行dem.py,详细-b参数见另一篇博客AHBB
dem.py -a stitch -b 32 33 117 118 -r -s 1 -c

dem.py运行结果

2.3 下载orbit数据

  • 使用sentineleof下载orbit数据
1
2
3
4
5
6
7
# 检查目标文件夹
echo $SLC_DIR # /home/yuchi/Documents/00_data/sentinel/AHBB/SLC

echo $ORBIT_PATH # /home/yuchi/Documents/00_data/sentinel/AHBB/orbits

# 下载orbit数据
eof -p $SLC_PATH --save-dir $ORBIT_PATH

sentineleof运行结果

2.4 生成run_files

  • 使用stachSentinel.py创建run_files
1
2
3
4
# 修改DEM_PATH 
# 记得修改参数 -n 表示需要处理的swath,每次的输入都不同,参考xml文件或SNAP中查看metadata!

stackSentinel.py -s $SLC_PATH -w $INSAR_WORK_DIR -a $AUX_PATH -d $DEM_PATH/demLat_N32_N33_Lon_E117_E118.dem.wgs84 -o $ORBIT_PATH -n 2 -b '32.80 32.91 117.28 117.32' --useGPU -C geometry -c 3 -z 1 -r 6 -f 0.6 --num_proc 4

stackSentinel.py运行结果

  • 运行结束后在$INSAR_WORK_DIR/run_files文件夹下生成run_files文件,以进行后续操作。

run_files目录

2.5 运行ISCE2 run_files

  • 逐步运行run_files,并检查每一步结果。
1
2
3
4
5
6
7
8
9
10
11
12
13
cd $INSAR_WORK_DIR/run_files

bash run_01_unpack_topo_reference
bash run_02_unpack_secondary_slc
bash run_03_average_baseline
bash run_04_fullBurst_geo2rdr
bash run_05_fullBurst_resample
bash run_06_extract_stack_valid_region
bash run_07_merge_reference_secondary_slc
bash run_08_generate_burst_igram
bash run_09_merge_burst_igram
bash run_10_filter_coherence
bash run_11_unwrap

ISCE2运行结果

2.6 结果检查

  • ISCE的运行结果保存在$WORK_DIR/stacks/merged/interferograms/20xxxxxx_20xxxxxx/文件夹下,其中的部分文件可以使用命令mdx.py进行查看。

*.unw: Unwrapped phase results
filt_fine.int: Filtered interferogram
fine.int: Original interferogram
*.cor: Coherence results

生成文件

1
2
3
4
5
6
7
8
9
# example
cd $WORK_PATH/stacks/merged/interferograms/20220915_20220927

# show figures
mdx.py filt_fine.int
mdx.py filt_fine.cor
mdx.py filt_fine.unw
mdx.py fine.int
mdx.py fine.cor

fine.int结果
filt_fine.int结果
filt_fine.unw结果

3. Mintpy进行SBAS-InSAR处理

3.1 Pre-processing

  • 在获取了干涉序列后,最后一步就是用mintpy去获得最终的时序InSAR形变产品,首先在$WORK_DIR/stacks中创建一个mintpy文件夹,作为mintpy的工作文件夹:
1
2
3
4
5
6
7
load_insar

cd $WORK_DIR/stacks

mkdir mintpy; cd mintpy

smallbaselineApp.py -g

3.2 Processing

  • 编辑smallbaselineApp.cfg文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
########## computing resource configuration
mintpy.compute.maxMemory = 32 #[float > 0.0], auto for 4, max memory to allocate in GB

##---------for ISCE only:
mintpy.load.metaFile = ../reference/IW*.xml
mintpy.load.baselineDir = ../baselines #[path of the baseline dir], i.e.: ./baselines

##---------interferogram stack:
mintpy.load.unwFile = ../merged/interferograms/*/filt_fine.unw #[path pattern of unwrapped interferogram files]
mintpy.load.corFile = ../merged/interferograms/*/filt_fine.cor #[path pattern of spatial coherence files]
mintpy.load.connCompFile = ../merged/interferograms/*/filt_fine.unw.conncomp #[path pattern of connected components files], optional but recommended
mintpy.load.intFile = ../merged/interferograms/*/fine.int #[path pattern of wrapped interferogram files], optional

##---------geometry:
mintpy.load.demFile = ../merged/geom_reference/hgt.rdr #[path of DEM file]
mintpy.load.lookupYFile = ../merged/geom_reference/lat.rdr #[path of latitude /row /y coordinate file], not required for geocoded data
mintpy.load.lookupXFile = ../merged/geom_reference/lon.rdr #[path of longitude/column/x coordinate file], not required for geocoded data
mintpy.load.incAngleFile = ../merged/geom_reference/los.rdr #[path of incidence angle file], optional but recommended
mintpy.load.azAngleFile = ../merged/geom_reference/los.rdr #[path of azimuth angle file], optional
mintpy.load.shadowMaskFile = ../merged/geom_reference/shadowMask.rdr #[path of shadow mask file], optional but recommended

########## 4. correct_unwrap_error (optional)
mintpy.unwrapError.method = bridging #[bridging / phase_closure / bridging+phase_closure / no], auto for no

########## 13.4 plot
mintpy.plot.maxMemory = 32 #[float], auto for 4, max memory used by one call of view.py for plotting.
  • 设置好smallbaselineApp.cfg配置文件后,直接运行:
1
smallbaselineApp.py smallbaselineApp.cfg

mintpy结果

3.3 Post-processing

运行完成smallbaselineApp.py后,工作文件夹中会出现很多结果,这里挑几个重点结果进行说明

inputs文件夹中存放了mintpy读入的数据

ifgramStack.h5 全部干涉图相位信息
geometryGeo.h5 地理编码、雷达视角、DEM等相关信息,绘图的时候可以用到
ERA5.h5 使用ERA5计算的各个日期的大气延迟量

工作文件夹中存放了时序InSAR后处理结果

timeseries.h5 经过SBAS解算的累积形变序列
timeseries_ERA5.h5 经过SBAS解算–>ERA5对流层大气延迟改正的累积形变序列
timeseries_ERA5_demErr.h5 经过SBAS解算–>ERA5对流层大气延迟改正–>DEM误差改正的累积形变序列
maskTempCoh.h5 相干性掩膜,绘图的时候滤除时间相干性较差的点。
velocity.h5 形变速率、速率标准差等相关数据

pic文件夹中存放了所有可视化结果

可以看到,mintpy的所有数据都是用hdf5数据类型存储的,结果都是.h5文件,可以使用h5py库进行查看修改。mintpy软件中也自带了很多脚本命令可以使用。

  • 使用info.py查看h5数据

对于一个h5文件我们不清楚它里边储存了什么内容,或者不了解这个mintpy文件工程的内容,可以使用info.py name.h5进行查看,name就是这个h5文件名。例如,我们可以查看./inputs/ifgramStack.h5文件的信息:

1
(insar) yuchi@yuchi-MSI:~/Documents/00_data/sentinel/AHBB/stacks/mintpy/inputs$ info.py ifgramStack.h5 

首先会输出该mintpy工程在处理时使用的参数,然后在结尾出给出这个h5文件的数据摘要。

info.py结果

详细查看某一变量,在info.py ./inputs/ifgramStack.h5命令后加入--dset dataset_name即可,例如:

1
info.py ifgramStack.h5 --dset dropIfgram

这个命令会输出ifgramStack.h5文件中存储的dropIfgram这一变量的值,可以看到,本次处理使用了全部的干涉图数据,没有干涉图被drop

info.py ifgramStack.h5 --dset dropIfgram结果

  • 使用view.py查看图像数据

view.pymintpy自带的一个非常强大的可视化脚本,功能很多没办法一一说明,这里简单给个例子来记录。

1
(insar) yuchi@yuchi-MSI:~/Documents/00_data/sentinel/AHBB/stacks/mintpy$ view.py timeseries.h5 '*2022'

这个命令会画出2022年的timeseries累积形变序列图。timeseries.h5中记录的每一个日期的图命名为:‘timeseries-date’,所以这里’*2022’表示搜索所有2022年的数据,同理,’*202204’表示搜索2022年4月的全部数据。

view.py结果

view.py还有很多可以DIY的选项,具体参数内容可以查看view.py -h.

  • 使用tsview.py交互界面查看形变时间序列

运行tsview.py timeseries.h5可以打开一个交互式窗口展示从开始日期到结束日期的timeseries图,通过键盘左右键切换日期;使用鼠标点击某一点,可以展示出该点位对应的形变序列。同时,tsview.py支持同时绘制多个timeseries的序列,例如,我们可以比较某点ERA5改正前后的累积形变序列,运行:

1
tsview.py timeseries_ERA5.h5 timeseries.h5

在交互界面中,点击某点,小窗口中会显示对应的时间序列

  • 至此,ASF -> ISCE2 -> Mintpy全流程处理SBAS-InSAR实验完成!

3. 附录

  • view.py -h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
(insar) yuchi@yuchi-MSI:~/Documents/00_data/sentinel/AHBB/stacks/mintpy$ view.py -h
usage: view.py [-h] [-n [NUM [NUM ...]]] [--nosearch] [--ex [Dset [Dset ...]]]
[--show-kept] [--noverbose]
[--math {reverse,rad2deg,sqrt,deg2rad,inverse,square}]
[-v VMIN VMAX] [-u UNIT] [--nd NO_DATA_VALUE] [--wrap]
[--wrap-range MIN MAX] [--interp INTERPOLATION]
[--alpha TRANSPARENCY] [--flip-lr] [--flip-ud] [--noflip]
[--nmli NUM] [--nomultilook] [--style {scatter,image}]
[--scatter-size SIZE] [-d DEM_FILE] [--mask-dem]
[--dem-noshade] [--dem-nocontour] [--dem-blend]
[--contour-smooth NUM] [--contour-step NUM] [--contour-lw NUM]
[--shade-az DEG] [--shade-alt DEG] [--shade-min MIN]
[--shade-max MAX] [--shade-exag NUM] [--shade-frac NUM]
[--base-color NUM] [--blend-mode STR] [--fontsize FONT_SIZE]
[--fontcolor FONT_COLOR] [--nowhitespace] [--noaxis] [--notick]
[--ylabel-rot YLABEL_ROT] [-c COLORMAP] [--cm-lut NUM]
[--cm-vlist CMAP_VLIST CMAP_VLIST CMAP_VLIST] [--nocbar]
[--cbar-nbins NUM | --cbar-ticks NUM [NUM ...]]
[--cbar-ext {max,None,min,both,neither}]
[--cbar-label CBAR_LABEL] [--cbar-loc CBAR_LOC]
[--cbar-size CBAR_SIZE] [--notitle] [--title-in]
[--title FIG_TITLE] [--title4sen] [--figsize WID LEN]
[--dpi DPI]
[--figext {.emf,.eps,.pdf,.png,.ps,.raw,.rgba,.svg,.svgz}]
[--fignum NUM] [--nrows NUM] [--ncols NUM]
[--wspace FIG_WID_SPACE] [--hspace FIG_HEI_SPACE]
[--no-tight-layout] [--coord {geo,radar,yx}] [--animation]
[--show-gnss] [--gnss-source {GENERIC,UNR,SIDESHOW,ESESES}]
[--gnss-comp {hz2los,enu2los,vert,up2los,horz}]
[--ref-gnss SITE_NAME] [--ex-gnss [SITE_NAME [SITE_NAME ...]]]
[--gnss-start-date YYYYMMDD] [--gnss-end-date YYYYMMDD]
[--horz-az NUM] [--gnss-redo] [--gnss-label] [--mask-gnss]
[--gnss-ms NUM] [-m FILE] [--mask-vmin MASK_VMIN]
[--mask-vmax MASK_VMAX] [--zm] [--coastline {110m,10m,50m}]
[--coastline-lw NUM] [--faultline FAULTLINE_FILE]
[--faultline-lw NUM] [--faultline-min-dist NUM] [--lalo-label]
[--lalo-step DEG] [--lalo-max-num NUM]
[--lalo-loc left right top bottom]
[--lalo-off LALO_OFFSET LALO_OFFSET] [--lalo-fs LALO_FONT_SIZE]
[--scalebar LEN X Y] [--noscalebar]
[--scalebar-pad SCALEBAR_PAD]
[--scalebar-lw SCALEBAR_LINEWIDTH] [--ram MAXMEMORY]
[--pts-marker PTS_MARKER] [--pts-ms PTS_MARKER_SIZE]
[--pts-yx Y X | --pts-lalo LAT LON | --pts-file PTS_FILE]
[--ref-date DATE] [--ref-lalo LAT LON] [--ref-yx Y X]
[--noreference] [--ref-marker REF_MARKER] [--ref-size NUM]
[-o [OUTFILE [OUTFILE ...]]] [--save] [--nodisplay] [--update]
[--sub-x XMIN XMAX] [--sub-y YMIN YMAX]
[--sub-lat LATMIN LATMAX] [--sub-lon LONMIN LONMAX]
file [dset [dset ...]]

Plot InSAR Product in 2D

optional arguments:
-h, --help show this help message and exit
--show-kept, --show-kept-ifgram
display kept interferograms only, without dropped interferograms
--noverbose Disable the verbose message printing (default: True).
--math {reverse,rad2deg,sqrt,deg2rad,inverse,square}
Apply the math operation before displaying [for single subplot ONLY].
E.g. plot the std. dev. of the variance file.
square = x^2
sqrt = x^1/2
reverse = x * -1
inverse = 1 / x
--style {scatter,image}
Plot data as image or scatter (default: image).
--scatter-size SIZE Scatter marker size in points**2 (default: 10).
--ram MAXMEMORY, --memory MAXMEMORY
Max amount of memory in GB to use (default: 4.0).
Adjust according to your computer memory.

Input File:
File/Dataset to display

file file for display
dset optional - dataset(s) to display (default: []).
-n [NUM [NUM ...]], --dset-num [NUM [NUM ...]]
optional - order number of date/dataset(s) to display (default: []).
--nosearch Disable glob search for input dset.
--ex [Dset [Dset ...]], --exclude [Dset [Dset ...]]
dates will not be displayed (default: []).

Data Display Options:
Options to adjust the dataset display

-v VMIN VMAX, --vlim VMIN VMAX
Display limits for matrix plotting.
-u UNIT, --unit UNIT unit for display. Its priority > wrap
--nd NO_DATA_VALUE, --no-data-val NO_DATA_VALUE, --no-data-value NO_DATA_VALUE
Specify the no-data-value to be ignored and masked.
--wrap re-wrap data to display data in fringes.
--wrap-range MIN MAX range of one cycle after wrapping (default: [-3.141592653589793, 3.141592653589793]).
--interp INTERPOLATION, --interpolation INTERPOLATION
matplotlib interpolation method for imshow, e.g.:
none, antialiased, nearest, bilinear, bicubic, spline16, sinc, etc. Check more at:
https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html
--alpha TRANSPARENCY Data transparency.
0.0 - fully transparent, 1.0 - no transparency.
--flip-lr flip left-right
--flip-ud flip up-down
--noflip turn off auto flip for radar coordinate file
--nmli NUM, --num-multilook NUM, --multilook-num NUM
multilook data in X and Y direction with a factor for display (default: 1).
--nomultilook, --no-multilook
do not multilook, for high quality display.
If multilook is True and multilook_num=1, multilook_num will be estimated automatically.
Useful when displaying big datasets.

DEM:
display topography in the background

-d DEM_FILE, --dem DEM_FILE
DEM file to show topography as background
--mask-dem Mask out DEM pixels not coincident with valid data pixels
--dem-noshade do not show DEM shaded relief
--dem-nocontour do not show DEM contour lines
--dem-blend blend the DEM shade with input image to have a GMT-like impression.
--contour-smooth NUM [Contour] Topography contour smooth factor - sigma of Gaussian filter.
Set to 0.0 for no smoothing; (default: 3.0).
--contour-step NUM [Contour] Topography contour step in meters (default: 200.0).
--contour-lw NUM, --contour-linewidth NUM
[Contour] Topography contour linewidth (default: 0.5).
--shade-az DEG [Shade] Azimuth angle (0-360, degrees clockwise from North) of the light source (default: 315.0).
--shade-alt DEG [Shade] Altitude (0-90, degrees up from horizontal) of the light source (default: 45.0).
--shade-min MIN [Shade] Minimum height of shaded relief topography (default: -4000.0 m).
--shade-max MAX [Shade] Maximum height of shaded relief topography (default: max(DEM)+2000 m).
--shade-exag NUM [Shade] Vertical exaggeration ratio (default: 0.5).
--shade-frac NUM [Blend] Increases/decreases the contrast of the hillshade (default: 0.5).
--base-color NUM [Blend] Topograhpy basemap greyish color ranges in [0,1] (default: 0.7).
--blend-mode STR [Blend] Type of blending used to combine the colormapped data with illumated topography.
(choices: hsv, soft, overlay; default: overlay).
https://matplotlib.org/stable/gallery/specialty_plots/topographic_hillshading.html

Figure:
Figure settings for display

--fontsize FONT_SIZE font size
--fontcolor FONT_COLOR
font color (default: k).
--nowhitespace do not display white space
--noaxis do not display axis
--notick do not display tick in x/y axis
--ylabel-rot YLABEL_ROT
Y-axis tick label rotation in degree anti-clockwisely (default: None).
Set to 90 for a vertical y-axis tick labels
-c COLORMAP, --colormap COLORMAP
colormap used for display, i.e. jet, cmy, RdBu, hsv, jet_r, viridis, etc.
More at https://mintpy.readthedocs.io/en/latest/api/colormaps/
--cm-lut NUM, --cmap-lut NUM
number of increment of colormap lookup table (default: 256).
--cm-vlist CMAP_VLIST CMAP_VLIST CMAP_VLIST, --cmap-vlist CMAP_VLIST CMAP_VLIST CMAP_VLIST
list of 3 float numbers, for truncated colormap only (default: [0.0, 0.7, 1.0]).
--nocbar, --nocolorbar
do not display colorbar
--cbar-nbins NUM number of bins for colorbar.
--cbar-ticks NUM [NUM ...]
colorbar ticks.
--cbar-ext {max,None,min,both,neither}
Extend setting of colorbar; based on data stat by default.
--cbar-label CBAR_LABEL
colorbar label
--cbar-loc CBAR_LOC colorbar location for single plot (default: right).
--cbar-size CBAR_SIZE
colorbar size and pad (default: 2%).
--notitle do not display title
--title-in draw title in/out of axes
--title FIG_TITLE, --fig-title FIG_TITLE, --figtitle FIG_TITLE
Title shown in the figure.
--title4sen, --title4sentinel1
display Sentinel-1 A/B and IPF info in title.
--figsize WID LEN figure size in inches - width and length
--dpi DPI DPI - dot per inch - for display/write (default: 300).
--figext {.emf,.eps,.pdf,.png,.ps,.raw,.rgba,.svg,.svgz}
File extension for figure output file (default: .png).
--fignum NUM number of figure windows
--nrows NUM subplot number in row
--ncols NUM subplot number in column
--wspace FIG_WID_SPACE
width space between subplots in inches
--hspace FIG_HEI_SPACE
height space between subplots in inches
--no-tight-layout disable automatic tight layout for multiple subplots
--coord {geo,radar,yx}
Display axes in geo or yx coordinates (for geocoded file only; default: geo).
--animation enable animation mode

GNSS:
GNSS data to display

--show-gnss, --show-gps
Show UNR GNSS location within the coverage.
--gnss-source {GENERIC,UNR,SIDESHOW,ESESES}, --gnss-src {GENERIC,UNR,SIDESHOW,ESESES}, --gps-source {GENERIC,UNR,SIDESHOW,ESESES}
Source of the GNSS displacement solution (default: UNR).
UNR : Nevada Geodetic Lab at Univ. of Nevada, Reno (Blewitt et al., 2018, Eos)
SIDESHOW : Jet Propulsion Lab (JPL) GNSS time series (Heflin et al., 2020, ESS)
ESESES : Enhanced Solid Earth Science ESDR System (ESESES) by JPL and SOPAC
--gnss-comp {hz2los,enu2los,vert,up2los,horz}, --gps-comp {hz2los,enu2los,vert,up2los,horz}
Plot GNSS in color indicating deformation velocity in (default: None).
--ref-gnss SITE_NAME, --ref-gps SITE_NAME
Reference GNSS site
--ex-gnss [SITE_NAME [SITE_NAME ...]], --ex-gps [SITE_NAME [SITE_NAME ...]]
Exclude GNSS sites, require --gnss-comp.
--gnss-start-date YYYYMMDD, --gps-start-date YYYYMMDD
start date of GNSS data, default: the 1st SAR acquisition
--gnss-end-date YYYYMMDD, --gps-end-date YYYYMMDD
end date of GNSS data, default: the last SAR acquisition
--horz-az NUM, --hz-az NUM
Azimuth angle (anti-clockwise from the north) of the horizontal movement in degrees
E.g.: -90. for east direction [default]
0. for north direction
Set to the azimuth angle of the strike-slip fault to show the fault-parallel displacement.
--gnss-redo, --gps-redo
Re-calculate GNSS observations in LOS direction, instead of read from existing CSV file.
--gnss-label, --gps-label
Show GNSS site name
--mask-gnss, --mask-gps
Mask out GNSS stations not coincident with valid data pixels
--gnss-ms NUM, --gps-ms NUM
Plot GNSS value as scatter in size of ms**2 (default: 6).

Mask:
Mask file/options

-m FILE, --mask FILE mask file for display. "no" to turn OFF masking.
--mask-vmin MASK_VMIN
hide pixels with mask value < vmin (default: None).
--mask-vmax MASK_VMAX
hide pixels with mask value > vmax (default: None).
--zm, --zero-mask mask pixels with zero value.

Map:
for one subplot in geo-coordinates only

--coastline {110m,10m,50m}
Draw coastline with specified resolution (default: None).
This will enable --lalo-label option.
https://scitools.org.uk/cartopy/docs/latest/reference/generated/cartopy.mpl.geoaxes.GeoAxes.html
--coastline-lw NUM, --coastline-linewidth NUM
Coastline linewidth (default: 1).
--faultline FAULTLINE_FILE
Draw fault line using specified GMT lonlat file.
--faultline-lw NUM, --faultline-linewidth NUM
Faultline linewidth (default: 0.5).
--faultline-min-dist NUM, --faultline-min-len NUM
Show fault segments with length >= X km (default: 0.1).
--lalo-label Show N, S, E, W tick label for plot in geo-coordinate.
Useful for final figure output.
--lalo-step DEG Lat/lon step for lalo-label option.
--lalo-max-num NUM Maximum number of lalo tick label (default: 3).
--lalo-loc left right top bottom
Draw lalo label in [left, right, top, bottom] (default: [1, 0, 0, 1]).
--lalo-off LALO_OFFSET LALO_OFFSET, --lalo-offset LALO_OFFSET LALO_OFFSET
Distance between tick and label in points (default: None).
Set to negative value, e.g. -36 -18, to move the ticklabel inside the plot.
--lalo-fs LALO_FONT_SIZE, --lalo-fontsize LALO_FONT_SIZE
Lalo label font size in points (default: None).
--scalebar LEN X Y scale bar distance and location in ratio (default: [0.2, 0.2, 0.1]).
distance in ratio of total width
location in X/Y in ratio with respect to the lower left corner
--scalebar 0.2 0.2 0.1 #for lower left corner
--scalebar 0.2 0.2 0.8 #for upper left corner
--scalebar 0.2 0.8 0.1 #for lower right corner
--scalebar 0.2 0.8 0.8 #for upper right corner
--noscalebar, --nosbar
do not display scale bar.
--scalebar-pad SCALEBAR_PAD, --sbar-pad SCALEBAR_PAD
scale bar label pad in ratio of scalebar width (default: 0.05).
--scalebar-lw SCALEBAR_LINEWIDTH, --scalebar-linewidth SCALEBAR_LINEWIDTH
scale bar symbol line width (default: 2.0).

Point:
Plot points defined by y/x or lat/lon

--pts-marker PTS_MARKER
Marker of points of interest (default: k^).
--pts-ms PTS_MARKER_SIZE
Marker size for points of interest (default: 6.0).
--pts-yx Y X Point in Y/X
--pts-lalo LAT LON Point in Lat/Lon
--pts-file PTS_FILE Text file for point(s) in lat/lon column

Reference date / point:
Modify reference in time / space for display

--ref-date DATE Change reference date for display
--ref-lalo LAT LON Change reference point in LAT/LON for display
--ref-yx Y X Change reference point in Y/X for display
--noreference do not show reference point
--ref-marker REF_MARKER
marker of reference pixel (default: ks).
--ref-size NUM marker size of reference point (default: 6).

Save/Output:
Save figure and write to file(s)

-o [OUTFILE [OUTFILE ...]], --outfile [OUTFILE [OUTFILE ...]]
save the figure with assigned filename.
By default, it's calculated based on the input file name.
--save save the figure
--nodisplay save and do not display the figure
--update enable update mode for save figure: skip running if
1) output file already exists AND
2) output file is newer than input file.

Subset:
Display dataset in subset range

--sub-x XMIN XMAX, --subset-x XMIN XMAX
subset display in x/cross-track/range direction
--sub-y YMIN YMAX, --subset-y YMIN YMAX
subset display in y/along-track/azimuth direction
--sub-lat LATMIN LATMAX, --subset-lat LATMIN LATMAX
subset display in latitude
--sub-lon LONMIN LONMAX, --subset-lon LONMIN LONMAX
subset display in longitude

example:
view.py velocity.h5
view.py velocity.h5 velocity --wrap --wrap-range -2 2 -c cmy --lalo-label
view.py velocity.h5 --ref-yx 210 566 #change reference pixel for display
view.py velocity.h5 --sub-lat 31.05 31.10 --sub-lon 130.05 130.10 #subset in lalo / yx
view.py velocity.h5 velocity --mask waterBody.h5 --mask-vmax 1
view.py velocity.h5 velocity --style scatter --scatter-size 12

view.py timeseries.h5
view.py timeseries.h5 --ref-date 20101120 #change reference date
view.py timeseries.h5 --ex drop_date.txt #exclude dates to plot
view.py timeseries.h5 '*2017*' '*2018*' #all acquisitions in 2017 and 2018
view.py timeseries.h5 20200616_20200908 #reconstruct interferogram on the fly

view.py ifgramStack.h5 coherence
view.py ifgramStack.h5 unwrapPhase- #unwrapPhase only in the presence of unwrapPhase_bridging
view.py ifgramStack.h5 -n 6 #the 6th slice
view.py ifgramStack.h5 20171010_20171115 #all data related with 20171010_20171115
view.py ifgramStack.h5 'coherence*20171010*' #all coherence related with 20171010

# GNSS (for one subplot in geo-coordinates only)
view.py geo_velocity_msk.h5 velocity --show-gnss --gnss-label #show locations of available GPS
view.py geo_velocity_msk.h5 velocity --show-gnss --gnss-comp enu2los --ref-gnss GV01
view.py geo_velocity_msk.h5 velocity --show-gnss --gnss-comp enu2los --ref-gnss GV01 --gnss-source ESESES
view.py geo_timeseries_ERA5_ramp_demErr.h5 20180619 --ref-date 20141213 --show-gnss --gnss-comp enu2los --ref-gnss GV01

# Faults
view.py filt_dense_offsets.bil range --faultline simple_fault_confident.lonlat

# Save and Output
view.py velocity.h5 --save
view.py velocity.h5 --nodisplay
view.py geo_velocity.h5 velocity --nowhitespace

4. 其余GNSS点命令

1
2
3
4
5
6
7
8
9
10
11
# 修改DEM_PATH 
# 记得修改参数 -n 表示需要处理的swath,每次的输入都不同,参考xml文件!

# HECX
stackSentinel.py -s $SLC_PATH -w $INSAR_WORK_DIR -a $AUX_PATH -d $DEM_PATH/demLat_N38_N39_Lon_E116_E117.dem.wgs84 -o $ORBIT_PATH -n 1 -b '38.43 38.49 116.91 116.96' --useGPU -C geometry -c 3 -z 1 -r 6 -f 0.6 --num_proc 4


# SDJX

# XIAA


ISCE2与Mintpy处理GNSS点SAFE数据
https://mengyuchi.gitlab.io/2025/07/17/ISCE2与Mintpy处理GNSS点SAFE数据/
Author
Yuchi Meng
Posted on
July 17, 2025
Licensed under