Scroll to navigation

MINTPY-GENERATE_MASK(1) User Commands MINTPY-GENERATE_MASK(1)

NAME

mintpy-generate_mask - Generate mask file from input file

DESCRIPTION

usage: generate_mask.py [-h] [-o OUTFILE] [--keep-nan] [--revert] [-m VMIN]

[-M VMAX] [-p MINPIXELS] [--vx XMIN XMAX]
[--vy YMIN YMAX] [--vroipoly] [--vstd] [--vstd-num VSTD_NUM] [-x XMIN XMAX] [-y YMIN YMAX] [--ex-circle X Y RADIUS] [--in-circle X Y RADIUS] [--base BASE_FILE] [--base-dset BASE_DATASET] [--base-value BASE_VALUE] [--roipoly] [--view-cmd VIEW_CMD] [--nonzero] [--update] file [dset]

Generate mask file from input file

positional arguments:

input file
date of timeseries, or date12 of interferograms to be converted

options:

show this help message and exit
output file name.
Do not exclude pixels with NaN value
revert 0 and 1 value of output mask file
minimum value for selected pixels
maximum value for selected pixels
minimum cluster size in pixels, to remove small pixel clusters.
mask according to the formula: |velocity| > a * velocityStd
multiple of velocityStd (a) to use for cutoff
Select all non-zero pixels. i.e. maskConnComp.h5 from ifgramStack.h5
Enable update checking for --nonzero option.

AOI for threshold:

Define the AOI for thresholding operations.
AOI range in X for threshold operation (and keep the rest untouched.)
AOI range in Y for threshold operation (and keep the rest untouched.)
AOI via interactive polygonal region of interest (ROI) selection.

AOI:

define secondary area of interest
selection range in x/cross-track/range direction
selection range in y/along-track/azimuth direction
exclude area defined by an circle (x, y, radius) in pixel number
include area defined by an circle (x, y, radius) in pixel number
exclude pixels == base_value output_mask[base_data == base_value] = 0
dataset in base_file to be used, for file with multiple datasets. i.e.: --base inputs/geometryRadar.h5 --base-dset shadow --base-value 1
value of pixels in base_file to be excluded. Default: 0
Interactive polygonal region of interest (ROI) selection.
view.py command to facilitate the AOI selection.E.g. "-v -0.1 0.1"

example:

temporalCoherence.h5 -m 0.7 -o maskTempCoh.h5
temporalCoherence.h5 -m 0.7 -o maskTempCoh.h5 --base inputs/geometryRadar.h5 --base-dset shadow --base-value 1
avgSpatialCoh.h5 -m 0.7 --base waterMask.h5 -o maskSpatialCoh.h5
# exclude area by min/max value and/or subset in row/col direction generate_mask.py 081018_090118.unw -m 3 -M 8 -y 100 700 -x 200 800 -o mask_1.h5
# exclude pixel cluster based on minimum number of pixels generate_mask.py maskTempCoh.h5 -p 10 mask_1.h5
# exclude pixels with large velocity STD: |velocity| > cutoff (2 by default) * velocityStd generate_mask.py velocity.h5 --vstd generate_mask.py velocity.h5 --vstd --vstd-num 3
# exclude / include an circular area generate_mask.py maskTempCoh.h5 -m 0.5 --ex-circle 230 283 100 -o maskTempCoh_nonDef.h5 generate_mask.py maskTempCoh.h5 -m 0.5 --in-circle 230 283 100 -o maskTempCoh_Def.h5 # maskout an area within a circle AND with height smaller than a threshold generate_mask.py inputs/geometryGeo.h5 height --in-circle 339 370 21 -M 1400 --revert -o maskCrater.h5
# use an specific dataset from multiple dataset file generate_mask.py geometryRadar.dem height -m 0.5 -o waterMask.h5 generate_mask.py ifgramStack.h5 unwrapPhase-20101120_20110220 -m 4
# common mask file of pixels in all connected components / with non-zero unwrapped phase generate_mask.py ifgramStack.h5 --nonzero -o maskConnComp.h5 --update
# interative polygon selection of region of interest # useful for custom mask generation in unwrap error correction with bridging generate_mask.py waterMask.h5 -m 0.5 --roipoly generate_mask.py azOff.h5 --roipoly --view-cmd "-v -0.1 0.1" generate_mask.py velocity.h5 --roipoly --view-cmd "--dem ./inputs/geometryGeo.h5 --contour-step 100 --contour-smooth 0.0"
May 2022 mintpy-generate_mask v1.3.3