Skip to content

[Fix]: Resolve 3D source phase-referenced power tests#122

Merged
QuentinWach merged 2 commits into
mainfrom
codex/fix-3d-source-phasor-tests
May 26, 2026
Merged

[Fix]: Resolve 3D source phase-referenced power tests#122
QuentinWach merged 2 commits into
mainfrom
codex/fix-3d-source-phasor-tests

Conversation

@QuentinWach
Copy link
Copy Markdown
Collaborator

Summary

  • compares 3D source launched power using the same magnitude-based phase-referenced flux convention as production normalization
  • keeps raw-basis branch purity checks for the deembedded phasor/profile comparison

Validation

  • uv run pytest tests/test_3d_constitutive_sampling.py::test_source_plane_full_incident_phasor_matches_runtime_profile_basis tests/test_3d_constitutive_sampling.py::test_source_plane_three_way_projection_localizes_rejected_branch_to_yee_update -q
  • uv run pytest tests/test_3d_constitutive_sampling.py -q

- Updated the `_source_phase_referenced_power` function to return the absolute value of the signed power calculated from profiles.
- Improved code readability by assigning the result of `_modal_power_3d_from_profiles` to a variable before returning its absolute value.
@QuentinWach QuentinWach changed the title [codex] Fix 3D source phase-referenced power tests [Fix]: Resolve 3D source phase-referenced power tests May 26, 2026
@QuentinWach QuentinWach marked this pull request as ready for review May 26, 2026 00:21
@QuentinWach QuentinWach merged commit 5a68ed5 into main May 26, 2026
1 check passed
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