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

Buffering theoretical pick times #14

Closed damb closed 3 years ago

damb commented 3 years ago

For cross-correlation based earthquake detection, an earthquake is unambiguously identified by

As already mentioned in #10, cross-correlation is performed based on a unique time window without taking the relative pick offsets into consideration i.e.

the alignment is done implicitly by means of cross-correlating a unique time window i.e. t_n^{start} = t_m^{start} and t_n^{end} = t_m^{end} for any streams n, m. No alignment is done regarding pick offsets, yet.

In particular, this means that the fit is computed based on the waveforms within a common time window [t^{start_i}, t^{end_i}], exclusively. However, given that t_n^{pick} >= t_m^{pick}, and there is a match for template m (on stream m) in the time window [t^{start_{i-1}}, t^{end_{i-1}}] such that

t^{end_{i-1}} - t_m^{theoretical_pick} < offset_{nm}

, then there is most probably no match for template n (on stream n) in the corresponding time window, but in the subsequent one i.e. [t^{start_i}, t^{end_i}]. That is, an event might not be fully contained in a single cross-correlation time window, but in several subsequent time windows. Such events which are part of multiple cross-correlation time windows are not detected by the current implementation.

To fix this, a Detector instance must keep track of the t_j^{theoretical_pick} (theoretical pick time for any stream j) as long as they might be considered as still valid.

damb commented 3 years ago

Note that this approach is even required and valid, if pick offset alignment based cross-correlation is going to be implemented.

kaestli commented 3 years ago

Not sure i understand this. By how much do you move the time window after calculating a cross correlation score: by one sample? And: are you preparing the stream once for multiple templates?

damb commented 3 years ago

Not sure i understand this. By how much do you move the time window after calculating a cross correlation score: by one sample?

OT: Implementations of Seiscomp::Core::StreamApplication receive records. Usually a record contains more than just a single sample. Currently, scdetect moves the time window as far as possible. An overall score/fit is computed for a time window (which may include just a single sample - though, in general hundreds of samples are involved).

And: are you preparing the stream once for multiple templates?

OT: No. See also #7.