lsforce is a Python-based single-force seismic inversion framework for massive landslides. The codes can also be applied to other seismic sources that are well-approximated as a single force (e.g., volcanic eruptions, some glacial events). The library can be used to invert long period (tens to hundreds of seconds) seismic waveforms to estimate a time series vector of single forces that represents the equivalent forces exerted on the Earth by the landslide (see example output figure below).
The following has only been tested on macOS.
Clone this repo and run the installation script, which creates a
conda environment named
lsforce and installs
the lsforce package into the environment:
git clone https://code.usgs.gov/ghsc/lhp/lsforce.git cd lsforce bash install.sh # Or `bash install.sh 1` if you want developer tools as well
brew install gcc
Complete the CPS license form, download the resulting archive, and unzip
Move the directory
PROGRAMS.330to where you’d like to install, then:
cd PROGRAMS.330 ./Setup OSX40 ./C
Add the executables to
PATHby adding the following line to e.g.
The latest interactive documentation is visible online here.
To instead build the interactive documentation yourself, first ensure that you installed
the developer tools (
bash install.sh 1), which are required for documentation
conda activate lsforce cd doc make html open _build/html/index.html # macOS command to open file in browser
The lsforce package includes a script,
which can convert 1D Earth models from Syngine into CPS model files. These models can
then be further modified for specific use cases. In addition, completely custom CPS
model files can be provided; for more information on CPS model files, see Chapter 8 of the
CPS documentation. The
lsforce conda environment must be active for the script to be available.
Usage examples for the two currently-supported parameterization methods are given in the
three Jupyter Notebooks
example_lamplugh.ipynb, which are located in the
notebooks directory. To open the notebooks, run:
conda activate lsforce jupyter notebook notebooks
This will start a Jupyter Notebook server and open a new window or tab in your browser with the interactive notebooks displayed.
Tests are located in the
tests directory. To run the tests, first ensure that you
installed the developer tools (
bash install.sh 1), which are required for testing.
conda activate lsforce pytest
Allstadt, K. E., & Toney, L. (2020). lsforce (Version 1.0.1) [Source code]. U.S. Geological Survey Software Release. https://doi.org/10.5066/P9CR20KW
Toney, L., & Allstadt, K. E. (2021). lsforce: A Python-based single-force seismic inversion framework for massive landslides. Seismological Research Letters, 92(4), 2610–2626. https://doi.org/10.1785/0220210004