Skip to main content

Framework for seismic waveform polarity picking with unified APIs

Project description

SeisPolarity

SeisPolarity Logo

A comprehensive framework for seismic first-motion polarity picking with unified APIs.

Python PyTorch License: BSD 3-Clause

Documentation

Full documentation is available at: https://seispolarity.readthedocs.io/

Build documentation locally:

cd docs
make html

Installation

Install via pip (Recommended)

pip install seispolarity

From Source

git clone https://github.com/Chuan1937/SeisPolarity.git
cd SeisPolarity
pip install -e .

Features

  • Unified Data Interface: Support for SCSN, Txed, DiTing, Instance, PNW datasets with automatic download
  • Multiple Models: Ross, Eqpolarity, APP, DiTingMotion, CFM, RPNet, PolarCAP with pre-trained weights
  • Flexible Data Loading: RAM/Disk streaming for datasets of any size
  • High-level Inference: Predictor class with auto-download from Hugging Face/ModelScope
  • Data Augmentation: Comprehensive augmentation pipeline with balanced sampling
  • Unified Training: Trainer with checkpointing, early stopping, and logging
  • Cross-platform Support: Works on Linux, macOS, and Windows

Supported Datasets

Dataset Description Samples Auto-download
SCSN Southern California Seismic Network 100k+ Yes
Txed Texas Earthquake Data 50k+ Yes
DiTing Chinese seismic network 80k+ No(must apply)
Instance Instance-based dataset 30k+ Yes
PNW Pacific Northwest 20k+ Yes

Supported Models

Model Input Length Classes
Ross (SCSN) 400 3 (U/D/N)
Eqpolarity 600 2 (U/D)
DiTingMotion 128 3 (U/D/N)
CFM 160 2 (U/D)
RPNet 400 2 (U/D)
PolarCAP 64 2 (U/D)
APP 400 3 (U/D/N)

Model Zoo

Pre-trained models are automatically downloaded from:

Examples

See the examples/ directory for complete notebooks:

Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Citation

Paper will come soon...

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Acknowledgments

  • SeisBench framework for inspiration
  • Hugging Face and ModelScope for model hosting
  • All dataset providers

Links

Contact

For questions and support, please open an issue on GitHub or contact: [chuanjun1978@gmail.com]

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

seispolarity-0.1.4.tar.gz (81.3 kB view details)

Uploaded Source

Built Distribution

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

seispolarity-0.1.4-py3-none-any.whl (96.8 kB view details)

Uploaded Python 3

File details

Details for the file seispolarity-0.1.4.tar.gz.

File metadata

  • Download URL: seispolarity-0.1.4.tar.gz
  • Upload date:
  • Size: 81.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for seispolarity-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a5079f69dacecccf63dcd6bd38a0b548aaa0f970cbc33f554f1eb3f72df965e5
MD5 12f571beaf380568a54b4f663cb384e2
BLAKE2b-256 3d3865f71e896a5863bb01bc538124e1a96f2697d8a0bdf8dbe1e47840dcbf44

See more details on using hashes here.

File details

Details for the file seispolarity-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: seispolarity-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 96.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for seispolarity-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cec3d99140d7288fbc97d3a09e8fd713a0c1a9de5e7f1e3915d270ba0e6429d7
MD5 31f71fae8d46cca4e29a647872184a26
BLAKE2b-256 36724de4a8888d467b567b781d9eb169cdf95b183dfd1583aa613f98d338ce5d

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