Skip to main content

Simplified machine-learning driven earthquake detection, location, and analysis

Project description

easyQuake

Simplified machine-learning driven earthquake detection, location, and analysis in one easy-to-implement python package.

If you find this useful, please cite:

Walter et al. (in prep) easyQuake: Putting machine learning to work for your regional seismic network or local earthquake study

Requirements

This code leverages machine-learning for earthquake detection. You should have suitable hardward to run CUDA/Tensorflow, which usually means some sort of GPU. This has been tested on servers with nVidia compute cards, but also runs well on a modest multi-core with gaming PC nVidia card. The event-mode can be run efficiently enough on a laptop.

Running easyQuake

The example runs easyQuake for a recent M6.5 earthquake in Idaho

from easyQuake import download_mseed
from easyQuake import daterange
from datetime import date
from easyQuake import combine_associated
from easyQuake import detection_continuous
from easyQuake import association_continuous

from easyQuake import magnitude_quakeml
from easyQuake import simple_cat_df

import matplotlib.pyplot as plt
maxkm = 300
maxdist=300
lat_a = 42
lat_b = 47.5
lon_a = -118
lon_b = -111


start_date = date(2020, 3, 31)
end_date = date(2020, 4, 1)

project_code = 'idaho'
project_folder = '/data/id'
for single_date in daterange(start_date, end_date):
    print(single_date.strftime("%Y-%m-%d"))
    dirname = single_date.strftime("%Y%m%d")
    download_mseed(dirname=dirname, project_folder=project_folder, single_date=single_date, minlat=lat_a, maxlat=lat_b, minlon=lon_a, maxlon=lon_b)
    detection_continuous(dirname=dirname, project_folder=project_folder, project_code=project_code, single_date=single_date, machine=True,local=True)
    association_continuous(dirname=dirname, project_folder=project_folder, project_code=project_code, maxdist=maxdist, maxkm=maxkm, single_date=single_date, local=True)

cat, dfs = combine_associated(project_folder=project_folder, project_code=project_code)
cat = magnitude_quakeml(cat=cat, project_folder=project_folder,plot_event=True)
cat.write('catalog_idaho.xml',format='QUAKEML')


catdf = simple_cat_df(cat)
plt.figure()
plt.plot(catdf.index,catdf.magnitude,'.')

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • code was used from obspyck, gpd, hashpy, and others
  • would not be possible without obspy
  • this work was developed at the Oklahoma Geological Survey

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easyQuake-0.1.1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easyQuake-0.1.1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file easyQuake-0.1.1.tar.gz.

File metadata

  • Download URL: easyQuake-0.1.1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for easyQuake-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c9d22bc901bddda447dd3fbf9dfb6a0a6aff506f036417f92229bd1eae494067
MD5 b1faa3ba4aedd754edb4d15bc5e0f4a6
BLAKE2b-256 0e135a190092b7c6cffc3c28360732614e5f10b535a96063abd45293ec478e99

See more details on using hashes here.

File details

Details for the file easyQuake-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: easyQuake-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for easyQuake-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb00adcd0c1481ccd8607c7b2cdb51edd6451c8b63693e54f53417e8e770a0a5
MD5 33b712685ca9a11b192609da8900bab0
BLAKE2b-256 a44b5c11917081ea032644b15b0e6699970a60dce5abce70e8bfafb9f2e6b310

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page