Repository navigation
Classify tectonic type by CatSep (Haynie et al. 2026); remove NSHM 2022 and NGA-SUB rules - #169
Merged
Merged
Conversation
Within the Slab2 footprint, the probability of a subduction interface event is the product of an on-interface probability, exp(-dz^2 / 2 sigma^2) with sigma = 10 km for the vertical distance to the interface, a subduction slip probability, exp(-K^2 / 2 sigma^2) with sigma = 30 degrees for the minimum Kagan angle to slip on the interface in pure reverse or along the Pacific-Australia relative plate motion (NUVEL-1A), and whether the centroid is no deeper than 70 km. The remainder is upper plate above the interface and intraslab below it. Fixed depths and missing mechanisms leave the corresponding factor at 1. Adds kagan_angle, plate_motion_azimuth and subduction_slip_planes, and CMTClassifier.haynie_tectonic_type(_probabilities). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CMTClassifier.tectonic_type(centroid, nodal_plane_1, nodal_plane_2), the call gcmt-to-realisation makes, now classifies by the Haynie et al. rule. The planes are optional (no focal mechanism) and a fixed_depth keyword drops the on-interface factor. The Kagan angle is taken over both planes so the result does not depend on their order. Removes the NSHM 2022 rule (tectonic_type_probabilities' old signature, _is_interface_like and its constants), the NGA-SUB rule (nga_sub_tectonic_type(_probabilities), SlabZone, SlabZoneQuery, SlabModel.zone) and the haynie_* names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 3 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the Gaussian interface likelihoods and plate-motion reference slip with CatSep v1.0.0's ramp functions: the interface score is the flex-zone score (within 15 km of Slab2), times a ramp from 1 at the seismogenic zone depth to 0 15 km below, times a Kagan ramp (1 at 30 degrees to 0.25 at 53) against slip at the region's seismogenic rake. Crustal is the remainder times a ramp from 20 km above to 20 km below the slab, and intraslab takes the rest. The CRUST1.0 Moho is not used: moho_depth defaults to infinity, so the crust extends to the slab and the mantle-wedge branch never applies. SlabQuery now carries its Slab2 region to look up the seismogenic zone (Hayes et al. 2018; Puysegur 30 km, 90 degrees). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Package CatSep's CRUST1.0 depth-to-Moho grid cropped to New Zealand (crust1_moho_nz.npz, 2.7 kB) behind a MohoModel, and pass the Moho depth at the centroid from CMTClassifier, completing CatSep's p_moho and mantle-wedge flex terms. Simplify: the ramps are np.interp calls on (xs, ps) constants instead of a Ramp class; the Kagan angle uses scipy's D2 rotation group instead of enumerating the double-couple symmetries by hand; SlabModel takes the seismogenic zones again and SlabQuery carries its zone instead of a region string looked up in a global; the redundant depth conditions on the flex score are dropped. Scores match the previous implementation to 1e-15 over 200,000 random inputs and Kagan angles to 1e-12 degrees. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@claude review |
|
Claude finished @lispandfound's task in 4m 46s —— View job Review complete
No CLAUDE.md/REVIEW.md present in this repo to follow beyond the default correctness-focused review. Findings: 0 blocking, 0 minorI hand-traced Specifically checked and confirmed correct:
Didn't find anything to raise as an inline comment. |
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.
Summary
Replaces the tectonic type rules in
source_modelling/focal_mechanism.pywith the CatSep plausibility scores of Haynie et al. (2026, SRL 97(2A), doi:10.1785/0220250078), following software release v1.0.0 (DOI-USGS/neic-catalog-separation@1.0.0). Everything sits behind the existing public API.Within the Slab2 footprint, all ramps are from eq. 1 and Table 1 of the paper:
Moho: CatSep's CRUST1.0 depth-to-Moho grid (Laske et al. 2013), cropped to NZ (
NZ_CFM/crust1_moho_nz.npz, 2.7 kB, 1° cells 54.5–24.5°S, 156.5–189.5°E), is used throughMohoModel. Outside that grid there is no Moho (∞): the crust extends to the slab. Not implemented: the overturned-slab supplement, the mantle flag and the A–D quality grades.API
Stable:
CMTClassifier.tectonic_type(centroid, nodal_plane_1, nodal_plane_2), the callworkflow'sgcmt-to-realisation(and so the realtime simulation workflow) makes, andTectonicType. The planes are now optional. The Kagan angle is the minimum over both planes, so plane order doesn't matter.New:
kagan_angle(via scipy's D2 rotation group),MohoModel,SeismogenicZone,SEISMOGENIC_ZONES,SlabModel(grids, seismogenic_zones),SlabQuery.seismogenic_zone, and an optionalmoho_modelkeyword onCMTClassifier(from_faults/loadpass the packaged grid). The ramps arenp.interpcalls onKAGAN_RAMP/CRUSTAL_DEPTH_DIFFERENCE_RAMP.Removed:
tectonic_type_probabilities,_is_interface_likeand its constants, and thesigmakeyword ofCMTClassifier.tectonic_type_probabilities.nga_sub_tectonic_type(_probabilities),SlabZone,SlabZoneQueryandSlabModel.zone.validation_small_magnitude/scripts/compare_sources.pypassessigma=0.0and will need updating.Behaviour
The
workflowtest events keep their old classifications:On the 81 crustal validation events in
simulation_validation(GeoNet CMT centroids and planes):Six misses are within 10 km vertically of a shallow Hikurangi Slab2 surface, and five have Kagan angles of 20–48° to interface slip. The Moho adds one more: 2020p198433, a 24 km centroid in an 11 km CRUST1.0 cell, drops from 0.88 crustal to 0.43 (slab 0.47). The Moho can only lower crustal scores.
Test plan
np.interp/scipy simplification matches the previous implementation to 1e-15 over 200,000 random inputs (Kagan angles to 1e-12°)🤖 Generated with Claude Code