Package: seismic-attributes
An ObsPy library for event detection and seismic attribute calculation: preparing waveforms for automated analysisThis package is an extension for the observational seismologyobspysoftware package that provides a streamlined tool tailored to the processing of seismic signals from non-earthquake sources, in particular those from deforming systems such as glaciers and landslides. Thisseismic attributeslibrary provides functionality to: (1) download and/or pre-process seismic waveform data; (2) detect and catalogue seismic events using multi-component signals from one or more seismometers; and (3) calculate characteristics ('attributes'/'features') of the identified events. The workflow is controlled by three main functions that have been tested for the breadth of data types expected from permanent and campaign-deployed seismic instrumentation. A selected STA/LTA-type (short-term average/long-term average), or other, event detection algorithm can be applied to the waveforms and user-defined functions implemented to calculate any required characteristics of the detected events. The code is written in Python 2/3 and has detailed documentation and worked examples available on GitHub (https://github.com/rossjturner/seismic_attributes).InstallationThis package can either be installed usingpipor from a .zip file downloaded from the GitHub repository using the standard Python packagedistutils.Install using pipThe following command will install the latest version of theseismic attributeslibrary from the Python Packaging Index (PyPI):pipinstallseismic_attributesInstall from GitHub repositoryThe package can be downloaded from the GitHub repository athttps://github.com/rossjturner/seismic_attributes, or cloned withgitusing:gitclonehttps://github.com/rossjturner/seismic_attributes.gitThe package is installed by running the following command as an administrative user:pythonsetup.pyinstallUnit testingThe successful installation of the package can be verified using the Python packagepytest. The unit tests require internet access to run as data is downloaded from the Incorporated Research Institutions for Seismology (IRIS) server; downloaded data will be saved in the working directory.Before the testFind the path to the installedseismic_attributespackage. If the package was installed usingpipthis is achieved as follows:pipshowseismic_attributesThe path to theseismic_attributesdirectory is shown next to 'Location:'.Running the testThe unit test is run withpytest(which should be installed withseismic_attributesby default) using the following command:pytestpath_to_directory/seismic_attributesThe unit test takes approximately 10-20 seconds to run. Five tests are conducted which verify theseismic_attributespackage is correctly linked withobspy, can download data from the IRIS server, produces an event catalogue with the expected output, and calculates attributes for events as expected.Documentation and ExamplesFull documentation of the functions included in the seismic_attributes package, in addition to worked examples, is included inseismic_attributes_user.pdfon the GitHub repository. The worked examples are additionally included in the following Jupyter notebook:seismic_attributes_example.ipynb.ContactRoss Turner <turner.rj@icloud.com>