Harmonize toroidal mode-number sign convention across magnetics routines (fix #638) - #674
Merged
Merged
Conversation
…nes (fix #638) - Update toroidal_mode_analysis in vaft/process/magnetics.py to compute n_raw = -phase / float(phase_geometry), matching toroidal_phase_fit_at_time and SXR rank_toroidal_mode_numbers. - Explicitly document right-handed cylindrical coordinates (R, phi, Z) and positive n propagation in module and function docstrings. - Update test_mirnov_pipeline.py synthetic phase lag for expected_n = 2. - Add comprehensive test suite in test/test_process_magnetics.py asserting exact agreement between pair analysis and array fitting across positive, negative, zero, and concurrent modes.
- Update user guide formula in docs/_guide/Processing.md to include leading minus. - Update candidate_n default in vaft/plot/mirnov.py to range(-6, 7). - Update comment in test/test_process_docstrings.py reflecting harmonized status. - Clarify phase_geometry docstring (phi_b - phi_a) and use np.isclose in magnetics.py. - Tighten test assertions with frequency indexing and add tests for descending angles, noise, and near-Nyquist cases in test_process_magnetics.py.
HongSik-Yun-Fusion
force-pushed
the
fix/638-toroidal-mode-sign
branch
from
September 9, 2026 02:16
23047f8 to
1d2c428
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.
n_raw = -phase / float(phase_geometry), matching toroidal_phase_fit_at_time
and SXR rank_toroidal_mode_numbers.
and positive n propagation in module and function docstrings.
exact agreement between pair analysis and array fitting across positive,
negative, zero, and concurrent modes.