Skip to main content

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

Metadata

Release files for seisclass 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seisclass 0.2.5
File Size Uploaded Provenance Actions
seisclass-0.2.5.tar.gz 1.4 MB Without provenance Details for seisclass-0.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for seisclass 0.2.5
File Interpreter ABI Platform Actions
seisclass-0.2.5-py3-none-any.whl Python 3 none any Details for seisclass-0.2.5-py3-none-any.whl

Total release size: 2.7 MB

Release files / seisclass-0.2.5.tar.gz

Download URL seisclass-0.2.5.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
963b100b07096d8c0a4b716f0f41c11c330abe1feddf47a17fc7bb8bf2b8e014
BLAKE2b-256 checksum
How to use checksums
debfaad911dc5a8587888c15b7fa0a58ea6b99a7fa65656ba516271ea7fd137f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.6

Release files / seisclass-0.2.5-py3-none-any.whl

Download URL seisclass-0.2.5-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
2eac06f6960df1eca091f06b96b60fa28659b40198349428c251a60d31a32c4f
BLAKE2b-256 checksum
How to use checksums
53002ba9998342de009415991f907cdcfdf4317b5b3864543c32ad99f0f21cb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.6

Security for seisclass 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page