Skip to main content

Seismic event classification package

Project description

seisclass

Seismic event classification package for identifying natural and non-natural earthquakes.

Overview

seisclass is a Python package designed to classify seismic events using machine learning models. It provides one main function:

  • check_seed: Analyzes a seismic data file (SEED format) with corresponding phase file, returning a comma-separated result string: event_type,earthquake_prob,explode_prob,collapse_prob

For detailed information about the program and to cite it in your research publications, please refer to the following papers:

[1] Jia, L., Chen, H., & Xing, K. (2022). Rapid classification of local seismic events using machine learning. Journal of Seismology, 26(5), 897-912.

[2] Jia, L., Chen, S., Li, Y., & Zheng, P. (2025). A Semisupervised Seismic Events Classifier Based on Generative Adversarial Network. Seismological Research Letters, 96(3), 2039-2051.

Git-Repository: https://github.com/epnet2018/seisclass

Usage

Basic Usage

from seisclass import check_seed
# Analyze a SEED file with corresponding phase file
result = check_seed('path/to/seed/file', 'path/to/phase/file')
print(result)

phase file format

The phase file should be in the following format:

station,channel,time,phase

where station is the station code, channel is the channel code, time is the arrival time of the phase, and phase is the phase type (e.g., P, S).

Net_code Sta_code Loc_id Chn_code Phase_name Phase_time Phase_time_frac Resi Mag_val Distance Azi XX XXXXX 00 HHZ P 2025-09-20 03:20:39 7600 -1.903390 2.391120 53.238400 339.952000 YY YYYYY 00 HHZ P 2025-09-20 03:20:46 4100 -2.548810 2.651560 104.083000 90.712900

Installation

You can install the package from PyPI:

pip install seisclass

Or install from source:

pip install .

Dependencies

  • numpy
  • obspy
  • tensorflow
  • keras
  • joblib
  • scikit-learn
  • pandas

Advanced Usage

# Specify a different model
result = check_seed('path/to/seed/file', 'path/to/phase/file', model_str='251111nw')

Testing

To run the tests:

pytest

License

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

Authors

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

seisclass-0.2.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

seisclass-0.2.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file seisclass-0.2.0.tar.gz.

File metadata

  • Download URL: seisclass-0.2.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.6

File hashes

Hashes for seisclass-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5105c7ad3bd15a9b1ff4d1b484e039d5d436266c2a35e0d717eb35a83b8ca866
MD5 0b57627e597d51318750419db92fc1f2
BLAKE2b-256 596e7620a82c88c595bad8e8f6eccb8e70e279efdb1c876266b2191b70f65442

See more details on using hashes here.

File details

Details for the file seisclass-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: seisclass-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.6

File hashes

Hashes for seisclass-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6eeadf2506a0ece875792cafa8fc0d21bf2949a2dcc20c71bb453c138fac424a
MD5 7b04d25c219a8ca8a251d383f8ef69b3
BLAKE2b-256 af285d5865984880e3837622c077b21e3ae82bbcc9a3f09beecff0292aeac58f

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