Skip to content

Harmonize toroidal mode-number sign convention across magnetics routines (fix #638) - #674

Merged
HongSik-Yun-Fusion merged 2 commits into
developfrom
fix/638-toroidal-mode-sign
Sep 9, 2026
Merged

Harmonize toroidal mode-number sign convention across magnetics routines (fix #638)#674
HongSik-Yun-Fusion merged 2 commits into
developfrom
fix/638-toroidal-mode-sign

Conversation

@HongSik-Yun-Fusion

Copy link
Copy Markdown
Contributor
  • 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.

…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
HongSik-Yun-Fusion force-pushed the fix/638-toroidal-mode-sign branch from 23047f8 to 1d2c428 Compare September 9, 2026 02:16
@HongSik-Yun-Fusion
HongSik-Yun-Fusion merged commit 0710a9c into develop Sep 9, 2026
10 checks passed
@HongSik-Yun-Fusion
HongSik-Yun-Fusion deleted the fix/638-toroidal-mode-sign branch September 9, 2026 02:20
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.

1 participant