This tool generates synthetic seismic event data in SeisComp XML format, useful for testing and development purposes in seismological applications.
- Creates synthetic seismic events with realistic parameters
- Generates multiple origins, magnitudes, and focal mechanisms
- Produces SeisComp-compatible XML output
- Configurable via INI file for easy customization
- Fetches station data from FDSN web services
- Calculates various magnitude types (MLv, mb, Ms(BB), Mwp, Mw, Mww)
- Creates focal mechanisms with associated moment tensors
- Provides a Graphical User Interface (GUI) for easy configuration and execution
- Python 3.7+
- SeisComp3 Python environment
- Required Python packages:
- numpy
- configparser
- requests
- obspy
- folium (for GUI map functionality)
- PyQt5 (for GUI)
- Clone the repository:
git clone [email protected]:comoglu/synthetic-eventxml-generator.git
- Navigate to the project directory:
cd seiscomp-eventxml-generator
- Install the required Python packages:
pip install numpy configparser requests obspy folium PyQt5
- Ensure SeisComP is installed and its Python libraries are in your Python path.
The config.ini
file allows you to customize various aspects of the synthetic event:
- Event parameters (location, time, type)
- Magnitude values for different types
- Focal mechanism parameters (strike, dip, rake)
- Inventory settings
- Noise levels
- Agency information
- Uncertainties
- Quality parameters
- FDSN web service URL
- Multiple origins settings
Refer to the provided config.ini
for an example configuration.
To generate a synthetic event, run:
seiscomp-python seiscomp-eventxml-generator.py config.ini inventory.xml
This will create a SeisComP XML file containing the synthetic event based on the parameters in config.ini
.
The generator produces a SeisComP XML file named synthetic_event_seiscomp_[EVENT_ID].xml
, where [EVENT_ID]
is a unique identifier for the event. This file contains:
- Event metadata
- Multiple origins with associated arrivals and magnitudes
- Focal mechanisms with moment tensors
- Station magnitudes
- Mww magnitudes linked to centroids
A summary of the generated event is printed to the console for quick reference.
To use the graphical interface:
- Run the GUI script:
python SC_GUI.py
- Use the interface to modify event parameters, magnitudes, and focal mechanisms.
- Click "Save Config" to update the
config.ini
file. - Click "Run Generator" to create the synthetic event.
- The "Dispatch Event" button can be used to send the generated event to a SeisComP system (requires proper setup).
- Ensure all dependencies are correctly installed.
- Check that SeisComP Python libraries are in your Python path.
- Verify that the
config.ini
andinventory.xml
files are in the correct locations. - For GUI issues, ensure PyQt5 is properly installed.
- If you encounter any "module not found" errors, make sure all required packages are installed.
Contributions to improve the SeisComp EventXML Generator are welcome. Please feel free to submit issues or pull requests on the GitHub repository.
This project is licensed under the MIT License - see the LICENSE file for details.
comoglu AT gmail.com