Step 6: Least Squares Fault Slip Inversion#
In this example we do a simple static slip inversion using least squares. We treat the displacements at the fake GPS stations in Step 4 as the “observations” and use the Green’s functions from Step 5 to invert for the fault slip that we prescribed in Step 4.
We use simple generalized inversion method with penalties to minimize the seismic moment.
The Python script invert_slip.py
will load the observations from Step 4 and Green’s functions and respones from Step 5 and invert for the slip.
$ ./invert_slip.py
# Show command line options for the inversion code
$ ./invert_slip.py --help
By default, the inversion code will write the results of the inversion to output/step06_greensfns-inversion_results.txt
.
Plotting the results#
If you are using the PyLith binary, which includes the matplotlib
Python module, or have it installed, then you can plot the results of the simulation using the viz/plot_inversion_results.py
Python script.
$ ./viz/plot_inversion_results.py
::{tip}
You can pass--no-gui
as a command line argument to the plotting script turn off displaying the plot window.
This is useful if you do not have a matplotlib GUI backend.