-
Notifications
You must be signed in to change notification settings - Fork 22
[scautoloc] Add location-dependent depth lookup (Slab2 backend) #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
comoglu
wants to merge
12
commits into
SeisComP:main
Choose a base branch
from
comoglu:feature/depthlookup-v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d132182
[scautoloc] Add location-dependent depth lookup
comoglu 58356f7
[scautoloc] Add Slab2 BNA files, dump() and XML descriptions
comoglu 6b9d4e3
[scautoloc] Fix BNA feature name, safe init, consistent path resolution
comoglu 6513111
[scautoloc] Fix Slab2 fetch: treat depth 0 as outside slab zone
comoglu 9f241d4
[scautoloc] Fix namespace comment in depthlookup.cpp
comoglu f49d5b0
[scautoloc] Fix slabDir default path resolution
comoglu a0d0879
[scautoloc] Fix BNA install path in CMakeLists
comoglu bf5ecde
[scautoloc] Fix Slab2 BNA vertex count and polygon lookup
comoglu dc1a6fe
[scautoloc] Slab2: add debug logging for depth lookup results
comoglu 8292ef4
[scautoloc] Fix local variable naming and typo
comoglu 4c783e7
[scautoloc] Add fetchCandidateDepths for dual-seismicity zones
comoglu 583bf66
[scautoloc] Add Polygon and Composite depth lookup backends
comoglu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one
DepthLookup. That would mean that scautoloc can use eitherDepthLookupPolygonorSlab2DepthLookup, right? But what if it needs to use both? The common use case is: Slabs in subduction zones but also regions which only have induced seismicity where I need to fix the depth to a regional default no matter what. Or think of ocean ridges and transform faults, where the valueDepthLookupPolygonwould be that I can specify explicitly "for this region fix the depth and don't try different depths". Currently there is a default depth but scautoloc always performs some tests to see if an event could be deeper. And occasionally the result is wrong, e.g. if an event at a mid-ocean ridge is located at 120 km depth.DepthLookupPolygoncan prevent that very effectively. But ideally not at the expense ofSlab2DepthLookup.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea of the
DepthLookupis to outsource that knowledge. If you need a version ofDepthLookupwith all your special code paths then implement anDepthLookupAutolocwhich internally instantiates both classes and does all the processing.scautolocshould just query one interface regardless of the implementation. Think of it as aRecordStream.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gempa-jabe
This makes perfect sense, so a DepthLookupComposite (or whatever we call it) in seiscomp/common internally combines Polygon + Slab2 + Constant with priority ordering. scautoloc just queries one interface and doesn't care what's underneath.
That also means Slab2 should move to common, which is what @jsaul was asking for.
One thing I want to flag @jsaul before I start working on it, the original reason I kept it self-contained in scautoloc was @jsaul 's goal of calling autoloc from Python/ObsPy without the full SC environment. Moving to the factory + init(Config::Config&) pattern brings that dependency back in. Is that still a concern, or has that goal changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't get on it too fast. I am not saying that we need to implement everything in common. I am saying that the strength of the
DepthLookupinterface is that we are able to remove the complexity of that operation from the client. Having that said, stick to the current implementation in common and add everything needed here to get a proof of concept. I know that an implementation change is just one Claude prompt away but doing that in common is wrong at this stage. The interface is there, two simple example implementations are there and more complex stuff can be added later once proven its usefulness. Please learn your lessons withscautolocfirst.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, will hold off and will work on proving the concept in scautoloc first. Thanks, @gempa-jabe .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several misunderstandings involved and I think we should not discuss everything here on Github (i.e. in public).
Anyway, the
Slab2DepthLookupshould not be provided through scautoloc. Doesn't have to be in common either, could also be under https://github.com/comoglu - as long as it remains installable. That's the advantage of making it a plugin and not a library function.