Presentation guide: what actually changes?¶

Method Detection rule Role
Single-station STA/LTA Energy ratio at training-selected EAB Basic baseline
Standard multi-station trigger (ObsPy) Coincident station trigger intervals Existing multi-station baseline
Travel-time-constrained association Distance-dependent timing limits, all-pairs consistency, two-stage onset/strength selection Our implemented association method

All methods use classic STA/LTA. Recursive STA/LTA is not an additional improvement in the final system.

The implementation: collect triggers at ratio 2, merge short gaps, associate strongest-first using station-pair distances, retain original onsets, then require at least two members with peak ratio 12. This is not soft voting: retained members must pass the strength gate. Every pair must satisfy the timing limit, rather than allowing a chain of unrelated triggers to connect an event.

Preprocessing removes trends, tapers segment edges and filters 2–15 Hz. Gaps are not interpolated. Validation selects thresholds under a candidate-workload budget.

The final comparison measures the complete systems, not the isolated contribution of every component. More complex ranking and geometry models were explored without a consistent advantage over the selected threshold-based system; the exploratory results appear later.

Median local scan: 0.35 s per hour of data
Process peak memory: 477 MB
Sequential local miniSEED read, preprocessing, all three detectors and catalogue matching; three runs per case; OS cache uncontrolled. Excludes network, imports and plotting. Peak RSS is for the complete benchmark process.

Detecting small earthquakes with a station network¶

AdaHack 2026 · CompSoc Challenge 7¶

Question: can we recover small earthquakes missed by a single station without creating an unmanageable review queue?

We use public BGS waveforms, classical signal processing and validation-selected thresholds. The final comparison uses three methods in order: Single-station STA/LTA, Standard multi-station trigger, and Travel-time-constrained association.

This notebook follows the complete experiment: acquisition → exploration → preprocessing → detection → parameter selection → evaluation → error analysis. Long implementations live in demo/notebook_helpers.py and demo/pipeline.py; the cells here show the decisions and figures.

Model on off minimum extension station
0 Single-station STA/LTA 8 1.2 1 0 EAB
1 Standard multi-station trigger 8 1.2 2 0 —
2 Travel-time-constrained association 12 1.2 2 0 —
No description has been provided for this image

1. Define the task¶

The input is a continuous vertical ground-motion recording, sampled at 100 Hz. The output is an event candidate: a time and the stations that support it. We then compare the detections with the official earthquake catalogue.

We want high recall for small catalogue events and a manageable number of candidates to inspect. A catalogue match gives a useful reference label; an unmatched detection is left for review.

This is a parameter-selected signal detector, not a trained earthquake/noise classifier. The train/validation/evaluation workflow still matters: choosing stations and thresholds after seeing final outcomes would give an optimistic result.

2. Acquire waveforms and catalogue records¶

  • Waveforms: BGS EIDA, GB and UR networks, channel 00.HHZ, miniSEED format.
  • Catalogue: official BGS event pages; each stored event retains its source URL, origin, coordinates, depth and magnitude.
  • Working unit: a one-hour window plus 180 seconds of context on each side.

Eight real hours are bundled, including seven featured event hours, so the presentation runs offline. Set DOWNLOAD = True to request the example again from the public waveform service. All other cells work with the saved experiment data.

