finite-fault-product is a project designed to provide a number of functions in support of the ShakeMap project and earthquake event pages.
If you already have a miniconda or anaconda Python 3.X environment:
conda install impactutils
conda install libcomcat
conda install lxml
conda install numpy
conda install openquake.engine
conda install openpyxl
conda install pandas
pip install git+https://github.com/hschovanec-usgs/finite-fault-product.git
Automatic environment creation using miniconda:
git clone https://github.com/hschovanec-usgs/finite-fault-product.git
cd finite-fault-product
bash install.sh
conda activate faultproduct
Load finite fault data and create products.
Designed to analyze finite fault models and time series.
fault.py
Class to analyze fault models.
fault.io is designed to read finite fault data from fsp, dat, and syn files.
fsp.py
Load rupture model.timeseries.py
Load data and synthetic seismograms.
product is designed to create eventpages and ShakeMap products.
web_product.py
Create web product from time series and fault data. (Under construction)pdl.py
Contains methods for sending products to pdl.shakemap_product.py
Create shakemap product from time series and fault data. (Unavailable)
Includes functionality to send a finite fault product.
usage: sendproduct [-h] [-ffm2 FFM2] [-v COMMENT] [-r] net eventid ffm1
Send a finite fault product for event pages.
Positional arguments | |
---|---|
eventsource | Source of the original event ID. (example: us, usp, ci). |
source | Source of this product (i.e., contributor of the product. example: us). |
eventid | Event identification code. |
ffm1 | Directory where all files are contained for the finite fault model |
Optional arguments | |
---|---|
-h, --help | Show the help message and exit |
-ffm2 FFM2 | Directory where all files are contained for the second finite fault model |
-v COMMENT, --version COMMENT | Add a version number to the finite fault output |
-r, --review | Create product, but do not send to PDL |
Includes functionality to view a finite fault product.
usage: getproduct [-h] [-t] [-c HOST] source eventid directory
Get the latest finite-fault product for an event.
Positional arguments | |
---|---|
source | Source code (example: us). |
eventid | Event identification code. |
directory | Directory where all files will be written. |
Optional arguments | |
---|---|
-h, --help | Show the help message and exit |
-t, --two-model | This finite fault has two solutions. |
-c HOST, --comcat-host HOST | Comcat host. Default is earthquake.usgs.gov |
Includes functionality to delete a finite fault product. usage: deleteproduct [-h] [-t] [-m MODEL] eventsource source eventid
Delete a finite-fault product for an event.
Positional arguments | |
---|---|
eventsource | Source of the original event ID. (example: us, usp, ci). |
source | Source of this product (i.e., contributor of the product. example: us). |
eventid | Event identification code. |
Optional arguments | |
---|---|
-h, --help | Show the help message and exit |
-t, --two-model | This finite fault has two solutions. |
-m MODEL, --model-number MODEL | Model number to delete. |
See docs for more detailed explanations.