Add Hermite boundary-resolution diagnostic#17
Open
rogeriojorge wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
rogeriojorge
force-pushed
the
agent/fix-odd-rfft-energy
branch
from
July 16, 2026 13:46
b3454d7 to
c3a6598
Compare
rogeriojorge
force-pushed
the
agent/hermite-tail-diagnostic
branch
from
July 16, 2026 14:21
af08512 to
bc90950
Compare
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
hermite_tail_fraction(output, width=1)as a post-processing diagnosticThis is stacked on #9. After rebasing onto its simplified head, the incremental patch is 88 additions and 5 deletions across two files; the former duplicate weighting logic is now a shared three-line helper.
Physics and numerical rationale
Fourier-Hermite phase mixing transfers perturbed free energy toward high Hermite moments. A growing boundary fraction therefore warns that the velocity-space truncation is populated and recurrence or truncation error may follow. For SPECTRAX's matched-Maxwellian basis, the squared-coefficient norm is proportional to perturbed-distribution free energy; this function deliberately reports that normalized proxy rather than calling it total plasma energy.
Reference: Parker & Dellar, Fourier-Hermite spectral representation for the Vlasov-Poisson system in the weakly collisional limit, https://arxiv.org/abs/1407.1932
Validation
pytest -q: 10 passedruff check spectrax/_diagnostics.py tests/test_diagnostics.py: passedNx=65,t=50, 501 outputs:Nn=64: peak outermost fraction2.87e-4; peak outer-eight fraction1.66e-3Nn=32: peak outermost fraction2.46e-3; peak outer-eight fraction1.71e-2