Skip to content

Exact walk-off collar sum, the modal exponent-budget reason, and an exact per-band loss recipe - #822

Open
jtravs wants to merge 4 commits into
mainfrom
fix/boundary-accuracy-490
Open

jtravs wants to merge 4 commits into
mainfrom
fix/boundary-accuracy-490

Conversation

@jtravs

@jtravs jtravs commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes #490
Refs #272
Refs #573

🤖 Generated with Claude Code

https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH

jtravs and others added 3 commits November 13, 2026 18:32
warn_walkoff and the sizing of absorber(grid, walkoff=...) took the
temporal rate's integral by a trapezoid over grid.t, which stops one
sample short of closing the period and so read (w - dt) of the exact w.
Both now take the rectangle sum over the samples, exact on the periodic
axis for the Planck taper, so the keyword and the warning stay one
condition and a collar sized for a drift removes exactly exp(-2 Gamma).

The tests that carried the one sample in their bounds now hold the
closed form to the sizing's rounding margin, and a new test pins the
warning's threshold at 6.3 w L / (Gamma ell) on both grids.

Closes #490

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
_check_exponent_budget said only that the modal kinds are not checked.
The reason is LossPolicy: a mode's loss reaches D through
dispersion_operator, whose default limit holds the power attenuation to
2 * 708 / length, so no step within the run forms an amplitude exponent
past 708, below log(DBL_MAX). The docstring, the kernel contract and the
linear-operator guide now say so and name what lies outside the reason:
gain, a raised max_alpha and the absorber's rates, added after the clamp.

A numpy_ref test replays a fibre whose unclamped loss would form e^5000
a step, with RungeKutta and Multistep, and holds the clamped exponent to
708/4 a step, no budget warning and a finite field.

Closes #272

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
The boundaries guide integrated alpha S over the saved planes by the
trapezoid. In the bins a walk-off absorber is for, alpha dz is large and
the trapezoid charges light that is gone within a fraction of the
interval at the plane's value, overcounting a band's loss by up to
twice. The recipe now uses the interval formula: with dS/dz = G - a S
and G constant between two planes, the drains removed G dz - (S1 - S0),
exact for a bin that only decays and one fed at a steady rate, and each
rate takes its share alpha / a. The medium's absorption is one of the
drains and now has its own share.

On the guide's slab the formula gives the same band loss on 8, 32 and
128 planes to 1e-14, where the trapezoid reads 2.0x, 1.08x and 1.005x
of it. A new test holds the formula to the exact exponential on four
planes.

Refs #573

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XGENPwwkUUG9KSAwneHjgH
@jtravs
jtravs marked this pull request as ready for review November 13, 2026 22:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T22:17:56.963703Z f0681a4 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-13T22:19:03.781094Z f0681a4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

warn_walkoff's collar integral leaves out one sample of the periodic axis

1 participant