channel start end samples sample_rate_hz
0 GB.INVG.00.HHZ 2026-06-07T16:56:57.720000Z 2026-06-07T18:03:03.750000Z 396604 100.0
1 GB.PGB1.00.HHZ 2026-06-07T16:56:58.030000Z 2026-06-07T18:03:02.000000Z 396398 100.0
2 GB.EAB.00.HHZ 2026-06-07T16:56:56.420000Z 2026-06-07T18:03:03.750000Z 396734 100.0
3 GB.ESK.00.HHZ 2026-06-07T16:56:57.580000Z 2026-06-07T18:03:03.750000Z 396618 100.0
4 GB.EDI.00.HHZ 2026-06-07T16:56:57.960000Z 2026-06-07T18:03:03.550000Z 396560 100.0
5 GB.KPL.00.HHZ 2026-06-07T16:56:56.820000Z 2026-06-07T18:03:03.710000Z 396690 100.0
6 GB.GVIE.00.HHZ 2026-06-07T16:56:59.810000Z 2026-06-07T18:03:03.710000Z 396391 100.0
7 UR.AR09.00.HHZ 2026-06-07T16:56:59.960000Z 2026-06-07T18:03:01.120000Z 396117 100.0
8 UR.AQ10.00.HHZ 2026-06-07T16:56:59.320000Z 2026-06-07T18:03:02.720000Z 396341 100.0
{'origin_utc': '2026-06-07T17:13:05.600000Z',
 'magnitude_ml': 1.1,
 'region': 'SILVERDALE,LANCASHIRE',
 'sources': ['https://earthquakes.bgs.ac.uk/earthquakes/recent_events/20260607171145.html']}

3. Explore the data before modelling¶

Look at magnitude, recording dates and station geometry. A nearby station can see a small earthquake clearly while a distant station sees little. The event-focused hours help measure detection recall; the continuous background periods measure review workload.

split hours dates catalogue_events purpose
0 Train 193.0 43 53 Choose the baseline station
1 Validation 54.0 21 30 Choose detector settings
2 Retrospective evaluation 187.0 23 26 Compare frozen settings
No description has been provided for this image
No description has been provided for this image

4. Preprocess real signals¶

For each clean segment:

  1. Check channel identity and 100 Hz sampling; merge identical overlaps and reject conflicting overlaps.
  2. Split at gaps. Do not interpolate missing recordings into apparent evidence.
  3. Remove the linear trend and mean, taper the edges, then apply a fourth-order 2–15 Hz band-pass.
  4. Exclude the first 60 seconds and final 5 seconds of each segment; require at least 90 valid samples per second.

The figure shows a real AR09 recording and its spectrum. The analysis uses filtered instrument counts; it does not require calibrated ground-motion amplitudes. Filtering is zero-phase for this buffered/offline analysis.

No description has been provided for this image

5. Understand the Single-station STA/LTA: short-term / long-term energy¶

Let $x_t$ be the filtered signal. We average squared amplitude, not signed amplitude: positive and negative oscillations should not cancel.

$$\mathrm{STA}(t)=\frac{1}{100}\sum_{i=0}^{99}x_{t-i}^{2},\qquad \mathrm{LTA}(t)=\frac{1}{3000}\sum_{i=0}^{2999}x_{t-i}^{2},\qquad R(t)=\frac{\mathrm{STA}(t)}{\mathrm{LTA}(t)}.$$

The short average reacts quickly to an energy burst. The long average represents the recent background. Start a trigger when $R\geq8$ and end it when $R\leq1.2$. Separate on/off thresholds avoid repeated switching near a single threshold.

The figure uses a clear AR09 event to explain the calculation. The actual Single-station STA/LTA uses EAB, selected on training dates—not the station that looks worst on the final comparison.

No description has been provided for this image

6. Why one station is not enough¶

A local transient can trigger one station. Conversely, a small earthquake can be too weak at the chosen station. A network helps by providing both confirmation and better geographic coverage.

The next figure is a synthetic illustration of those two cases. It explains the idea; the measured results below use real waveforms.

No description has been provided for this image

7. Travel-time-constrained association: event-centred multi-station association¶

There is no permanent primary station. Any station can start a candidate.

  1. Generate loose STA/LTA triggers at 2 and merge same-station intervals separated by at most 8 seconds.
  2. Start with the strongest remaining trigger. Add at most one trigger from each other station.
  3. Require every station pair to satisfy a distance-dependent delay bound:

$$|t_i-t_j|\leq \min\left(65\ \mathrm{s},\frac{d_{ij}}{3\ \mathrm{km/s}}+8\ \mathrm{s}\right).$$

  1. Apply the selected peak gate (12) and retain a group if at least two stations remain.

The delay bound is an association heuristic, not an epicentre fit. Checking every pair prevents a long chain of unrelated triggers from becoming one event. We retain each station's original loose-trigger onset rather than moving all picks to a common time.

