Repository navigation
Add mode_average=True to the capillary and waveguide interfaces - #28
Merged
Merged
Conversation
prop_capillary, prop_waveguide and their Simulation constructors take mode_average=True to run their one gas-filled mode mode-averaged, as a uniform disc of its effective area: the one-node transform a Simulation without a transverse quadrature already took. The run is bitwise the hand-built one, and its default statistics are the capillary's own (plasma, species, profiles) less the quadrature estimate. More than one mode, n_r, n_theta and radial_rule are refused beside it, and so is the general modal route. The default stays the resolved single mode. The mode-averaging guide, the setup pages, the Luna mapping (whose modes=:HE11 is the mode-averaged run) and the MI ensemble and Raman comb examples use the switch; both examples were re-run and their figures are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Documentation build overview
56 files changed ·
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
prop_capillary,prop_waveguide,Simulation.from_capillaryandSimulation.from_waveguidetakemode_average=Trueto run their one gas-filled mode mode-averaged: a uniform disc of the mode's effective area instead of the radial rule. Until now this took a five-line recipe (dataclasses.replace(settings, quadrature=None, components=None, stats=default_spec("mode_averaged"))); Luna.jl makes it a switch.modes=1still resolves HE₁₁ on the radial rule.peak_intensity), lessquadrature_error. The recipe'sdefault_spec("mode_averaged")dropped the plasma and species statistics. A same-process A/B showed no measurable cost from the extra statistics.n_r,n_theta, a non-defaultradial_rule, andprovider=(the general modal route).Docs and examples
modes=:HE11(mode-averaged) next to solprop's resolvedmodes=1. It now maps tomode_average=True.Not changed
benchmarks/builders.pykeeps the recipe, so the suite's timed cases record the same statistics as their baselines.Tests
tests/driver/test_mode_average.pycovers recipe equivalence, the default statistics, the taper, envelope, antiresonant andprop_waveguidecases, and the refusals.test_general_modal.py's keyword lock gains the new keyword. Locally the new tests and the capillary, waveguide, optmat-rates, tools and guide-snippet modules pass; ruff, basedpyright and numpydoc are clean;poe docs-examplespassed under-W. The full gate runs in CI.🤖 Generated with Claude Code