feat: 3D horn rendering and Akabak-style directivity plots#69
Merged
Conversation
Add two new visualization features: 1. 3D horn geometry rendering (horn_render.py) — matplotlib surface-of- revolution with 2D cross-section panel, embedded in HTML reports, and integrated into both single and auto Nextflow workflows. 2. Directivity/radiation pattern analysis (directivity_plot.py) — opt-in BEM far-field computation producing four Akabak-style plots: polar directivity, frequency-angle contour sonogram, beamwidth vs frequency, and directivity index. Gated behind --directivity flag (single mode only). Supporting changes: - coupled_solve() now optionally returns trace data for far-field computation - solver.py gains --compute-directivity and --directivity-file CLI flags - HTML report includes horn geometry section when dimensions are provided - 15 new tests (all 32 pass) Co-Authored-By: Claude Opus 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
--directivityflag (single mode only, requires BEM)coupled_solve()optionally returns trace data for far-field computation;solver.pygains--compute-directivityand--directivity-fileCLI flagsNew files
packages/horn-analysis/src/horn_analysis/horn_render.py— 3D rendering modulepackages/horn-analysis/src/horn_analysis/directivity_plot.py— directivity visualizationTest plan
pytest packages/horn-analysis/tests/ -v)horn-render --throat-radius 0.05 --mouth-radius 0.2 --length 0.5 --profile exponential test.png— visual inspectionhorn-directivity-plot— inspect all 4 plot typesnextflow run main.nf --mode single --directivity— verify directivity gatingnextflow run main.nf --mode single(without flag) — verify no directivity processes🤖 Generated with Claude Code