Repository navigation
Moving Hermite basis 3/5: exact triangular remap with caps and an event record - #58
Open
rogeriojorge wants to merge 2 commits into
Open
rogeriojorge wants to merge 2 commits into
rogeriojorge wants to merge 2 commits into
Conversation
…cord remap_matrix builds T[m,n] (h_m(A xi + B) in the h_n basis) by recurrence; remap applies it per species and axis with the (a/a') normalization, preserving every moment of order below the truncation. moment_target gives the moment-matched (U, sqrt(2) sigma) basis, cap_target clips it (|du| <= a', a/a' <= 1.1, a' >= 1.1 sigma), remap_event refuses moves outside the caps and records tail fractions and the moment defect for replay.
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.
Adds an exact segment remap (u, a) -> (u', a') per species and axis (Pagliantini et al., arXiv 2208.14373, Def. 1).
remap_matrixbuildsT[m,n](h_m(A xi + B)onh_n(xi), with A = a/a', B = (u-u')/a') by recurrence in O(N^2). It is exactly lower-triangular withT_nn = A^n.remapapplies T separably with the(a/a')^3normalization. It is pure and differentiable.moment_targetgives the moment-matched basis:U = u + a g1/(sqrt2 g0),a' = sqrt2 sigma.cap_targetclips the target: |du| <= a', a/a' <= 1.1, a' >= 1.1 sigma. Widening is free.remap_eventrefuses moves outside the caps. It records the time, both bases, per-species tail fractions and the low-moment defect.Why the caps: conditioning grows like (a/a')^N when the basis narrows, and like (du/a)^N/sqrt(N!) with the shift. With measured cond tables, a coherent displacement d >= 3 cannot be remapped at N >= 32. Large coherent shifts belong to the pump frame (PR 2/5).
Tested SHA 13405b8. Command:
python -m pytest -q -n 2 tests. Result: 170 passed.New tests (
tests/test_remap.py):basis_rate_termsto 1e-12.Stack: base
adaptive/base=integration/dark-baseline9d0982d (main ab87385 + #48, #46, #13, #12, #9, #55, #50, #44, #18, #51). This lands on main after those foundation PRs and the earlier PRs of this stack (#56 first). Local results only (macOS, Python 3.12, JAX 0.11.2, x64); GitHub CI on this branch has not been checked yet.