A comprehensive framework for seismic first-motion polarity picking with unified APIs.
Full documentation is available at: https://seispolarity.readthedocs.io/
Build documentation locally:
cd docs
make htmlpip install seispolaritygit clone https://github.com/Chuan1937/SeisPolarity.git
cd SeisPolarity
pip install -e .- 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:
Predictorclass with auto-download from Hugging Face/ModelScope - Data Augmentation: Comprehensive augmentation pipeline with balanced sampling
- Unified Training:
Trainerwith checkpointing, early stopping, and logging - Cross-platform Support: Works on Linux, macOS, and Windows
| 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 |
| 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) |
Pre-trained models are automatically downloaded from:
- Hugging Face: https://huggingface.co/chuanjun1978/SeisPolarity-Model
- ModelScope: https://modelscope.cn/models/chuanjun1978/SeisPolarity-Model
See the examples/ directory for complete notebooks:
- Dataset API Usage - Dataset loading and usage examples
- Predict API Usage - Model inference examples
- Model API Usage - Model architecture and initialization
- Train API Usage - Training pipeline examples
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Paper will come soon...
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
- SeisBench framework for inspiration
- Hugging Face and ModelScope for model hosting
- All dataset providers
- GitHub: https://github.com/Chuan1937/SeisPolarity
- Hugging Face: https://huggingface.co/chuanjun1978/SeisPolarity-Model
- ModelScope: https://modelscope.cn/models/chuanjun1978/SeisPolarity-Model
- Documentation: https://seispolarity.readthedocs.io/
For questions and support, please open an issue on GitHub or contact: [chuanjun1978@gmail.com]