A GUI-based software for seismic site station selection data processing and analyzing based on Python.
- Multi-format Data Support: Plugin architecture for various seismic formats (MSEED, SAC, SEGY, ZW, and proprietary formats)
- Data Processing Tools: File cutting, merging, and format conversion
- Parameter Testing: Real-time Power Spectral Density parameter test
- PSD calculation & Analysis: PSD calculation and analysis using various methods.
- Visualization: File plotting and interactive visualization using Matplotlib
Here are some examples showing how to use Tool4S for seismic data analysis, a step-by-step instruction is provided in example_data:
Start by creating a new project and selecting your working directory:
- Launch Tool4S
- Go to File > Project Parameters
- Set your project parameters
Process your raw seismic data files:
- Select the file in the project browser
- Use the Tools menu to access processing options
- Cut, merge or convert files as needed
Calculate Power Spectral Density:
- Select processed files
- Open the PSD Calculation dialog
- Configure parameters (window size, overlap, etc.)
- Run the calculation
Analyze your results:
- View PSD plots with noise model comparisons
- Generate PDF reports
- Export results for further analysis
We have tested the installation on Windows 10 and Ubuntu 18.04.
# Clone repository
git clone https://github.com/dingbule/tool4s.git
cd tool4s
# Create and activate conda environment with Python 3.8
conda create -n tool4s python=3.8
conda activate tool4s
# Install dependencies
pip install -r requirements.txt
# Run application
python __main__.py# Clone repository
git clone https://github.com/dingbule/tool4s.git
cd tool4s
# Install dependencies
pip install -r requirements.txt
# Run application
python __main__.pyWe provide a pre-built executable for Windows 10 in the Application folder. You can download it to use Tool4S directly.
# Build executable (Windows)
pyinstaller main.specThe executable will be created in the dist folder. If you build your own executable, you should put it in the Application folder where several necessary DLL files are alreadly located.
Note: The executable build has only been tested on Windows 10. The
hooksandrthooksfolders are required for the PyInstaller build process.
tool4s/
├── core/ # Core processing modules
│ ├── psd.py # Power Spectral Density calculator
│ └── data/ # Reference data including noise models
├── gui/ # User interface components
│ ├── dialogs/ # Application dialog windows
│ └── plot_widget.py # Visualization components
├── plugins/ # Data format readers
│ ├── mseed_reader.py
│ ├── sac_reader.py
│ └── ...
├── utils/ # Utility functions and helpers
├── __main__.py # Application entry point
├── requirements.txt # Dependencies
*Used to built your own executables
├── Application/ # Pre-built executables
├── rthooks # Used by pyinstaller
├── hooks # Used by pyinstaller
├── main.spec # Used by pyinstaller
├── build # Created by pyinstaller
└── dist # Created by pyinstaller
*Folder and file created while Tool4S starts up once
├── logs # logs
└── config.ini # config for Tool4S
- Launch the application and set your project directory
- Configure parameters in the settings dialog
- Set output folder location
- Configure project-specific parameters
- Process raw data files using the Tools menu
- Cut, merge, or convert seismic data files
- Prepare data for PSD calculation
- Perform PSD analysis
- Test different PSD parameters to optimize results
- Run batch PSD calculations on multiple files
- Analyze results
- Compare with standard noise models (NHNM/NLNM)
- Generate PDF reports and visualizations
Tool4S implements advanced PSD calculation for seismic data:
- Detrending and sensitivity correction
- Optional high-pass and band-pass filtering
- Welch's method with configurable window parameters
- Instrument response removal
- Octave-based smoothing for noise analysis
- Comparison with New High/Low Noise Models
The application uses a plugin architecture for reading different seismic data formats:
- Base reader interface with standardized methods
- Support for common formats (MSEED, SAC, SEGY, etc)
- Easy extension for custom or proprietary formats
- Python: 3.8
- Scientific: numpy, scipy, matplotlib, obspy
- GUI: PyQt5
- Build(optional): pyinstaller
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Tool4S - Making seismic analysis accessible and efficient.