Real example: EAB does not trigger around this Silverdale event, while the network links evidence from AR09, ESK and GVIE. Two of those station onsets align with the catalogue travel times.

No description has been provided for this image

8. Models and reuse¶

Name Detector Role
Single-station STA/LTA Classic STA/LTA at training-selected EAB; on 8, off 1.2 Simple reproducible starting point
Standard multi-station trigger Actual coincidence_trigger; on 8, two stations, extension 0 Existing multi-station comparison
Travel-time-constrained association Loose triggers + all-pairs association + selected peak gate; expanded station coverage Submitted system

ObsPy supplies miniSEED parsing, filtering, STA/LTA and the reference detector. Our work is the gap-safe processing, retained per-station picks, association rule, coverage diagnosis, controlled parameter selection and evidence review. The Travel-time-constrained association system uses nine stations; Single-station STA/LTA uses one. Coverage and association effects are separated later.

9. Train, validate, evaluate¶

Dates—not random samples—define the splits. Single-station STA/LTA station identity is chosen using training dates. Detector thresholds, minimum support and reference extension are selected using validation dates.

The final 187-hour set contains 19 event-focused hours and one continuous week, with 26 catalogue events in total. It is a retrospective evaluation: earlier missed events informed station expansion. We do not call it a new blind test.

Date groups are disjoint. No random splitting of neighbouring waveform samples.
split hours dates catalogue_events purpose
0 Train 193.0 43 53 Choose the baseline station
1 Validation 54.0 21 30 Choose detector settings
2 Retrospective evaluation 187.0 23 26 Compare frozen settings

10. Match detections and choose useful metrics¶

For each catalogue event, iasp91 predicts P/S arrival times at each station. A retained pick must be within ±8 seconds of a predicted arrival. One-to-one matching prevents multiple detections from claiming the same catalogue event.

$$\mathrm{Recall}=\frac{\text{matched catalogue events}}{\text{catalogue events}},\qquad P_{cat}=\frac{\text{matched detections}}{\text{all detections}},\qquad F_{2,cat}=\frac{5P_{cat}R}{4P_{cat}+R}.$$

$F_2$ weights recall more strongly than $F_1$. Here $P_{cat}$ and $F_{2,cat}$ are catalogue-based proxies because unmatched candidates have not been labelled as noise. We therefore select primarily by recall under a candidates/day budget, and report both recall and workload. The ±8-second catalogue check is separate from the broader network association delay.

No description has been provided for this image

11. Select settings on validation dates¶

Search on-thresholds [2, 3.5, 5, 7, 8, 10, 12], support counts [2, 3], and reference extensions [0, 8, 30, 65] seconds. The loose trigger threshold stays fixed at 2.

For a chosen workload budget, maximise event-date recall; break ties by fewer continuous candidates/day, then larger $F_{2,cat}$. The cell below reruns that selection from the saved grid—not from the final evaluation results. Change BUDGET to 24 or 96 to inspect another operating point. Single-station STA/LTA station selection can differ across budgets; this teaching curve holds the main Single-station STA/LTA station EAB fixed.

model on minimum extension recall daily
0 Single-station STA/LTA 8.0 1 0 0.655172 29.0
1 Standard multi-station trigger 8.0 2 0 0.793103 36.0
2 Travel-time-constrained association 12.0 2 0 0.689655 21.0
No description has been provided for this image

12. Final comparison¶

The main operating point uses a validation ceiling of 48 candidates/day. All methods are evaluated on the same hours, catalogue event denominator and shared coverage mask.

Read recall and review workload together. Equal validation budgets do not guarantee equal workload on later dates. The combined catalogue-match fraction below mixes event-focused and continuous sampling, so the separate-cohort results are the better operational view.

Model Event_dates Week Matched Events Recall Candidates_per_day Catalogue_match_fraction F2_proxy
0 Single-station STA/LTA 13/19 4/7 17 26 0.654 28.857 0.071 0.249
1 Standard multi-station trigger 16/19 5/7 21 26 0.808 32.857 0.075 0.273
2 Travel-time-constrained association 15/19 6/7 21 26 0.808 22.429 0.112 0.361
No description has been provided for this image

