This plugin provides a custom magnitude calculation for SeisComP, known as Class (or "Klass"), which is traditionally used in seismological practice in several countries.
This plugin is provided "as is" and is the result of an ongoing development and learning effort. It may contain bugs, errors, or inaccuracies.
No warranty of any kind is provided, express or implied. The user assumes all responsibility and risk for the use of this software. Thorough testing is strongly advised before deploying it in a production environment.
Many thanks to everyone who helped along this journey! I wanted to specifically mention:
- Ruslan Diagilev for helping with the scientific part: providing a robust information about K_Class nature;
- Dirk Rößler for spotting unnesessary complications during the SeisComP user group meeting and productive talks;
- ADD MORE
Multiple people from open source community
The development of this plugin was heavily inspired by and adapted from the MagnitudeProcessor_ML (MLh) plugin, originally developed by the Swiss Seismological Service (ETHZ/SED).
Significant portions of the class structure, configuration file handling, and processing logic are based on their work. The original authors are gratefully acknowledged for providing a robust and clear foundation that made this implementation possible.
This plugin has a known incompatibility between SeisComP API versions (as i am not using currently the same SeisComP build tags)
-
SeisComP 6.X: The
setDefaults()virtual function does not exist in theProcessing::MagnitudeProcessorbase class. To compile this plugin for SeisComP 6, you must delete or comment out the entiresetDefaults()function in theMagnitudeProcessor_K_Classclass. targetComponent() should be replaced to _usedComponent. -
SeisComP 7.X: The
setDefaults()function is part of the API and should be included. _usedComponent should be replaced to targetComponent().
The plugin will fail to compile on SeisComP 6 if the setDefaults() function is present.
- Depth: 0 - 80 km
- Distance: 0 - 1000 km
The K_Class amplitude calculation uses a custom time window strategy:
- Vertical Component: Performs a search for the maximum P-wave amplitude within a dynamic window defined strictly between the P-wave arrival and the S-wave arrival.
- Horizontal Components: Falls back to the standard
MLhamplitude search (maximum S-wave amplitude).
The magnitude is calculated using the maximum value of the P-wave on the vertical component and the S-wave on any horizontal component.
The calculation follows the formula used in the WSG software (A.P. Akimov et al., 2020):
Where:
-
$A$ is the main slope (default: 1.84). -
$Amp$ is the amplitude sum of P and S waves. -
$B(R)$ is a piecewise distance-correction term calculated as:
- Where
$l_x$ is the hypocentral distance in km.
Refer to the SeisComP .xml description file or use these default values:
| Coefficient | Default Value | Description |
|---|---|---|
l1 |
75.0 (km) | First corner epicentral distance |
l2 |
264.0 (km) | Second corner epicentral distance |
l3 |
800.0 (km) | Third corner epicentral distance |
A |
1.84 | Main slope |
a1 |
2.11 | Slope for segment |
a2 |
1.1 | Slope for segment |
a3 |
2.98 | Slope for segment |
a4 |
0.0 | Slope for segment |
b1 |
1.32 | Intercept for segment |
b2 |
3.21 | Intercept for segment |
b3 |
-1.34 | Intercept for segment |
b4 |
8.0 | Intercept for segment |
- Add the
K_Classplugin to the existing plugins in your global configuration (e.g.,global.cfg). - Set the configurable coefficients depending on your specific region, or start with the default set to compute K_Class.