Repository navigation
Automatic diagnostic figure for any species count and dimension; spectrax input.toml saves it - #63
Open
rogeriojorge wants to merge 4 commits into
Open
rogeriojorge wants to merge 4 commits into
rogeriojorge wants to merge 4 commits into
Conversation
plot(output) shows the field and kinetic energy exchange, energy conservation, the strongest field modes, the Hermite spectrum of each species over time, the phase-space perturbation of each species and, in 2D, the field in the plane. The CLI saves input.png next to the TOML. diagnostics now also returns electric_energy and magnetic_energy.
rogeriojorge
added a commit
that referenced
this pull request
Oct 7, 2026
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.
Stacked on #62. Review #62 first.
Problem
plotassumed exactly two species, a 1D run along y, and input keys (dn1,nx,k_norm) that only the default two-stream case defines. It failed or showed the wrong panels for any other case, so every example carried its own plotting code.Change
plot(output, save=None, show=True)now works for any number of species and any dimension, in the spirit of JAX-in-Cell's single automatic figure. It draws these panels:Other changes:
phase_space(output, species, time_index)is exposed for custom figures.diagnosticsalso returnselectric_energyandmagnetic_energy.spectrax input.tomlruns the case, savesinput.pngnext to the file, and shows it.--no-showis for batch runs._plot.pyshrinks from 127 to 121 lines while covering every case.Tests