Result: Single-station STA/LTA finds 17/26, Travel-time-constrained association 21/26. On the continuous week, workload changes from 28.9 to 22.4 candidates/day. Standard multi-station trigger also finds 21/26, at 32.9 candidates/day. Travel-time-constrained association and reference do not find exactly the same events.

13. Separate coverage from algorithm changes¶

Adding stations and changing association at the same time would hide the cause of any improvement. This ablation first holds ObsPy settings fixed while adding nearby stations, then recalibrates the same reference, then changes the association rule.

Nearby stations recover weak events, but the old coincidence extension creates many more candidates. Recalibration reduces that workload. This is why geographic coverage and thresholds belong in the story, not just the final detector name.

The four coverage/calibration configurations are supplementary controls, not four final models. Their results are in Supplementary experiments. Both final multi-station methods use the same expanded network.

14. Inspect gains and losses, not only averages¶

Each column below is one catalogue event. The magnitude row makes it easier to see which small events are recovered or still missed. A net gain can include both recovered and lost events; neither is hidden by the summary score.

No description has been provided for this image
Comparison Gained Lost Shared
0 Travel-time-constrained association vs Single-... 4 0 17
1 Travel-time-constrained association vs Standar... 3 3 18

15. Why keep a simple final model?¶

Earlier experiments tested continuous scores, spectral/timing features, weak-label logistic ranking, clustering and positive-only geometric models. The supplementary plots compare each fitted model with its own earlier threshold control, on the original station network. They are not a same-network ranking against the final expanded system.

Weak-label logistic ranking improved some recall at a larger review workload. Positive PCA and Mahalanobis distance did not beat their retuned threshold control. Clustering helped organise candidates but did not supply earthquake/noise labels. Without reviewed negatives, adding a random forest or MLP is not a reliable way to claim higher precision.

The final choice is the simpler detector with directly inspectable station evidence. The next useful training data would be reviewed positive and negative candidates from additional dates.

Detailed earlier-model plots are in Supplementary experiments, separate from the three-method final comparison.

16. Try a change and rerun real data¶

Change the threshold below. This cell actually preprocesses the bundled miniSEED and reruns the detectors. It does not alter the frozen benchmark table. Lower thresholds can recover weaker signals, but may add unrelated candidates.

{'Single-station STA/LTA': 1,
 'Standard multi-station trigger': 2,
 'Travel-time-constrained association': 1}
No description has been provided for this image
threshold candidates matched
0 5 31 1
1 8 6 1
2 10 2 1
3 12 1 1
4 16 0 0

17. Demonstrate the same pipeline¶

Run python -m demo.server from the project root, then open the local explorer.

  1. Open Silverdale, compare Single-station STA/LTA and Travel-time-constrained association, then click a detection.
  2. Switch to STA/LTA. Click a station on the map to focus its signal.
  3. Press Next event, or Play with Pause on detection enabled.
  4. Open Try different settings and rerun the hour at a different threshold.
  5. Open Live to fetch current BGS waveforms. Source timestamps and station status show what was returned; the analysis has a three-minute buffer.

History replays recorded detections; the live tab recomputes a rolling window. The map's amber marker is the official catalogue location.

18. Conclusion¶

  • The final system recovers four more catalogue events overall than the selected single-station baseline, with fewer continuous candidates to review.
  • Coverage diagnosis and threshold calibration matter as much as adding a more elaborate classifier.
  • Compared with an existing multi-station detector, the gain is a workload trade-off and different event coverage—not a universal recall win.
  • Next: review unmatched candidates, collect new evaluation dates, and test buffered detection latency before adding further model complexity.

Sources¶

BGS waveform archive · BGS EIDA · ObsPy trigger tutorial

Contains British Geological Survey materials © UKRI 2026.

Four recovered events on the same time axis¶

Each panel shows EAB and the stations supporting the association. These are the four gains over single station; all 26 events remain in the aggregate results.

No description has been provided for this image