-
Notifications
You must be signed in to change notification settings - Fork 134
4_other_tools
For more details of the commands, use -h option to see the usage.
LiCSBAS_flt2geotiff.py -i infile -p dempar [-o outfile] [--zero2nan] [--nan2zero] [--a_nodata num] [--bigendian]
-i Path to input file (float, little endian)
-p Path to dem parameter file (EQA.dem_par)
-o Output geotiff file (Default: infile[.geo].tif)
--a_nodata Assign a specified nodata value in output (Default: nan)
"None" assigns no value as nodata
--zero2nan Replace 0 with nan (Default: NOT replace 0 with nan)
--nan2zero Replace nan with 0 (Default: NOT replace nan with 0)
--bigendian If input file is in big endian
This script makes a GeoTIFF file from an image file (only in float32 format). The geotiff file can be read by a GIS software (e.g., QGIS) and used to make a figure. Nan will be regarded as NoDataValue as default. 0 can be replaced with nan.
LiCSBAS_cum2flt.py -d yyyymmdd [-i infile] [-o outfile] [-m yyyymmdd] [-r x1:x2/y1:y2] [--mask maskfile] [--png]
-d Date to be output
-i Path to input cum file (Default: cum_filt.h5)
-o Output float32 file (Default: yyyymmdd_yyyymmdd.cum)
-m Master (reference) date (Default: first date)
-r Reference area (Default: same as info/*ref.txt)
Note: x1/y1 range 0 to width-1, while x2/y2 range 1 to width
0 for x2/y2 means all. (i.e., 0:0/0:0 means whole area).
--mask Path to mask file for ref phase calculation (Default: No mask)
--png Make png file (Default: Not make png)
This script outputs a float32 file of cumulative displacement from cum*.h5.
LiCSBAS_cum2vel.py [-s yyyymmdd] [-e yyyymmdd] [-i infile] [-o outfile] [-r x1:x2/y1:y2] [--vstd] [--sin] [--mask maskfile] [--png]
-s Start date of period to calculate velocity (Default: first date)
-e End date of period to calculate velocity (Default: last date)
-i Path to input cum file (Default: cum_filt.h5)
-o Output vel file (Default: yyyymmdd_yyyymmdd.vel[.mskd])
-r Reference area (Default: same as info/*ref.txt)
Note: x1/y1 range 0 to width-1, while x2/y2 range 1 to width
0 for x2/y2 means all. (i.e., 0:0/0:0 means whole area).
--vstd Calculate vstd (Default: No)
--sin Add sin (annual) funcsion to linear model (Default: No)
*.amp and *.dt (time difference wrt Jan 1) are output
--mask Path to mask file for ref phase calculation (Default: No mask)
--png Make png file (Default: Not make png)
This script calculates velocity and its standard deviation from cum*.h5 and outputs them as a float32 file. Amplitude and time offset of the annual displacement can also be calculated by --sin option.
LiCSBAS_color_geotiff.py -i infile [-c cmap] [-o outfile] [--cmin float] [--cmax float] [--n_color int] [--no_colorbar]
-i Input data GeoTIFF file
-c Colormap name (Default: SCM.roma_r. See below for available colormap)
- https://matplotlib.org/tutorials/colors/colormaps.html
- http://www.fabiocrameri.ch/colourmaps.php (e.g., SCM.roma)
- insar (n_color=16)
-o Output colored GeoTIFF file (Default: [infile%.tif].cmap_cmin_cmax.tif)
--cmin|cmax Min|max values of color (Default: None (auto))
--n_color Number of rgb quantization levels (Default: 256)
--no_colorbar Do not create colorbar image (name: cmap_cmin_cmax.pdf)
This script creates a colored GeoTIFF from a data GeoTIFF.
LiCSBAS_contour.py -i geotiff -c cont_int [-q cut_nodes] [-o contfile] [-a attrib] [--nodata float] [--no_zero] [--color_n colorcode] [--color_p colorcode] [--color_0 colorcode] [--width float] [--opacity float]
-i Input GeoTIFF file
-c Contour interval
-q Do not draw contours with less nodes than this number (Default: 10)
-o Output contour GeoJSON file (Default: [geotiff%.tif].cont.geojson)
-a Name for the attribute (good to include unit) (Default: geotiff file name)
--nodata Nodata value (Default: nan)
--no_zero Do not draw contours with 0
--color_[n|p|0] Color code of contours with negative, positive, 0 values.
(e.g., --color_n "#0000ff" --color_p "#ff0000", blue for negative and red for positive)
(Default: "#000000" (black) for all)
--width Width of contour lines (Default: 2)
--opacity Opacity of contour lines (Default: 0.5)
This script draws contours from a GeoTIFF file and output a GeoJSON file (with GSImaps style).
LiCSBAS_cum2tstxt.py [-p x/y] [-g lon/lat] [-i cumfile] [-o tsfile] [-r x1:x2/y1:y2] [--mask maskfile]
-p x/y coordinate of a point to be output (index range 0 to width-1)
-g Lon/Lat of a point to be output
-i Input cum*.h5 file (Default: cum_filt.h5)
-o Output txt file of time series (Default: ts_[x]_[y].txt)
-r Reference area (Default: same as info/*ref.txt)
Note: x1/y1 range 0 to width-1, while x2/y2 range 1 to width
0 for x2/y2 means all. (i.e., 0:0/0:0 means whole area).
--mask Path to mask file for ref calculation (Default: No mask)
Note: either -p or -g must be specified.
This script outputs a txt file of time series of displacement at a specified point from cum*.h5.
LiCSBAS_get_value_geo.py -i infile -p dempar -l locfile [-o outfile] [--win_size int] [--bigendian]
-i Input file (float, little endian, geocoded)
-p Dem parameter file (EQA.dem_par)
-l Text file of lists of point locations (lat lon)
-o Output text file (Default: [locfile]v.txt)
Format: lat lon x y value value_avg (x/y start from 0)
--win_size Window size of boxcar averaging, must be odd integer (Default: 3)
--bigendian If input file is in big endian
This script gets values (and x/y coordinates) from a float32 file at specified points in geographical coordinates. Average values in a boxcar window are also output.
LiCSBAS_mask_flt.py -i infile -m maskfile [-o outfile]
-i Path to input float file
-m Path to maskfile
-o Output masked float file (Default: infile.mskd)
This script masks a float32 file using a mask file.
LiCSBAS_decomposeLOS.py -f files.txt [-o outfile] [-r resampleAlg] [--out_stats]
-f Text file containing input GeoTIFF file paths of LOS displacement
(or velocity), E component, and N component
Format:
dispfile1 Efile1 Nfile1
dispfile2 Efile2 Nfile2
...
-o Prefix of output decomposed file (Default: no prefix, [EW|UD].geo.tif)
-r Resampling algorithm (Default: bilinear)
(see https://gdal.org/programs/gdalwarp.html#cmdoption-gdalwarp-r)
--out_stats Output statistics (e.g. residuals, n_data)
This script decomposes 2 (or more) LOS displacement data to EW and UD components assuming no NS displacement (neglecting NS, e.g., Wright et al., 2004, Motagh et al., 2017). Positive values in the decomposed data mean eastward and upward displacement. The multiple LOS input data can have different coverage and resolution as they are resampled to the common area and resolution during the processing.