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/]

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

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)

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 Structure

seisclass/
├── seisclass/
│   ├── __init__.py          # Package initialization and API exposure
│   ├── check_wave.py        # Core functionality
│   ├── model/
│   │   └── 251111nw/         # Model files
│   ├── packages/
│   │   └── read_phase.py     # Phase file parser
│   └── resource/
│       ├── test.phase        # Test phase data
│       └── test.seed         # Test seed data
├── tests/
│   ├── __init__.py
│   └── test_checkwave.py     # Tests
├── setup.py                 # Setup configuration
├── pyproject.toml           # Modern PyPI configuration
├── README.md                # This file
├── LICENSE                  # License file
└── requirements.txt         # Dependencies

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.1.1.tar.gz (2.2 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.1.1-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for seisclass-0.1.1.tar.gz
Algorithm Hash digest
SHA256 aa6016e0da58375b789995bb4e0bf920b251a2c213a96d5caa78d0a25cfc039e
MD5 4ca26d32a95ea2199904830ef44bac93
BLAKE2b-256 9861a735693dc677e969044cd8980277d523b1771030b52cd3e37491e593e819

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seisclass-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.1 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98441778d113ff8bac89e96cf6abd2360b17e32076a4fcf6ca928adda39452f6
MD5 02be4887a1d31eb31f6c3d2ffbddc7ad
BLAKE2b-256 7635ed8c07584ae67d993ce55de6b8323bd3b1bf42a407aa89485c21a3134d14

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