Replace notebooks with Analysis module and .jl example scripts#184
Merged
Replace notebooks with Analysis module and .jl example scripts#184
Conversation
… Equilibrium plot functions; convert example notebooks to .jl scripts; clean up notebooks directory - Add src/Analysis/ module with: - ForceFreeStates.jl: plot_mode_displacement, plot_eigenmode_summary, plot_stability_criterion - Equilibrium.jl: plot_flux_surfaces - Convert all three run_and_analyze.ipynb examples to run_example.jl + analyze_example.jl scripts - Delete entire notebooks/ directory (deprecated spline, vacuum, and equil notebooks) - Move CHEASE_INP1 and Chease_Binary_example data to test/test_data/ for preservation - Wire Analysis module into src/JPEC.jl Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…return named plot variables - Add PlotlyJS dependency for interactive browser-based plots (zoom, pan, hover) - Replace display() calls with named variables (p_modes, p_eigen, p_stab) so all plots persist in the REPL and users can view each on demand Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
Author
Summary of notebook content migrationDeleted outright (no content worth preserving)
Moved to
|
Expand the CHEASE consistency testset in runtests_equil.jl to verify that ASCII and binary CHEASE formats produce identical equilibria across all key quantities: magnetic axis, global parameters (q0, qmin, qmax, qa, bt0, crnt), 1D profile spline values (q, F, P, dV/dψ), and flux surface geometry (rfac² and angle offset on the full nodal grid). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…data This file used the legacy [EQUIL_CONTROL]/[EQUIL_OUTPUT] format from Fortran GPEC. Nothing references it; configuration now lives in [Equilibrium] sections of jpec.toml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t_data; remove duplicate/orphan CHEASE data dirs
- Rename test/test_data/regression_equilibrium_example/ → CHEASE_test_data/ to
distinguish unit test fixtures from true full-run regression tests
(regression_solovev_ideal_example{,_multi_n} are end-to-end runs with toml configs;
CHEASE_test_data only holds input files for equilibrium reader unit tests)
- Delete test/test_data/CHEASE_INP1/ — exact duplicate of CHEASE_test_data/
- Delete test/test_data/Chease_Binary_example/ — orphaned file from deleted
equil_inverse_test.ipynb with no active tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
logan-nc
added a commit
that referenced
this pull request
Mar 11, 2026
…otebook removal - Rename all JPEC references to GPEC / GeneralizedPerturbedEquilibrium - Remove Fortran compiler install and build steps (Fortran removed from codebase) - Remove all Jupyter/notebook instructions (notebooks removed per PR #184) - Replace "Run the Example Notebook" step with gpec script invocation - Remove nbstripout pre-commit hook documentation - Renumber sections throughout to fill gaps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s scripts for the new GPEC name
…EC rename in example scripts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Closes #156, closes #161.
.ipynbfiles — threerun_and_analyze.ipynbexample notebooks and the entirenotebooks/directory (spline examples, vacuum tests, equilibrium notebooks)src/Analysis/module — reusable post-processing submodule with:Analysis.ForceFreeStates.plot_mode_displacement— Im(ξ_ψ) vs ψ_N for selected m valuesAnalysis.ForceFreeStates.plot_eigenmode_summary— 3-panel DCON summary (eigenvectors, heatmap, eigenvalues)Analysis.ForceFreeStates.plot_stability_criterion— crit vs ψ_NAnalysis.Equilibrium.plot_flux_surfaces— R-Z flux surface contours from aPlasmaEquilibriumobject.jlscripts — each example now hasrun_example.jlandanalyze_example.jlin place of the notebookp_modes,p_eigen,p_stab) so all persist simultaneously in the REPLnotebooks/CHEASE_INP1/andnotebooks/Chease_Binary_example/moved totest/test_data/REPL usage
Test plan
julia examples/DIIID-like_ideal_example/run_example.jlcompletes without errorinclude("examples/DIIID-like_ideal_example/analyze_example.jl")opens interactive browser plotsjulia --project=. -e 'using JPEC; JPEC.Analysis.ForceFreeStates.plot_mode_displacement("examples/DIIID-like_ideal_example/jpec.h5")'runs without errorjulia --project=. test/runtests.jl🤖 Generated with Claude Code