Geometry drawings: devices, measurement layouts and the FDTD domain (#385)
* Geometry drawings: devices, measurement layouts and the FDTD domain
Extends the to-scale geometry API from the materials batch to the
devices and set-ups around them:
- Reactive silencers: side cuts of the expansion chamber (plain and
with extended tubes), the side-branch Helmholtz resonator (cavity
drawn as its equal-volume cube, volume annotated) and the
quarter-wave stub, using equivalent circular diameters 2 sqrt(S/pi).
ReactiveSilencerResult retains its constructor geometry and gains
plot_geometry().
- Image-source room plan: ImageSourceResult.plot_geometry() draws the
mirror-room lattice with images coloured by reflection order (low
orders on top), source and receiver marked.
- Barrier section: direct and diffracted paths over ground with the
path-length difference annotated; BarrierInsertionLoss retains the
five distances/heights and the optional thickness.
- Microphone position arrays: plot_microphone_positions() is the
library's first 3-D drawing (numbered points on a wireframe
hemisphere or sphere with the reflecting plane), fed directly by
measurement_positions()/precision_positions().
- Wall apertures: slit or circular section to scale with transmitted
wavefronts; ApertureTransmissionResult retains width/radius/depth.
- Baffled piston with its normalised far-field lobe at a chosen
frequency (RadiatingPistonResult.plot_geometry()).
- Plenum chamber: the box honours the line of sight r and its angle
exactly; outlet mouth to scale, wall area annotated.
- FDTD domain preview: FDTD2D.plot_geometry() draws the configured
domain before any time stepping (obstacles, sponge layers, impedance
and rigid edges, sources, optional probes); the solver now records
sponge_width, sponge_sides and edge_impedance as public read-only
configuration.
Six new public plot_*_geometry functions, 40 generated SVG variants
embedded in seven guides (EN/ES and the GitHub mirrors) with runnable
snippets, curated table and generated API pages updated, and 14 new
tests (retention round-trips, refusal paths, validation before any
figure is created, 3-D smoke).
* Address review: probes and frequency-index validation, immutable edge record
- plot_fdtd_domain validates probes before any figure exists.
- RadiatingPistonResult.plot_geometry bounds-checks frequency_index
with a descriptive ValueError.
- FDTD2D.edge_impedance is a MappingProxyType over a private copy.
- Plenum kwargs docstring matches where they are forwarded; the FDTD
preview prose no longer claims source-in-obstacle catching (the
solver already rejects that at add_source).
* Address static analysis: shared constants, extracted helpers, flat calls
- Silencer kinds, axis labels, legend placement and repeated messages
hoisted into module constants; identical EN/ES strings dropped from
the translation table.
- plot_silencer_geometry split into per-kind validators (and its
artist kwargs removed, matching the geometry-dict entry point);
_draw_hr_cavity and the FDTD sponge/edge painters extracted.
- Aperture opening computed without a nested conditional; exception
tests build their arrays outside pytest.raises.
- Regenerated API pages for the touched docstrings.
* Split the side-branch dimension resolution out of the drawing routine
Keeps _draw_branch_silencer under the cognitive-complexity threshold;
drawing output unchanged.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Impedance tube: complete circular, rectangular and square cross-section support (#380)
* Impedance tube: complete circular, rectangular and square cross-section support
The ISO 10534-2 branch already distinguished circular from rectangular
tubes; the ASTM E2611 branch ignored the cross-section entirely. Both
branches now cover it end to end:
- Accept "square" as a cross-section alias (the rectangular bound with
d the side length) in plane_wave_frequency_range() and
two_microphone_impedance().
- New plane_wave_frequency_range_astm(): ASTM E2611-19 working range
with the unrounded circular constant (fu d < 0.586 c, 6.2.4.1), the
rectangular bound (0.500 c, 6.2.5), the spacing bound (fu s < 0.40 c,
6.5.4) and the 1 % of wavelength lower limit (6.2.3).
- wave_decomposition(), transfer_matrix_two_load() and
transfer_matrix_one_load() accept diameter/shape and emit an
ImpedanceTubeWarning outside the plane-wave range (wavenumber-space
check, no speed of sound needed).
- New hydraulic_diameter(width, height) helper (4A/P) for the
tube_attenuation_constant() rectangular case (ISO 10534-2 A.2.1.5).
- ImpedanceTubeResult retains spacing/x1/diameter/shape and
TransferMatrix retains l1/s1/l2/s2/thickness/diameter/shape plus the
frequency vector and air characteristic impedance, so
TransferMatrix.plot() now works without arguments on solver-built
matrices.
- ReportMetadata.tube_shape prints a translated cross-section row on
the ISO 10534-2 fiche.
- Tests for every new path; materials guide (EN/ES), api-reference and
generated API pages updated.
* Address review: field order, spacing guard, plot docstring, message constant
- Append ReportMetadata.tube_shape after the original fields so the
public positional constructor order is unchanged.
- Validate s1/s2 inside _warn_astm_plane_wave so a zero spacing raises
ValueError instead of ZeroDivisionError from the two transfer-matrix
solvers.
- Reword TransferMatrix.plot() docstring: solver-built matrices retain
frequency and rho c, only hand-built ones must pass them.
- Hoist the duplicated diameter validation message into a module
constant (SonarCloud S1192).
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.
Lead the API pages with the module, and type the conformance report as data (#369)
Two things the pages were saying about themselves rather than about their
subject.
All 120 generated API pages opened with the "auto-generated from the source
docstrings, do not edit by hand" note. That is a message to whoever might edit
the file, and it was standing where the module's own summary belongs: it was
the paragraph a search result quoted and the one the `speakable` selector
points assistants at. The summary leads now and the note follows it.
The conformance report page was typed as an article. It is a machine-generated
table with a fixed schema, regenerated by CI, downloadable at a stable URL, so
it is a Dataset, and it is the most citable object the project owns. Both
language versions now declare one, with the column schema, the download URL
and the DOI. The counts in the description are read from the report itself
rather than written out.
451 pages build, html-validate clean, i18n parity holds, the site-reports and
conformance-claims gates pass, and the three JSON-LD blocks on each
conformance page parse.