swiss-seismological-service / scdetect

A computationally efficient earthquake detection module for SeisComP
https://scdetect.readthedocs.io
GNU Affero General Public License v3.0
15 stars 6 forks source link

`"triggerDuration"` not correctly applied when making use of the `"minimumArrivals"` configuration parameter #129

Closed damb closed 2 years ago

damb commented 2 years ago

While following the third offline playback example of the tutorial and playing around with the configuration I noted some inconsistencies regarding the first detector configuration ("detectorId": "detector-01"). The configuration uses "minimumArrivals": 5, i.e. according to the documentation a detection should be declared as soon as the number of associated phases is >= 5. Although, this works perfectly fine the duration between individual detections in some cases is smaller than the configured "triggerDuration". E.g. "detector-01" uses "triggerDuration": 0.5, however there are 4 detections with origin times

2019-11-05T04:23:29.006707Z
2019-11-05T04:23:29.040707Z
2019-11-05T04:23:47.611707Z
2019-11-05T04:23:47.648707Z

Instead, I'd expect to obtain two detections, only.

The issue is caused by the fact that in the current implementation the "triggerDuration" is evaluated based on the earliest pick of the detection candidate. This approach works perfectly fine if the phase associated with the earliest pick of the template detection is included in the detection candidate. However, when making use of the "minimumArrivals" configuration parameter this is not necessarily the case anymore and as a result the final origin times between subsequent detections may be smaller than the configured "triggerDuration".