Repository navigation
Hybrid slip correlation lengths: per-model noise families - #39
Open
lispandfound wants to merge 3 commits into
Open
lispandfound wants to merge 3 commits into
lispandfound wants to merge 3 commits into
Conversation
DrawnSlip gains an optional tuple of NoiseFamily, each a stationary von Karman covariance (its own relation and Hurst exponent, or the source's) and a weight over position. Slip's latent then comes from a Blend: every family filters one white noise on a shared padded grid, crossfaded at equal power and normalised by the exact cross-correlations, so the latent stays standard normal at every cell. Rise time and the onset perturbation draw their independent part from the same Blend; the perturbation can keep the source's stationary covariance instead, as genslip v5.6.3 does. Rake is unchanged. CorrelationRelation gains saturation magnitudes, and SUZUKI_2022 is Suzuki et al. (2022)'s relation, the shallow family of Graves & Pitarka's hybrid. Configs take the families as [[slip.noise]]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KrujMjfczwcCciJwtErEbs
A Noise is a tuple of NoiseFamily (correlation relation, Hurst exponent, weight over position). DrawnSlip, GaussianRake and CorrelatedPerturbation each take one, so making rake hybrid is a config change. embed() builds a noise on a chart, pre-corrected for a marginal, and caches it; SlipField carries the built sampler, so rise time and the onset draw their independent part from it without embedding again. sampling.sampler() now embeds one or more covariances at a shared padded shape and returns one Sampler type; the stationary case is one covariance. Blend, BlendedSampler, Covariance.sampler and the sampler lru_cache go. SegmentSource is a moment and a rake; [source.correlation] and its per-segment override are replaced by [[<model>.noise]] lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KrujMjfczwcCciJwtErEbs
…comment From /code-review: sampler() refuses weights that don't match the covariances and the grid with a RuptureGeneratorError, and is the one place that checks their range; embed() only asks the weights to be finite. colombia.toml no longer claims to spell out the relation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KrujMjfczwcCciJwtErEbs
Contributor
Benchmarks
Kernels
End to endEach round is the command line in a fresh interpreter, start-up included. Peak RSS is the largest the child process reached over the rounds.
|
This branch has not been deployed
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
Adds depth-dependent ("hybrid") slip correlation lengths, after Graves & Pitarka's SCEC 2026 poster GM-218 and genslip v5.6.3 (SCEC BBP
devbranch). Shallow slip can use long correlation lengths (Suzuki et al. 2022) and deep slip short ones (Mai & Beroza 2002), crossfaded between two depths. It also supports any number of families.GP blends two fields linearly, so the latent variance drops in the transition, to 0.845 at Mw 7 with shared noise and 0.5 with independent noise. This PR blends in quadrature instead:
sin(πw/2), normalised by the exact cross-correlations between families. The latent field is therefore standard normal at every cell, and the marginal transform stays exact.The structure was settled through two architecture reviews, a devil's-advocate pass,
/simplifyand/code-review. Backwards compatibility was explicitly not a constraint.Changes
sampling/field.py: oneSamplertype for any number of covariances.sampler(grid, covariances, weights=None)embeds them at the widest padded shape and draws all of them from one seed. The stationary case is one covariance. Thelru_cacheonsampleris gone.rupture/models.py:NoiseFamily(relation, hurst, weight), withNoise = tuple[NoiseFamily, ...]andSTATIONARYas the default noise.embed(noise, geometry, magnitude, marginal)pre-corrects each family for the marginal, reads the weights at cell centres, and caches the result.DrawnSlip.noise,GaussianRake.noiseandCorrelatedPerturbation.noiselet each model choose its noise. Making rake hybrid is a config change. By default rake stays stationary and the perturbation uses slip's noise, which matches genslip's slip and rake. genslip keeps the perturbation's own part stationary; setperturbation.noisetoSTATIONARYto reproduce that.SlipField.samplerreplaceslatent_covariance. Rise time and the onset perturbation draw their independent part from slip's built sampler, so nothing is embedded twice.rupture/source.py:SegmentSourceis now a moment and a rake, with amagnitudeproperty.CorrelationRelationgainsstrike_saturationanddip_saturation, for SEA22'smin(Mw, 6.3).SUZUKI_2022relation.config.py:[[slip.noise]],[[rake.noise]]and[[perturbation.noise]]replace[source.correlation]and[segments.<name>.correlation]. A segment's noise list replaces the global one whole.Profiledepth/value lists are now tuples, so profiles are hashable.Breaking changes (intentional)
[source.correlation]no longer load. The lengths now live on each model's noise.SegmentSource.covariance,SlipField.latent_covariance,segment_source's correlation arguments, andsampler.cache_clear()are removed. The cache is nowembed.cache_clear().Example
Testing
pytest tests: 247 passed, 1 skipped.rerunimport.pytest benchmarks/test_kernels.py --benchmark-disablepasses.tests/test_blend.pycovers:Not in this PR
taper_slip_all_r_hc).Generated by Claude Code