Correct the slit-radiation sign in the slow-sound absorber and generalize the diffuser obliquity factor (#349)
* Fix slit-radiation sign, generalize Kirchhoff obliquity, record paper errata
The slit-to-free-air radiation correction of the slow-sound absorber was
transcribed with the papers' printed -iw sign, which in the e^{+jwt}
convention of the library acts as a negative mass and raises the slit-panel
resonance (378.6 to 386.8 Hz for the documented base geometry) where an
added radiation mass must lower it (370.8 Hz). The term is now conjugated
like the Stinson duct series of the same model, with the direction and the
shifted peak pinned by a regression test, and both source misprints (the
sign and the 4-vs-64 duct-series constant) are recorded in the errata
registry. The committed slow-sound figures are regenerated; the
critical-coupling design they show self-compensates to alpha = 1, but the
solved cavity length moves from 48.3 mm to 44.7 mm.
The diffuser far-field predictor now uses the symmetric Kirchhoff obliquity
factor (cos theta + cos psi)/2 for oblique sources, which reduces exactly
to the Cox and D'Antonio Eq. (9.32) normal-incidence form at psi = 0, so
all normal-incidence anchors are unchanged.
Also: the EN 29052-1 low-resistivity warning now echoes the clause 8.2
requirement to state the estimated error in the test report, and the
ISO 9053-2 volume-flow helper documents the normative 6.2 form against the
Annex A.2 rms variant.
* Update the porous-absorbers misprint count for the new errata entries
The page's sources now have five recorded misprints (Maa Eq. (5b), two in
Attenborough & Van Renterghem 2e, and the two Jimenez et al. entries); the
English and Spanish guides are kept in step.
Correct the slit-radiation sign in the slow-sound absorber and generalize the diffuser obliquity factor (#349)
* Fix slit-radiation sign, generalize Kirchhoff obliquity, record paper errata
The slit-to-free-air radiation correction of the slow-sound absorber was
transcribed with the papers' printed -iw sign, which in the e^{+jwt}
convention of the library acts as a negative mass and raises the slit-panel
resonance (378.6 to 386.8 Hz for the documented base geometry) where an
added radiation mass must lower it (370.8 Hz). The term is now conjugated
like the Stinson duct series of the same model, with the direction and the
shifted peak pinned by a regression test, and both source misprints (the
sign and the 4-vs-64 duct-series constant) are recorded in the errata
registry. The committed slow-sound figures are regenerated; the
critical-coupling design they show self-compensates to alpha = 1, but the
solved cavity length moves from 48.3 mm to 44.7 mm.
The diffuser far-field predictor now uses the symmetric Kirchhoff obliquity
factor (cos theta + cos psi)/2 for oblique sources, which reduces exactly
to the Cox and D'Antonio Eq. (9.32) normal-incidence form at psi = 0, so
all normal-incidence anchors are unchanged.
Also: the EN 29052-1 low-resistivity warning now echoes the clause 8.2
requirement to state the estimated error in the test report, and the
ISO 9053-2 volume-flow helper documents the normative 6.2 form against the
Annex A.2 rms variant.
* Update the porous-absorbers misprint count for the new errata entries
The page's sources now have five recorded misprints (Maa Eq. (5b), two in
Attenborough & Van Renterghem 2e, and the two Jimenez et al. entries); the
English and Spanish guides are kept in step.
refactor: reorganize the package into twelve domain subpackages (3.2) (#162)
* refactor: private core to _internal, module-path shims, _plot skeleton (C1)
Foundation of the 3.2 package reorganization:
- _validation/_types/_warnings/_levels_math/utils move (git mv) into the
private phonometry/_internal/ package; ~90 import sites retargeted.
- New phonometry/_compat.py: dynamic sys.modules shims keep every moved
public module path importable for one deprecation cycle (silent import,
DeprecationWarning on attribute access); generalizes and absorbs the
former loudness.py PEP 562 shim (its 3.1 wording preserved).
- _plotting.py moves (git mv) to phonometry/_plot/common.py; a silent
explicit re-export shim keeps the old private path and the 84 lazy
.plot() call sites working until each domain retargets them.
- _warn_renamed gains a 'since' parameter (3.2 for the package moves).
- tests: new test_package_architecture.py (ast edge whitelist +
fresh-interpreter subpackage imports); test_deprecated_aliases gains the
frozen 85-path pre-move snapshot and the _MOVED shim behavior test;
pytest pythonpath=tests for the upcoming mirrored test tree.
- .git-blame-ignore-revs scaffold (hashes appended at the end of Phase 1).
* refactor: metrology subpackage (C2)
core, filter_design, frequencies, parametric_filters, levels, calibration,
compliance and uncertainty move (git mv) into phonometry/metrology/ with a
curated re-export __init__; the flat API and the old module paths keep
working (facade re-exports + _compat shims). Uncertainty renderers carve out
of _plot/common.py into _plot/metrology.py; the 14 metrology test files move
to tests/metrology/ and deep imports across tests/scripts point at the new
canonical paths.
* refactor: psychoacoustics subpackage (C3)
The thirteen psychoacoustics modules (Zwicker/ECMA/Moore-Glasberg loudness,
contours, sharpness, tonality, roughness, fluctuation strength, annoyance,
tonal audibility, private Zwicker tables) move into
phonometry/psychoacoustics/; renderers carve into _plot/psychoacoustics.py;
twelve test files move to tests/psychoacoustics/. The phonometry.loudness
alias now resolves to the relocated canonical module in a single hop.
* refactor: hearing and emission subpackages (C4+C5)
hearing/ gains threshold (renamed from hearing.py), noise-induced hearing
loss, occupational exposure, SII and STI; emission/ gains the ISO 3740
sound-power family, ISO 9614 intensity and ISO/TS 7849 vibration-based
power. Renderers carve into _plot/hearing.py and _plot/emission.py; the
eleven domain test files move under tests/hearing/ and tests/emission/.
* refactor: materials, room and building subpackages (C6-C8)
materials/ collects ISO 354/11654/12999-2 absorption, scattering-diffusion,
road absorption, impedance tube, airflow resistance and EN 29052-1 dynamic
stiffness; room/ the room-acoustics, impulse-response, open-plan, room-noise,
reverberation-prediction and EN 12354-6 modules; building/ the eleven-module
EN 12354 / ISO 717 / ISO 16283 insulation family with EN 15657 and
EN 12354-5 structure-borne sound. Renderers carve into the matching _plot
modules; twenty-six test files move under their domain directories.
* fix: complete the building plot TYPE_CHECKING imports (C8 follow-up)
* refactor: vibration and environmental subpackages (C9+C10)
vibration/ collects human vibration (ISO 8041-1/2631/5349), multiple-shock
(ISO 2631-5), mechanical mobility (ISO 7626-1) and transfer stiffness
(ISO 10846); environmental/ collects the renamed rating (Lden/Ldn) and
measurement (ISO 1996-2) modules plus outdoor propagation (ISO 9613-2),
air absorption (ISO 9613-1), wind-turbine noise (IEC 61400-11) and NT
ACOU 112 impulse prominence. Renderers carve into their _plot modules and
ten test files move under the domain directories.
* refactor: aircraft, underwater and electroacoustics subpackages (C11-C13)
aircraft/ collects EPNL, the renamed atmospheric absorption, ECAC Doc 29
airport contours and ECAC Doc 32 rotorcraft hemispheres; underwater/ the
renamed acoustics/propagation/sound_speed modules with ship noise, pile
driving, ambient noise, sonar equation, seabed reflection and the numerical
solvers; electroacoustics/ distortion and frequency response. Renderers
carve into their _plot modules; seventeen test files move under the domain
directories. All twelve domain subpackages are now in place.
* refactor: finalize the 3.2 package reorganization (C14)
- api-reference gains a Namespaces section (the twelve subpackages with
scope and the 'from phonometry import aircraft as air' idiom); README
quick-start notes the namespaces; CHANGELOG records the added namespaces,
the deprecated flat module paths and the pickle note.
- plot_excitation moves from _plot/common.py to _plot/room.py and the
facade imports it from there; _plot/common.py now holds only shared
helpers and infrastructure.
- hearing/ and environmental/ package __init__ re-export the full public
surface of their renamed modules (threshold, rating) so the pre-move
package-path imports stay silent, as promised by the migration contract.
- SonarCloud cpd exclusion follows core.py to metrology/; llms.txt
regenerated; .git-blame-ignore-revs lists the move commits and the local
blame config registers it.
Full suite 2647 passed; conformance 194/194; golden baseline byte-stable;
import time unchanged vs main (1.09 s vs 1.17 s).
* fix: re-export the measurement surface on phonometry.environmental
Subagent-review finding: the generated environmental/__init__.py missed the
ISO 1996-2 measurement module (its facade import block was momentarily
path-corrupted when the subpackage exports were collected), so
phonometry.environmental.assess_tonal_audibility and 15 sibling names
raised AttributeError while every other domain namespace was complete. Adds
the missing re-exports (including EnvironmentalMeasurementWarning on the
domain namespace) and a new architecture invariant test asserting that
every name the facade imports from a domain submodule is reachable on that
subpackage, so this class of gap cannot recur.
* test: forbid absolute self-imports in the architecture check
Review feedback: the ast edge extraction only saw relative imports, so an
absolute 'from phonometry.x import y' inside the package would bypass the
cross-package whitelist. Such imports now fail the architecture test
directly (the codebase has none; relative imports are the convention).
Replace the ISO 17497-2 diffusion oracle with published-provenance data (#348)
The committed 37-receiver polar arc in tests/reference_data.py is now
generated by the library's own Fraunhofer far-field model for a published
geometry: the N = 7 QRD, 6 periods, 3.6 m wide, 0.2 m deep row of
Cox & D'Antonio, Acoustic Absorbers and Diffusers, 3rd ed., Appendix B
(the commercial N = 7 QRD of Hargreaves, Cox, Lam & D'Antonio, JASA 108(4),
1710-1720, 2000, Table I). The arc is an arithmetic oracle for ISO 17497-2
Formulas (5)/(7): d = 0.1099, flat reference d = 0.0049, d_n = 0.1055,
recomputed exactly from the committed rounded levels.
A new external third-party anchor pins the model's one-third-octave
band-averaged normalised diffusion to the published Appendix B 2D BEM values
for that row at normal incidence in the 200-400 Hz bands (agreement within
0.01, asserted at +/-0.015) in the tests and in four new conformance rows.
Across the full published 100-5000 Hz range the model-vs-BEM mean absolute
deviation is about 0.09, documented everywhere as a low-band anchor.
The previous in-house COMSOL simulation arc and its numbers are removed from
the tests, the conformance report, the surface-scattering guide (EN/ES), the
theory pages and the diffusion_polar figure, which now all use the same
published-geometry prediction.
Correct the slit-radiation sign in the slow-sound absorber and generalize the diffuser obliquity factor (#349)
* Fix slit-radiation sign, generalize Kirchhoff obliquity, record paper errata
The slit-to-free-air radiation correction of the slow-sound absorber was
transcribed with the papers' printed -iw sign, which in the e^{+jwt}
convention of the library acts as a negative mass and raises the slit-panel
resonance (378.6 to 386.8 Hz for the documented base geometry) where an
added radiation mass must lower it (370.8 Hz). The term is now conjugated
like the Stinson duct series of the same model, with the direction and the
shifted peak pinned by a regression test, and both source misprints (the
sign and the 4-vs-64 duct-series constant) are recorded in the errata
registry. The committed slow-sound figures are regenerated; the
critical-coupling design they show self-compensates to alpha = 1, but the
solved cavity length moves from 48.3 mm to 44.7 mm.
The diffuser far-field predictor now uses the symmetric Kirchhoff obliquity
factor (cos theta + cos psi)/2 for oblique sources, which reduces exactly
to the Cox and D'Antonio Eq. (9.32) normal-incidence form at psi = 0, so
all normal-incidence anchors are unchanged.
Also: the EN 29052-1 low-resistivity warning now echoes the clause 8.2
requirement to state the estimated error in the test report, and the
ISO 9053-2 volume-flow helper documents the normative 6.2 form against the
Annex A.2 rms variant.
* Update the porous-absorbers misprint count for the new errata entries
The page's sources now have five recorded misprints (Maa Eq. (5b), two in
Attenborough & Van Renterghem 2e, and the two Jimenez et al. entries); the
English and Spanish guides are kept in step.