Repository navigation
Fix basin depth estimators in estimations.py - #183
Merged
Merged
Conversation
Contributor
Author
|
@claude review |
|
Claude finished @claudio525's task in 3m 10s —— View job Review complete ✅
Findings: 0 blocking, 0 minor — no correctness bugs found in the diff. AnalysisI checked each fix in
No other issues (style, security, edge-case handling) stood out in the diff. |
lispandfound
requested changes
Oct 28, 2026
lispandfound
approved these changes
Oct 28, 2026
This was referenced Oct 30, 2026
Closed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #156, #157, #158, #171. Also fixes the estimator parts of #177. Supersedes #178.
Fixes
All estimators now return km, as the docstrings specify. I checked each estimator against the paper and against OpenQuake.
chiou_young_14_calc_z1p0(Japan)mod_chiou_young_14_calc_z1p0(ASK14)campbell_bozorgina_14_calc_z2p5kuehn_20_calc_zexp(...) / 1000abrahamson_gulerce_20_calc_z2p5/ 1000parker_20_calc_z2p5/ 1000Removed regions
The coefficients for two regions do not agree with the papers. I removed these regions:
Tests
Adds
tests/test_estimations.py. The tests come from #178, with these changes:test_mod_chiou_young_14_z1p0_shallower_than_original. This test is only true with the incorrect -7.15 slope.Note
This change modifies the output of
Z_CALC_MODEL_REGION_MAPPING. For K20, AG20 and P20, the values change by orders of magnitude. No code inoq_wrappercalls these estimators directly.