Skip to content

[scautoloc] Add DepthLookup plugin support via factory interface#127

Draft
comoglu wants to merge 1 commit into
SeisComP:mainfrom
comoglu:feature/depthlookup-factory
Draft

[scautoloc] Add DepthLookup plugin support via factory interface#127
comoglu wants to merge 1 commit into
SeisComP:mainfrom
comoglu:feature/depthlookup-factory

Conversation

@comoglu

@comoglu comoglu commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wires scautoloc to the Seismology::DepthLookupFactory from seiscomp/common (PR #199)
  • Removes any local backend implementation — depth lookup is fully delegated to the registered plugin
  • Adds _defaultDepthAt() / _maxDepthAt() helpers that replace _config.defaultDepth and _config.maxDepth at all geographic-lookup call sites
  • Default behaviour is unchanged: autoloc.depthLookup = Constant (the built-in backend from common)

How to use

Load a DepthLookup plugin and set the backend in scautoloc.cfg:

plugins              = slab2depthlookup
autoloc.depthLookup  = Slab2

The Slab2 backend is provided by https://github.com/comoglu/seiscomp-slab2-plugin — a standalone installable plugin using USGS Slab2.0 depth-contour BNA files. Proof-of-concept tested with a live playback: plugin loads 531 BNA files across 30 zones and correctly identifies slab depths (e.g. Kuril zone at 40 km).

Relationship to previous PRs

Supersedes PR #126 (feature/depthlookup-v2), which compiled Slab2 directly into scautoloc. This branch takes the cleaner approach agreed with Joachim and Jan: scautoloc is a plugin consumer only, backends live outside.

Test plan

  • autoloc.depthLookup = Constant (default) — no behaviour change, existing tests pass
  • autoloc.depthLookup = Slab2 with slab2depthlookup plugin loaded — slab depth applied, verified in log
  • Outside slab coverage — fallback depth used correctly

Wire scautoloc to the Seismology::DepthLookupFactory from seiscomp/common
(PR #199). The local backend implementation is removed; depth lookup is
now delegated to whichever plugin is loaded via the plugins config key.

- autoloc.depthLookup = Constant (default, no behaviour change)
- autoloc.depthLookup = Slab2 (requires slab2depthlookup plugin)
- _defaultDepthAt() / _maxDepthAt() helpers replace _config.defaultDepth
  and _config.maxDepth at all geographic-lookup call sites
- scconfig is passed to plugin init() so plugins can read their own keys
@cla-bot cla-bot Bot added the cla-signed The CLA has been signed by all contributors label Jul 16, 2026
@comoglu
comoglu marked this pull request as draft July 16, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The CLA has been signed by all contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant