Skip to content

Package Installation

Manoch Bahavar edited this page Dec 8, 2021 · 9 revisions

The Back-Projection (BP, http://ds.iris.edu/ds/products/backprojection/) product shows the beamformed time history and location of coherent short period P-wave energy generated by large earthquakes observed at three regional arrays and across the Global Seismic Network. These are generated following all global M6.5+ earthquakes.

This Python package contains the code behind the creation of BackProjection data product's plots and animations (https://ds.iris.edu/spud/backprojection). The main Python code in this package (back_projection_r2.py) can be configured via its parameter file (back_projection_param.py) and through the command line arguments. Currently, the parameters are optimized for use with four preconfigured virtual networks defined in the parameter file as NA, EU, AU, and GSN.

PYTHON REQUIREMENTS:

   This package has been tested under Python 3.8.12 on macOS 11.6, and Linux CentOS-7 
   (may work with older Python 3 versions)

   Additional required Python packages:
         . basemap              (tested with version 1.2.2)
         . obspy                (tested with version 1.2.2)
         . ffmpeg               (tested with version 4.4.1)
         . basemap-data-hires   (tested with version 1.2.2-0)

INSTALLATION:

UNPACK:

        . "src" directory contains the main code
        . "param" directory contains the parameter file
        . "lib" directory has the library Python files
        . "assets" directory contains the global trenches data file used for plotting

CONFIGURE:

    With Python configured, you should be able to run the package examples without further modifications. However:
    - if necessary, update the Python path on the first line of the src/back_projection_r2.py
    - if desired, configure the package by updating pthe aram/back_projection_param.py file
    - package will create the following directories as needed:
        data: output data files (station list and peak amplitude values)
        image: output images
        log: log directory
        metadata: metadata directory (not used)
        scratch: work directory (cleaned up after each run)
        video: output videos and video screen shots

TESTING (Back Projections for Mw 7.8 Alaska Peninsula, 2020-07-22 06:12:44):

Run the src/src/back_projection_r2.py with "-h" option (assuming you have properly configured your Python installation) and it will print a USAGE messages.

Run the first example (the low-resolution example, -f 5):

back_projection_r2.py -m 7.8 -y 55.030 -x -158.522 -z 28 -n AU -t 2020-07-22T06:12:44 -l -f 5

This will take the code through all the steps. Check the image, and video directories and data directories for the outputs.

Run the second example (the high-resolution example, -f 5 removed):

back_projection_r2.py -m 7.8 -y 55.030 -x -158.522 -z 28 -n AU -t 2020-07-22T06:12:44 -l

This will take longer to run. Check the image, and video directories and data directories for the outputs.