Skip to content

Matlab scripts for decomposing multiple line-of-sight InSAR velocity fields into East and Vertical components.

License

Notifications You must be signed in to change notification settings

JackDMcGrath/decompose_insar_velocities

 
 

Repository files navigation

decompose_insar_velocities

"decompose_insar_velocities" (DIV) is an open-source set of matlab scripts for performing a velocity decomposition (e.g. Watson et al. 2022, and references therein) on multiple overlapping InSAR velocity fields. The code has been written to use InSAR LOS velocities generated by LiCSBAS (https://github.com/yumorishita/LiCSBAS), using interferograms from the COMET-LiCS project (https://comet.nerc.ac.uk/COMET-LiCS-portal/), although any LOS velocities may be used if they are correctly formatted as geotifs.

Written for Matlab 2020a and should work with all newer versions. For older versions, the main change is replacing tiledlayout with subplot.

This is research code provided to you "as is" with no warranties of correctness.

Andrew Watson, 2022

Watson, A. R., Elliott, J. R., & Walters, R. J. (2022). Interseismic Strain Accumulation Across the Main Recent Fault, SW Iran, From Sentinel‐1 InSAR Observations. Journal of Geophysical Research: Solid Earth, 127(2), e2021JB022674.


Example

The example directory contains velocities for four frames (two ascending and two descending) over the North Anatolian Fault in Turkey. These have been generated at 1 km resolution using LiCSBAS. To run the tutorial after cloning/downloading this repository, simply run decompose_insar_velocities('example/north_anatolian_fault.conf') in the Matlab command window with the main repository directory set as your path.


Processing stages

DIV works through the following processing steps, many of which can be altered using within the config file.

  1. Read the input parameter file that defines how the rest of the script will function.
  2. Load the line-of-sight velocities, uncertainties, and look vector components for all frames. These are stored in a Matlab cell array, as the dimensions may vary. Optionally, also load a mask, interpolated GNSS velocities, and fault and border polygons for plotting.
  3. Check and downsample the look vector components if required.
  4. Optionally perform additional downsampling of all inputs.
  5. Optionally scale the velocity uncertainties using a semivariogram to mitigate the impact of the reference point (Ou et al. 2022).
  6. Interpolate inputs onto a common grid, required so that we can perform calculations using data from multiple inputs.
  7. Optionally merge adajcent frames along-track. If adjacent frames do not overlap, either because they are spatially seperated or because of masking, then the track will be split into two subtracks.
  8. Optionally correct for the "reference frame effect" (Stephenson et al. 2022), which can produce velocity ramps in the range direction. Requires ITRF2014 plate velocities in No-Net-Rotation. These can be generated using the Unavco Plate Motion Calculator (https://www.unavco.org/software/geodetic-utilities/plate-motion-calculator/plate-motion-calculator.html).
  9. Shift the relative los-of-sight InSAR velocities into a common reference frame, by tying them to GNSS velocities. This is required to perform the decomposition.
  10. Optionally generate frame overlap statistics, useful for assessing noise in the InSAR velocities.
  11. Perform the velocity decomposition to estimate East and Vertical velocities.
  12. Optionally plot and save outputs.

Ou, Q., Daout, S., Weiss, J. R., Shen, L., Lazecký, M., Wright, T. J., & Parsons, B. E. (2022). Large‐Scale Interseismic Strain Mapping of the NE Tibetan Plateau From Sentinel‐1 Interferometry. Journal of Geophysical Research: Solid Earth, 127(6), e2022JB024176.

Stephenson, O. L., Liu, Y. K., Yunjun, Z., Simons, M., & Rosen, P. (2022). The Impact of Plate Motions on Long-Wavelength InSAR-Derived Velocity Fields. Unpublished.


Config file

The example config file provides short descriptions of each option. Below, I give further details.

para_cores (CURRENTLY DISABLED)

The number of parallel processes to run for the decomposition, which is performed pixel-by-pixel. Setting to zero use a for loop as opposed to a parfor loop.

scale_vstd

LiCSBAS generates uncertainties using bootstrapping, with a trend towards lower uncertainties close to the reference point due to a reduction in the scatter of the displacement series. This reference point bias can be mitigated by calculating the difference between all points in each uncertainty map and fitting either a spherical or exponential model. Each uncertainty is then scaled by the ratio between the sill and the model value at that distance from the reference point. See Ou et al. (2022) for a full breakdown.

scale_vstd_model

Semivariogram model used to scale the uncertainties.

  • exp - Use an exponential model.
  • sph - Use a spherical model.

ref2gnss

Shift the relative InSAR velocities for each frame/track into the same reference frame as a set of GNSS velocities. Can be performed using either GNSS station velocities (e.g. Hussain et al. 2016) or interpolated GNSS velocities (e.g. Weiss et al. 2020). See Ou et al. (2022) for another example (slightly different method).

Broad steps:

  1. Project East and North GNSS velocities into line-of-sight.
  2. Calculate residual between LOS GNSS and LOS InSAR velocities.
  3. Apply a mask to the residuals using a linear deramp and upper and lower limits, to mitigate the impact of large, short-wavelength signals (e.g. subsidece).
  4. Smooth the residuals in some manner, either through fitting a polynomial function, or by applying a spatial filter.
  5. Subtract the smoothed residuals from the InSAR.

In the case of GNSS stations, the residual is calculated using the mean of the InSAR velocities within a given radius of each station (defined below). In the case of interpolated GNSS velocities, the interpolation must be performed before running DIV.

Three options are currently included:

  • 0 - disable referencing.
  • 1 - use GNSS station velocities.
  • 2 - use GNSS interpolated velocities.

ref_type

Select how the GNSS-InSAR residual is smoothed to create the "referencing surface". Options are:

  • 1 - use a polynomial function (based on Weiss et al. 2020).
  • 2 - use a median filter, only works with interpolated GNSS velocities (ref2gnss=2) (inspired by Xu et al. 2021).

ref_poly_order

When using a polynomial to create the referencing surface (ref_type=1), set the order of the 2-D polynomial function. Options are:

  • 1 - first order (ax + by + c).
  • 2 - second order (ax^2 + b^y2 + cxy + dx + ey + f).

ref_filter_window_size

When using a median filter to create the referencing surface (ref_type=2), set the width of the filter window in terms of the number of pixels. Must be an odd number of pixels (so the map area covered by the filter will change if the resolution changes).

ref_station_radius

When referencing to GNSS station velocities (ref2gnss=1), set the radius around each station that is used to calculate the mean InSAR LOS velocity. Units are the same as the input coordinate system (e.g. in degrees for lon-lat).

ds_factor and ds_method

Applies downsampling to the input velocities, taking either the mean or the median of a given window size (ds_factor x ds_factor). This can improve the computational requirements of later steps (useful for testing). For ds_method, the options are:

  • mean
  • median

use_mask

Using pre-masked velocities can lead to smearing or shrinking of the masked area if additional downsapling is performed within DIV. Hence, I recommend providing unmasked velocities and a matching mask file, which is then optionally applied after both regridding and downsampling.

merge_tracks_along

Merge overlapping frames within each track. This requires that the frame directories have been given in order for each track, although gaps are allowed. Options are:

  • 0 - disables.
  • 1 - apply the shift to each frame, but leave the frames seperate (i.e. don't take the mean to fully merge them).
  • 2 - take the weighted mean of overlapping points, combining multiple frames into a single velocity field. Weights are 1/vstd^2.

merge_tracks_along_func

Function used to perform the track merging. This is what is fit to the overlapping pixels and then removed from the entire frame to perform the "merge".

  • 0 - mean difference.
  • 1 - first order polynomial plane (ax + by + c).
  • 2 - median difference.
  • 3 - mode difference (rounded to the nearest 0.1)

merge_tracks_across

Merge adjacent tracks into a continuous velocity field. This is an experimental method which is useful for comparing velocities with and without GNSS referencing. The LOS velocities for each track are projected into a fixed average LOS, and then the difference is minimised with a static offset. Finally, we take the mean of the overlap. Options are:

  • 0 - disables
  • 1 - enables

plate_motion

Apply a correction for the "reference frame bias" caused by absolute rigid plate motions in an ITRF reference frame (Stephenson et al. 2022). The "relative" LOS velocities produce by e.g. LiCSBAS are technically in the reference frame of the satellite orbit, which is ITRF 2014. This means that any rigid translation of a plate (i.e. not the deformation that we normally want to measure) will be captured. While this velocity tends to be nearly constant across the area of a frame, the varying LOS makes it appear as a ramp in the range direction. For more details see "https://www.essoar.org/doi/10.1002/essoar.10511538.1". This bias can be mitigated by taking rigid no-net-rotation plate velocities in ITRF (see the UNAVCO plate motion calculator) and projecting them into LOS. Options are:

  • 0 - disables
  • 1 - enables

gnss_uncer

Propagate uncertainties on the interpolated GNSS velocities through the decomposition. Options are:

  • 0 - disables
  • 1 - enables

decomp_method

Set the method for decomposing the line-of-sight velocities into East and Vertical velocities.

  • 0 - project the North GNSS velocities into line-of-sight for each frame, and subtract them from the InSAR. Then, decompose into East and Vertical (e.g. Weiss et al., 2020).
  • 1 - include the North GNSS velocities as an input to the decomposition, and solve for East, North, and Vertical.
  • 2 - decompose into East and a joint Vertical-North plane, and then split the latter into Vertical and North components (e.g. Ou et al., 2022).
  • 3 - assume North is zero.

condG_threshold

This is a threshold on the value of cond(G), where G is the design matrix for the velocity decomposition. As long as the decomposition is ran for pixels with at least one ascending and descending frame (which is currently forced), then a poorly conditioned G is unlikely to be a problem. Options are:

  • 0 - disables
  • ~0 - enables with that value

var_threshold

Threshold on the model variance (see Qm), that removes pixels for which either the East or Vertical variances are above the given value. Useful for removing particularly noisy pixels. Options are:

  • 0 - disables
  • ~0 - enables with that value

frame_overlaps

Calculate histograms of the differences between overlapping frames, both along and across track. For across-track frames, we project the velocities into a shared LOS. This is a useful test for quantifying the effectiveness of both the along-track merge and the GNSS referencing. Options are:

  • 0 - disables
  • 1 - enables

For the following parameters, the only options are 0 (disables) or 1 (enables).

save_geotif

Write the decomposed East and vertical velocities to geotiffs, using the same projection as the inputs.

save_grd

Write the decomposed East and vertical velocities to GMT grd files, using the same projection as the inputs.

save_frames

Write the regridded and modified frame velocities to geotiffs. Currently, this doesn't work with merged tracks.

save_overlaps

Write the along-track overlaps, after subtraction of a given function, to text files. Used for plotting histograms to assess the consistency between adjacent frames.

plt_faults

Plot fault traces on the decomposed velocity maps.

plt_borders

Plot country borders on the decomposed velocity maps.

plt_input_vels

Plot the input vels as a mosaic of all frames. Useful for checking that the vels have loaded in correctly.

plt_scale_vstd_indv

For each frame, plot the original uncertainties, the scaled uncertianties, and the semivariogram.

plt_scale_vstd_all

Plot all scaled uncertainties, split into ascending and descending.

plt_merge_tracks

Plot the merged tracks, split into ascending and descending.

plt_merge_along_corr

For each track, plot the original frame velocities, and the new merged velocity(s). Giving 2 as an input makes this pause on each overlap until the figures are closed.

plt_merge_along_resid

Plot the residual overlap velocities for all frames.

plt_mask_asc_desc

Plot the merged ascending and descending masks

plt_plate_motion

Plot the InSAR velocities after the plate motion correction has been applied.

plt_plate_motion_indv

Plot individual plate motion corrections, showing the original velocities, the correction, and the corrected velocities.

plt_ref_gnss_surfaces

Plot the referencing surfaces for all frames/tracks, split into ascending and descending.

plt_ref_gnss_indv

Plot the original relative velocities, the referencing surface, and the referrenced velocities for each frame/track.

plt_decomp_uncer

Plot the model uncertainties associated with the decomposed East and Vertical velocities.

plt_threshold_masks

Plot the masks for the cond(G) and model variance thresholds.


The following parameters are all paths to inputs files. I recommend using absolute paths, but relative paths will also work.

gnss_fields_file

Path to a .mat file containing the interpolated GNSS velocities.

gnss_stations_file

Path to a .csv file containing GNSS stations velocities.

faults_file

Path to a text file containing coordinates for faults (see plotting/misc/).

borders_file

Path to a .mat file containing country border polygons (see plotting/misc/).

plate_motion_file

Path to a text file containing plate velocities used to apply the plate motion correction.

out_path

Path to save output geotifs too.

out_prefix

Prefix for outputs, which then has "vE" etc. appended to it.


id_vel, id_vstd, id_e, id_n, id_u, id_mask

These are file ID's used to select which inputs to load from every given framedir. The file is selected by searching for framedir/*id*. This allows for multiple versions of the velocities to be toggled between without having to change the framedir paths.


Weiss, J. R., Walters, R. J., Morishita, Y., Wright, T. J., Lazecky, M., Wang, H., ... & Parsons, B. (2020). High‐resolution surface velocities and strain for Anatolia from Sentinel‐1 InSAR and GNSS data. Geophysical Research Letters, 47(17), e2020GL087376.

Hussain, E., Hooper, A., Wright, T. J., Walters, R. J., & Bekaert, D. P. (2016). Interseismic strain accumulation across the central North Anatolian Fault from iteratively unwrapped InSAR measurements. Journal of Geophysical Research: Solid Earth, 121(12), 9000-9019.

Xu, X., Sandwell, D. T., Klein, E., & Bock, Y. (2021). Integrated Sentinel‐1 InSAR and GNSS Time‐Series Along the San Andreas Fault System. Journal of Geophysical Research: Solid Earth, 126(11), e2021JB022579.


Input file formats

gnss_fields_file

GNSS fields file should be a .mat file containing structure with the following:

    gnss_field.x - vector of x axis coords (n)
    gnss_field.y - vector of y axis coords (m)
    gnss_field.N - grid of north gnss vels (mxn)
    gnss_field.E - grid of east gnss vels (mxn)

Optional extras:

    gnss_field.sN - grid of north 1-sigma uncertainties (mxn)
    gnss_field.sE - grid of east 1-sigma uncertainties (mxn)

gnss_stations_file

GNSS stations file should be a .csv file containing the following columns, with one row per stations:

Lon  Lat  vE  vN  sE  sN  cov

where vE and vN are the East and North velocities, sE and sN are the one-sigma uncertainties, and cov is the covariance between vE and vN.

faults_file

Text file containing fault lines for plotting. Two column (x y), with each fault segement ended by a ">". See the GEM faults in plotting/misc/ for an example.

borders_file

A .mat file containing a structure that defines country outline polygons. See borderdata.mat in plotting/misc/ for an example. This contains polygons for most countries.

    borders.lon = cell array of vectors containing the longitudes for each polygon
    borders.lat = cell array of vectors containing the latitudes for each polygon
    borders.places = cell array of strings giving the name of each polygon

plate_motion_file

Text file of plate motion velocities. Format is [lon lat East North]. No uncertainties are required.

vel

All velocities are expected to be in geotif format. These can be easily generated from LiCSBAS outputs using the LiCSBAS_flt2geotif.py function. The spatial extent and pixel spacing of the velocities is read from the geotif metadata. DIV assumes that positive velocities show motion towards the satellite (default for LiCSBAS).

vstd

One sigma uncertainties for each velocity.

mask

0 or 1 value for all velocities. 0 = mask pixel. 1 = keep pixel. Areas outside the velocity field itself can be set to NaN.

compE, compU, compN

Unit vector components (0-1) calculated from the line-of-sight and azimuth of the satellite, for each point. These are used to project ENU motion into LOS, and vice versa. Incidence angle and azimuth can be calculated from them (see vel_decomp_vE_vUN).


Acknowledgements

This work was created while completing a PhD at the University of Leeds, School of Earth and Environment, funded by the Royal Society.

These scripts were designed to work with outputs from LiCSBAS and LiCSAR, projects of COMET, the UK Natural Environment Research Council's Centre for the Observation and Modelling of Earthquakes, Volcanoes and Tectonics.

DIV uses open-access scientific colour maps from https://www.fabiocrameri.ch/colourmaps/ (Crameri et al. 2020), and fault traces from the GEM Active Fault Database (Styron and Pagani, 2020).

I would like to thank Jack McGrath for code advice and debugging, John Elliott for his guidance, and both Dehua Wang and Jessica Payne for their feedback as users.

Andrew Watson, 2022.

Crameri, F., Shephard, G. E., & Heron, P. J. (2020). The misuse of colour in science communication. Nature communications, 11(1), 1-10.

Styron, Richard, and Marco Pagani. “The GEM Global Active Faults Database.” Earthquake Spectra, vol. 36, no. 1_suppl, Oct. 2020, pp. 160–180, doi:10.1177/8755293020944182.

About

Matlab scripts for decomposing multiple line-of-sight InSAR velocity fields into East and Vertical components.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • MATLAB 95.4%
  • Shell 4.6%