From ade054f1a404f0f82bb3a1d75f812287f62fe302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=2E=20Requena=20Plens?= Date: Sun, 2 Aug 2026 20:54:59 +0200 Subject: [PATCH 1/4] Give building three subgroups Nineteen modules behind one name, and the reader had to know the field to tell them apart. The three subgroups say what the acoustician is doing. building.measurement is the building that exists: ISO 16283 in the field, ISO 10140 in the laboratory, ISO 10052 for the survey method, ISO 15186 by intensity, ISO 10848 for flanking, the heavy impact sources, the floor-covering improvement, the reception-plate power, and the ISO 717 ratings and ISO 12999 uncertainty that go with all of them. building.prediction is the building that does not exist yet: EN 12354-1 to -5 and the panel theory behind them. building.regulation is the code it has to satisfy, which is the Spanish CTE DB-HR today and the shape any other country takes tomorrow. Five modules lose a word their subgroup now says. building_prediction and detailed_prediction become prediction.global_model and prediction.detailed_model, which is what the two EN 12354 editions actually are; facade_prediction becomes prediction.facade, building_uncertainty becomes measurement.uncertainty and spanish_building_code becomes regulation.spain. Nothing moves in the namespace: from phonometry import building exports the same 251 names, and the nineteen pre-split module paths keep working until 5.0, dotted reads included. Two test files keep their old names on purpose. A suite without __init__.py imports every module by basename, so tests/building/regulation/test_spain.py collided with the environment one and measurement/test_uncertainty.py with the metrology one, and the collision only surfaces when the whole tree is collected at once. The architecture test now checks for it directly, which is cheaper than finding out on the last run before a push. --- CHANGELOG.md | 21 + README.md | 2 +- README_PYPI.md | 2 +- docs/ERRATA.md | 16 +- docs/api-reference.md | 12 +- docs/detailed-prediction.md | 2 +- docs/facade-insulation.md | 2 +- docs/flanking-lab.md | 4 +- docs/impact-improvement.md | 2 +- docs/insulation-field.md | 2 +- docs/insulation-intensity.md | 2 +- docs/insulation-lab.md | 2 +- docs/insulation-prediction.md | 2 +- docs/insulation-ratings.md | 2 +- docs/insulation-survey.md | 2 +- docs/panel-sound-insulation.md | 2 +- docs/resilient-layers.md | 2 +- docs/spanish-building-code.md | 4 +- llms-full.txt | 50 +-- llms.txt | 10 +- scripts/api_taxonomy.py | 46 +-- scripts/conformance_report.py | 2 +- scripts/generate_api_docs.py | 2 +- scripts/generate_graphs.py | 10 +- site/public/llms/llms-insulation-design.txt | 10 +- site/public/llms/llms-sound-insulation.txt | 20 +- .../docs/es/guides/detailed-prediction.mdx | 2 +- .../docs/es/guides/facade-insulation.mdx | 2 +- .../content/docs/es/guides/flanking-lab.mdx | 4 +- .../docs/es/guides/heavy-impact-sources.mdx | 2 +- .../docs/es/guides/impact-improvement.mdx | 2 +- .../es/guides/installed-structure-borne.mdx | 2 +- .../docs/es/guides/insulation-field.mdx | 2 +- .../docs/es/guides/insulation-intensity.mdx | 2 +- .../content/docs/es/guides/insulation-lab.mdx | 2 +- .../docs/es/guides/insulation-prediction.mdx | 2 +- .../docs/es/guides/insulation-ratings.mdx | 2 +- .../docs/es/guides/insulation-survey.mdx | 2 +- .../docs/es/guides/panel-sound-insulation.mdx | 2 +- .../docs/es/guides/resilient-layers.mdx | 2 +- .../docs/es/guides/spanish-building-code.mdx | 4 +- .../docs/es/guides/structure-borne-power.mdx | 2 +- site/src/content/docs/es/reference/errata.md | 16 +- .../docs/guides/detailed-prediction.mdx | 2 +- .../content/docs/guides/facade-insulation.mdx | 2 +- site/src/content/docs/guides/flanking-lab.mdx | 4 +- .../docs/guides/heavy-impact-sources.mdx | 2 +- .../docs/guides/impact-improvement.mdx | 2 +- .../docs/guides/installed-structure-borne.mdx | 2 +- .../content/docs/guides/insulation-field.mdx | 2 +- .../docs/guides/insulation-intensity.mdx | 2 +- .../content/docs/guides/insulation-lab.mdx | 2 +- .../docs/guides/insulation-prediction.mdx | 2 +- .../docs/guides/insulation-ratings.mdx | 2 +- .../content/docs/guides/insulation-survey.mdx | 2 +- .../docs/guides/panel-sound-insulation.mdx | 2 +- .../content/docs/guides/resilient-layers.mdx | 2 +- .../docs/guides/spanish-building-code.mdx | 4 +- .../docs/guides/structure-borne-power.mdx | 2 +- .../api/building/aperture-transmission.md | 4 +- .../reference/api/building/ceiling-plenum.md | 2 +- ...tailed-prediction.md => detailed-model.md} | 90 ++-- .../{facade-prediction.md => facade.md} | 20 +- .../api/building/flanking-transmission.md | 6 +- .../building/floor-covering-improvement.md | 2 +- ...building-prediction.md => global-model.md} | 32 +- .../reference/api/building/heavy-impact.md | 2 +- .../api/building/installed-structure-borne.md | 4 +- .../docs/reference/api/building/insulation.md | 2 +- .../api/building/intensity-insulation.md | 4 +- .../reference/api/building/lab-insulation.md | 4 +- .../api/building/masonry-cavity-wall.md | 2 +- .../api/building/panel-transmission.md | 4 +- .../api/building/resilient-layers.md | 6 +- .../{spanish-building-code.md => spain.md} | 44 +- .../api/building/structure-borne-power.md | 4 +- .../api/building/survey-insulation.md | 4 +- ...building-uncertainty.md => uncertainty.md} | 24 +- site/src/content/docs/reference/api/index.md | 38 +- .../api/materials/absorption-uncertainty.md | 2 +- .../api/materials/dynamic-stiffness.md | 4 +- .../api/noise_control/room-to-room.md | 4 +- .../api/vibration/radiation-efficiency.md | 2 +- site/src/content/docs/reference/errata.md | 16 +- site/src/generated/api-sidebar.mjs | 10 +- src/phonometry/__init__.py | 266 ++++++------ src/phonometry/_compat.py | 71 +++- src/phonometry/_plot/building.py | 122 +++--- src/phonometry/_plot/common.py | 2 +- src/phonometry/_plot/geometry.py | 6 +- src/phonometry/_report/_insulation_fiche.py | 5 +- src/phonometry/_report/en12354_5.py | 6 +- src/phonometry/_report/en15657.py | 6 +- src/phonometry/_report/iso10052.py | 21 +- src/phonometry/_report/iso10140.py | 15 +- src/phonometry/_report/iso10848.py | 21 +- src/phonometry/_report/iso12354.py | 30 +- src/phonometry/_report/iso15186.py | 14 +- src/phonometry/_report/iso16251.py | 12 +- src/phonometry/_report/iso16283.py | 16 +- src/phonometry/_report/iso717.py | 13 +- src/phonometry/building/__init__.py | 389 +++++++++--------- .../building/measurement/__init__.py | 232 +++++++++++ .../flanking_transmission.py | 16 +- .../floor_covering_improvement.py | 10 +- .../{ => measurement}/heavy_impact.py | 14 +- .../building/{ => measurement}/insulation.py | 46 +-- .../{ => measurement}/intensity_insulation.py | 10 +- .../{ => measurement}/lab_insulation.py | 10 +- .../structure_borne_power.py | 14 +- .../{ => measurement}/survey_insulation.py | 12 +- .../uncertainty.py} | 8 +- .../building/prediction/__init__.py | 274 ++++++++++++ .../{ => prediction}/aperture_transmission.py | 12 +- .../{ => prediction}/ceiling_plenum.py | 10 +- .../detailed_model.py} | 32 +- .../facade.py} | 20 +- .../global_model.py} | 22 +- .../installed_structure_borne.py | 14 +- .../{ => prediction}/masonry_cavity_wall.py | 8 +- .../{ => prediction}/panel_transmission.py | 26 +- .../{ => prediction}/resilient_layers.py | 20 +- .../building/regulation/__init__.py | 50 +++ .../spain.py} | 10 +- .../materials/absorption_uncertainty.py | 2 +- src/phonometry/materials/dynamic_stiffness.py | 4 +- src/phonometry/noise_control/room_to_room.py | 4 +- .../vibration/structural/experimental_sea.py | 2 +- .../structural/radiation_efficiency.py | 2 +- .../test_building_uncertainty.py | 12 +- .../test_facade_field_report.py | 0 .../test_facade_insulation.py | 0 .../test_flanking_transmission.py | 0 .../test_flanking_transmission_report.py | 0 .../test_floor_covering_improvement.py | 0 .../{ => measurement}/test_heavy_impact.py | 2 +- .../{ => measurement}/test_insulation.py | 0 .../test_intensity_insulation.py | 0 .../{ => measurement}/test_iso10140_report.py | 0 .../test_iso15186_element_report.py | 2 +- .../{ => measurement}/test_iso15186_report.py | 2 +- .../{ => measurement}/test_iso16251_report.py | 2 +- .../{ => measurement}/test_iso16283_report.py | 0 .../{ => measurement}/test_iso717_report.py | 0 .../{ => measurement}/test_lab_insulation.py | 2 +- .../test_structure_borne_power.py | 2 +- .../test_structure_borne_power_report.py | 0 .../test_survey_insulation.py | 0 .../test_survey_insulation_report.py | 0 .../test_aperture_transmission.py | 0 .../{ => prediction}/test_ceiling_plenum.py | 0 .../test_detailed_model.py} | 6 +- .../test_detailed_model_report.py} | 0 .../test_facade.py} | 2 +- .../test_global_model.py} | 0 .../test_global_model_report.py} | 8 +- .../test_installed_structure_borne.py | 0 .../test_installed_structure_borne_report.py | 0 .../test_masonry_cavity_wall.py | 0 .../test_orthotropic_panels.py | 0 .../test_panel_transmission.py | 0 .../{ => prediction}/test_resilient_layers.py | 2 +- .../test_spanish_building_code.py | 6 +- tests/conftest.py | 2 +- tests/iso12354_building.py | 2 +- tests/reference_data.py | 4 +- tests/simulation/test_elastic_fdtd.py | 4 +- tests/simulation/test_elastic_fluid_solid.py | 4 +- tests/test_deprecated_aliases.py | 19 + tests/test_package_architecture.py | 16 + .../structural/test_experimental_sea.py | 4 +- 171 files changed, 1663 insertions(+), 996 deletions(-) rename site/src/content/docs/reference/api/building/{detailed-prediction.md => detailed-model.md} (92%) rename site/src/content/docs/reference/api/building/{facade-prediction.md => facade.md} (96%) rename site/src/content/docs/reference/api/building/{building-prediction.md => global-model.md} (95%) rename site/src/content/docs/reference/api/building/{spanish-building-code.md => spain.md} (93%) rename site/src/content/docs/reference/api/building/{building-uncertainty.md => uncertainty.md} (90%) create mode 100644 src/phonometry/building/measurement/__init__.py rename src/phonometry/building/{ => measurement}/flanking_transmission.py (98%) rename src/phonometry/building/{ => measurement}/floor_covering_improvement.py (98%) rename src/phonometry/building/{ => measurement}/heavy_impact.py (98%) rename src/phonometry/building/{ => measurement}/insulation.py (98%) rename src/phonometry/building/{ => measurement}/intensity_insulation.py (98%) rename src/phonometry/building/{ => measurement}/lab_insulation.py (98%) rename src/phonometry/building/{ => measurement}/structure_borne_power.py (98%) rename src/phonometry/building/{ => measurement}/survey_insulation.py (99%) rename src/phonometry/building/{building_uncertainty.py => measurement/uncertainty.py} (98%) create mode 100644 src/phonometry/building/prediction/__init__.py rename src/phonometry/building/{ => prediction}/aperture_transmission.py (97%) rename src/phonometry/building/{ => prediction}/ceiling_plenum.py (98%) rename src/phonometry/building/{detailed_prediction.py => prediction/detailed_model.py} (98%) rename src/phonometry/building/{facade_prediction.py => prediction/facade.py} (97%) rename src/phonometry/building/{building_prediction.py => prediction/global_model.py} (98%) rename src/phonometry/building/{ => prediction}/installed_structure_borne.py (97%) rename src/phonometry/building/{ => prediction}/masonry_cavity_wall.py (97%) rename src/phonometry/building/{ => prediction}/panel_transmission.py (98%) rename src/phonometry/building/{ => prediction}/resilient_layers.py (99%) create mode 100644 src/phonometry/building/regulation/__init__.py rename src/phonometry/building/{spanish_building_code.py => regulation/spain.py} (99%) rename tests/building/{ => measurement}/test_building_uncertainty.py (98%) rename tests/building/{ => measurement}/test_facade_field_report.py (100%) rename tests/building/{ => measurement}/test_facade_insulation.py (100%) rename tests/building/{ => measurement}/test_flanking_transmission.py (100%) rename tests/building/{ => measurement}/test_flanking_transmission_report.py (100%) rename tests/building/{ => measurement}/test_floor_covering_improvement.py (100%) rename tests/building/{ => measurement}/test_heavy_impact.py (99%) rename tests/building/{ => measurement}/test_insulation.py (100%) rename tests/building/{ => measurement}/test_intensity_insulation.py (100%) rename tests/building/{ => measurement}/test_iso10140_report.py (100%) rename tests/building/{ => measurement}/test_iso15186_element_report.py (99%) rename tests/building/{ => measurement}/test_iso15186_report.py (99%) rename tests/building/{ => measurement}/test_iso16251_report.py (99%) rename tests/building/{ => measurement}/test_iso16283_report.py (100%) rename tests/building/{ => measurement}/test_iso717_report.py (100%) rename tests/building/{ => measurement}/test_lab_insulation.py (99%) rename tests/building/{ => measurement}/test_structure_borne_power.py (99%) rename tests/building/{ => measurement}/test_structure_borne_power_report.py (100%) rename tests/building/{ => measurement}/test_survey_insulation.py (100%) rename tests/building/{ => measurement}/test_survey_insulation_report.py (100%) rename tests/building/{ => prediction}/test_aperture_transmission.py (100%) rename tests/building/{ => prediction}/test_ceiling_plenum.py (100%) rename tests/building/{test_detailed_prediction.py => prediction/test_detailed_model.py} (99%) rename tests/building/{test_detailed_prediction_report.py => prediction/test_detailed_model_report.py} (100%) rename tests/building/{test_facade_prediction.py => prediction/test_facade.py} (99%) rename tests/building/{test_building_prediction.py => prediction/test_global_model.py} (100%) rename tests/building/{test_building_prediction_report.py => prediction/test_global_model_report.py} (99%) rename tests/building/{ => prediction}/test_installed_structure_borne.py (100%) rename tests/building/{ => prediction}/test_installed_structure_borne_report.py (100%) rename tests/building/{ => prediction}/test_masonry_cavity_wall.py (100%) rename tests/building/{ => prediction}/test_orthotropic_panels.py (100%) rename tests/building/{ => prediction}/test_panel_transmission.py (100%) rename tests/building/{ => prediction}/test_resilient_layers.py (99%) rename tests/building/{ => regulation}/test_spanish_building_code.py (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 294f0e062..510ed9bb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1013,6 +1013,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/). Annex IV A.3.3. No number changes: the conformance report, the fiches and the tests are identical either side of the refactor. +- `phonometry.building` has three subgroups, by what the acoustician is + doing. `building.measurement` is the building that exists: the ISO 16283, + 10140, 10052, 15186 and 10848 methods, the heavy impact sources, the + floor-covering improvement, the reception-plate power, and the ISO 717 + ratings and ISO 12999 uncertainty that go with them. + `building.prediction` is the building that does not exist yet: EN 12354-1 + to -5 and the panel theory behind them. `building.regulation` is the code + it has to satisfy, which is the Spanish CTE DB-HR today and the shape any + other country takes tomorrow. + + Five modules lose a word their subgroup now says: `building_prediction` is + `prediction.global_model` and `detailed_prediction` is + `prediction.detailed_model`, which is what the two EN 12354 editions are; + `facade_prediction` is `prediction.facade`, `building_uncertainty` is + `measurement.uncertainty` and `spanish_building_code` is + `regulation.spain`. + + Nothing moves in the namespace: `from phonometry import building` exports + the same 251 names, and the nineteen pre-split module paths keep working + until 5.0. + - `phonometry.environmental` is `phonometry.environment`, with three subgroups that follow how an environmental study is written: what the source emits (`environment.sources`: CNOSSOS road and rail, wind turbines), what the diff --git a/README.md b/README.md index 4b8cb8e48..0eb9e1511 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ tl = underwater.transmission_loss(...) | `speech` | Speech Transmission Index STI/STIPA with signal generator (IEC 60268-16 Ed. 5); Speech Intelligibility Index (ANSI S3.5-1997) with the four band-importance procedures and the standard speech spectra; STOI and ESTOI | | `hearing` | Age-related thresholds (ISO 7029) and reference thresholds (ISO 389-7); noise-induced hearing loss with HTLAN (ISO 1999); daily noise exposure LEX,8h with Annex C uncertainty (ISO 9612) | | `room` | Swept-sine/MLS/Golay impulse responses (ISO 18233); EDT/T20/T30/C50/C80/Ts (ISO 3382-1/2); open-plan speech metrics (ISO 3382-3); reverberation-room absorption (ISO 354); reverberation-time prediction (Sabine to Arau-Puchades); total absorption of furnished rooms (EN 12354-6); image-source impulse responses and the steady-state field; room-noise criteria NC and RC Mark II (ANSI/ASA S12.2) | -| `building` | Field airborne, impact and façade insulation with R′w/DnT,w/L′nT,w/D2m,nT,w and C/Ctr/CI (ISO 16283-1/2/3, ISO 717-1/2); laboratory R/Ln (ISO 10140) and survey method (ISO 10052); insulation by intensity (ISO 15186); flanking transmission measurement and prediction (ISO 10848, EN 12354-1/2) and façade/outdoor radiation (EN 12354-3/4); measurement uncertainty (ISO 12999-1); panel transmission theory (mass law, coincidence, double walls, slits and apertures); floor-covering improvement (ISO 16251-1); reception-plate power (EN 15657) and installed structure-borne prediction (EN 12354-5); dynamic stiffness (EN 29052-1) | +| `building` | Measurement: field airborne, impact and façade insulation with R′w/DnT,w/L′nT,w/D2m,nT,w and C/Ctr/CI (ISO 16283-1/2/3, ISO 717-1/2), laboratory R/Ln (ISO 10140), survey method (ISO 10052), intensity method (ISO 15186), laboratory flanking (ISO 10848), heavy impact sources, floor-covering improvement (ISO 16251-1), reception-plate power (EN 15657) and measurement uncertainty (ISO 12999-1). Prediction: EN 12354-1/2 global and detailed models, façade and outdoor radiation (EN 12354-3/4), installed structure-borne sources (EN 12354-5), panel transmission theory (mass law, coincidence, double walls, slits and apertures), ceiling plenums, masonry cavity walls and resilient layers. Regulation: the Spanish CTE DB-HR | | `materials` | Absorption ratings αw with classes (ISO 11654) and uncertainty (ISO 12999-2); impedance-tube absorption, impedance and transmission loss (ISO 10534-1/2, ASTM E2611) plus a virtual FDTD tube; porous and multilayer absorber models (Delany-Bazley, Miki, JCA, TMM with MPP and membranes); slow-sound metamaterial absorbers at critical coupling; scattering and diffusion coefficients (ISO 17497-1/2); Schroeder diffuser design and far-field prediction; deep-subwavelength metadiffusers; in-situ road-surface absorption (ISO 13472-1/2); airflow resistance (ISO 9053-1/2) | | `emission` | Sound power by enveloping surface (ISO 3744/3746), reverberation room (ISO 3741), precision anechoic rooms (ISO 3745) and intensity scanning with field indicators and grades (ISO 9614-2/3); two-microphone p-p intensity (IEC 61043, ISO 9614-1); sound power from surface vibration (ISO/TS 7849); noise-emission declarations (ISO 4871) | | `environment` | Sources: CNOSSOS-EU road and rail emission, wind-turbine apparent sound power and tonal audibility (IEC 61400-11). Propagation: atmospheric absorption (ISO 9613-1) and the ISO 9613-2 general method with per-term octave breakdown, spherical ground effect and wave-theoretic barriers, refraction ray tracing and the GFPE. Assessment: rating levels, Lden/Ldn and adjustments (ISO 1996-1/2), impulsive-sound prominence (NT ACOU 112) and the Spanish RD 1367/2007 | diff --git a/README_PYPI.md b/README_PYPI.md index b9a85cbe2..37c2f2440 100644 --- a/README_PYPI.md +++ b/README_PYPI.md @@ -113,7 +113,7 @@ tl = underwater.transmission_loss(...) | `speech` | Speech Transmission Index STI/STIPA with signal generator (IEC 60268-16 Ed. 5); Speech Intelligibility Index (ANSI S3.5-1997) with the four band-importance procedures and the standard speech spectra; STOI and ESTOI | | `hearing` | Age-related thresholds (ISO 7029) and reference thresholds (ISO 389-7); noise-induced hearing loss with HTLAN (ISO 1999); daily noise exposure LEX,8h with Annex C uncertainty (ISO 9612) | | `room` | Swept-sine/MLS/Golay impulse responses (ISO 18233); EDT/T20/T30/C50/C80/Ts (ISO 3382-1/2); open-plan speech metrics (ISO 3382-3); reverberation-room absorption (ISO 354); reverberation-time prediction (Sabine to Arau-Puchades); total absorption of furnished rooms (EN 12354-6); image-source impulse responses and the steady-state field; room-noise criteria NC and RC Mark II (ANSI/ASA S12.2) | -| `building` | Field airborne, impact and façade insulation with R′w/DnT,w/L′nT,w/D2m,nT,w and C/Ctr/CI (ISO 16283-1/2/3, ISO 717-1/2); laboratory R/Ln (ISO 10140) and survey method (ISO 10052); insulation by intensity (ISO 15186); flanking transmission measurement and prediction (ISO 10848, EN 12354-1/2) and façade/outdoor radiation (EN 12354-3/4); measurement uncertainty (ISO 12999-1); panel transmission theory (mass law, coincidence, double walls, slits and apertures); floor-covering improvement (ISO 16251-1); reception-plate power (EN 15657) and installed structure-borne prediction (EN 12354-5); dynamic stiffness (EN 29052-1) | +| `building` | Measurement: field airborne, impact and façade insulation with R′w/DnT,w/L′nT,w/D2m,nT,w and C/Ctr/CI (ISO 16283-1/2/3, ISO 717-1/2), laboratory R/Ln (ISO 10140), survey method (ISO 10052), intensity method (ISO 15186), laboratory flanking (ISO 10848), heavy impact sources, floor-covering improvement (ISO 16251-1), reception-plate power (EN 15657) and measurement uncertainty (ISO 12999-1). Prediction: EN 12354-1/2 global and detailed models, façade and outdoor radiation (EN 12354-3/4), installed structure-borne sources (EN 12354-5), panel transmission theory (mass law, coincidence, double walls, slits and apertures), ceiling plenums, masonry cavity walls and resilient layers. Regulation: the Spanish CTE DB-HR | | `materials` | Absorption ratings αw with classes (ISO 11654) and uncertainty (ISO 12999-2); impedance-tube absorption, impedance and transmission loss (ISO 10534-1/2, ASTM E2611) plus a virtual FDTD tube; porous and multilayer absorber models (Delany-Bazley, Miki, JCA, TMM with MPP and membranes); slow-sound metamaterial absorbers at critical coupling; scattering and diffusion coefficients (ISO 17497-1/2); Schroeder diffuser design and far-field prediction; deep-subwavelength metadiffusers; in-situ road-surface absorption (ISO 13472-1/2); airflow resistance (ISO 9053-1/2) | | `emission` | Sound power by enveloping surface (ISO 3744/3746), reverberation room (ISO 3741), precision anechoic rooms (ISO 3745) and intensity scanning with field indicators and grades (ISO 9614-2/3); two-microphone p-p intensity (IEC 61043, ISO 9614-1); sound power from surface vibration (ISO/TS 7849); noise-emission declarations (ISO 4871) | | `environment` | Sources: CNOSSOS-EU road and rail emission, wind-turbine apparent sound power and tonal audibility (IEC 61400-11). Propagation: atmospheric absorption (ISO 9613-1) and the ISO 9613-2 general method with per-term octave breakdown, spherical ground effect and wave-theoretic barriers, refraction ray tracing and the GFPE. Assessment: rating levels, Lden/Ldn and adjustments (ISO 1996-1/2), impulsive-sound prominence (NT ACOU 112) and the Spanish RD 1367/2007 | diff --git a/docs/ERRATA.md b/docs/ERRATA.md index 01f8d4a5d..0be30c6e5 100644 --- a/docs/ERRATA.md +++ b/docs/ERRATA.md @@ -261,10 +261,10 @@ which is the check that enforces the rule; see (the 2017 Formulae (4) and (5)). - **Library behaviour:** unaffected. No code path implements the reduced form: the façade model computes $D_{2m,nT}$ from Formula (13) - ([`facade_prediction.py`](../src/phonometry/building/facade_prediction.py)), + ([`facade_prediction.py`](../src/phonometry/building/prediction/facade.py)), and the survey method converts with the unreduced $D_{2m,n} = D_{2m} + k + 10\log_{10}[A_0 T_0/(0{,}16 V)]$ of ISO 10052 Clause 3.15 - ([`survey_insulation.py`](../src/phonometry/building/survey_insulation.py)). + ([`survey_insulation.py`](../src/phonometry/building/measurement/survey_insulation.py)). The two standardization constants that *are* pre-folded elsewhere in the library are both correct: $0{,}032$ for the Part 2 impact form and $0{,}32$ for the Part 1 airborne form $D_{nT} = R' + 10\log_{10}(0{,}16 V/(T_0 S_s))$, @@ -368,7 +368,7 @@ which is the check that enforces the rule; see - **Library behaviour:** `in_situ_total_loss_factor` takes $\sum l_k \alpha_k$ as an input and `perimeter_absorption_coefficient` implements Formula (C.4); the Annex L fixture derives all five sums that way rather than using the - printed block, and says so ([`tests/building/test_detailed_prediction.py`](../tests/building/test_detailed_prediction.py)). + printed block, and says so ([`tests/building/prediction/test_detailed_model.py`](../tests/building/prediction/test_detailed_model.py)). - **Status:** unreported. ## ISO 12354-1:2017 Table L.3 / ISO 12354-2:2017 Table G.3 (external wall ηint) @@ -564,7 +564,7 @@ which is the check that enforces the rule; see - **Library behaviour:** `weighted_lining_improvement` returns the more conservative -10 dB at exactly 1 600 Hz and -5 dB above it, the 2000 reading, with the ambiguity named in the docstring and pinned in - [`tests/building/test_resilient_layers.py`](../tests/building/test_resilient_layers.py). + [`tests/building/prediction/test_resilient_layers.py`](../tests/building/prediction/test_resilient_layers.py). - **Status:** unreported. - **Related, not an erratum:** NOTE 1 of the same table sets a floor of 0 dB @@ -625,7 +625,7 @@ which is the check that enforces the rule; see 12354-1:2017 prints the same $\pi$-free form in its symbol definitions ($f_c = c_0^2/(1{,}8 c_L t)$). - **Library behaviour:** implements the $\pi$-free form - (`phonometry.building.flanking_transmission.critical_frequency`), with a + (`phonometry.building.measurement.flanking_transmission.critical_frequency`), with a misprint note in the docstring. - **Status:** corrected upstream — ISO 10848-1:2017 (second edition) prints the $\pi$-free form in its Formula (5), $f_c = c_0^2/(1{,}8 h c_L)$, @@ -1896,7 +1896,7 @@ which is the check that enforces the rule; see - **Library behaviour:** the regression test uses $\eta = 1{,}5 \cdot 10^{-3}$, the value the printed answers require - ([`tests/building/test_panel_transmission.py`](../tests/building/test_panel_transmission.py)). + ([`tests/building/prediction/test_panel_transmission.py`](../tests/building/prediction/test_panel_transmission.py)). - **Status:** unreported (textbook rather than a standard). --- @@ -1940,14 +1940,14 @@ which is the check that enforces the rule; see Eq. (9.19) at all: the two equations the book presents as a pair are inconsistent with each other. - **Library behaviour:** `plenum_flanking_reduction_index` in - [`ceiling_plenum.py`](../src/phonometry/building/ceiling_plenum.py) + [`ceiling_plenum.py`](../src/phonometry/building/prediction/ceiling_plenum.py) implements the derived $m'_R$ in both the exponent and the denominator, with the reading documented at the formula, and rejects a transmission factor above unity rather than reporting a negative sound reduction index. Tests pin the monotonicity, the $\tau_\text{cl} \le 1$ bound, the convergence to Eq. (9.20) and the size of the Eq. (9.17) leakage term at a realistic ceiling - ([`tests/building/test_ceiling_plenum.py`](../tests/building/test_ceiling_plenum.py)). + ([`tests/building/prediction/test_ceiling_plenum.py`](../tests/building/prediction/test_ceiling_plenum.py)). - **Status:** unreported (textbook rather than a standard). Mechel's original 1980 paper, which Vigran reproduces, was not available to check whether the misprint originates there. diff --git a/docs/api-reference.md b/docs/api-reference.md index 751e2112f..4a459d743 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -33,7 +33,7 @@ contour = aircraft.noise_contour(path, powers, distances, sel, lmax, x=gx, y=gy) | `phonometry.emission` | Sound power (ISO 3740 family), sound intensity, vibration-based power | | `phonometry.room` | Room acoustics (ISO 3382), impulse responses, open-plan, room-noise criteria, reverberation prediction, EN 12354-6 | | `phonometry.materials` | Absorption (ISO 354/11654), impedance tube, airflow resistance, scattering/diffusion, road absorption, dynamic stiffness | -| `phonometry.building` | Sound insulation measurement and prediction (EN 12354, ISO 717/16283/10140/15186/10052/10848), structure-borne sound | +| `phonometry.building` | Three subgroups: `measurement` (field, laboratory, survey and intensity methods with their ISO 717 ratings and ISO 12999 uncertainty), `prediction` (EN 12354 global and detailed models, facades, panels, apertures, plenums and resilient layers) and `regulation` (national codes) | | `phonometry.vibration` | Three families: `structural` (mobility ISO 7626, plate junctions, radiation, experimental SEA, transfer stiffness ISO 10846), `human` (ISO 2631/5349/8041 exposure and multiple shocks) and `machinery` (fault frequencies and condition monitoring) | | `phonometry.environment` | Three subgroups: `sources` (CNOSSOS road and rail emission, wind-turbine apparent sound power), `propagation` (ISO 9613-1/-2, ground effect and barriers, refraction by ray tracing and the parabolic equation) and `assessment` (ISO 1996-1/-2 rating and measurement, impulsive prominence, RD 1367/2007) | | `phonometry.aircraft` | EPNL (ICAO Annex 16), SAE ARP 5534 absorption, airport contours (ECAC Doc 29), rotorcraft (ECAC Doc 32) | @@ -52,11 +52,11 @@ warns and delegates as well. | Deprecated path | Resolves to | Removed in | | :--- | :--- | :--- | -| `phonometry.insulation` | `phonometry.building.insulation` | 4.0 | -| `phonometry.metrology.levels` | `phonometry.signals.levels` | 5.0 | -| `phonometry.hearing.sti` | `phonometry.speech.sti` | 5.0 | -| `phonometry.vibration.human_vibration` | `phonometry.vibration.human.exposure` | 5.0 | -| `phonometry.environmental` | `phonometry.environment` | 5.0 | +| `phonometry.building.measurement.insulation` | `phonometry.building.measurement.insulation` | 4.0 | +| `phonometry.signals.levels` | `phonometry.signals.levels` | 5.0 | +| `phonometry.speech.sti` | `phonometry.speech.sti` | 5.0 | +| `phonometry.vibration.human.exposure` | `phonometry.vibration.human.exposure` | 5.0 | +| `phonometry.environment` | `phonometry.environment` | 5.0 | | Name | Type | Description (Inputs) | Usage Snippet (Outputs) | | :--- | :--- | :--- | :--- | diff --git a/docs/detailed-prediction.md b/docs/detailed-prediction.md index 2b6c6b746..6e1e238f8 100644 --- a/docs/detailed-prediction.md +++ b/docs/detailed-prediction.md @@ -405,4 +405,4 @@ printed tables are recorded in [Errata](ERRATA.md). result the prediction is checked against. - [Dynamic stiffness of resilient materials (EN 29052-1)](dynamic-stiffness.md): the $s'$ behind the floating floor's resonance frequency. -- API reference: [`building.detailed_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/detailed-prediction/). +- API reference: [`building.prediction.detailed_model`](https://jmrplens.github.io/phonometry/reference/api/building/detailed-model/). diff --git a/docs/facade-insulation.md b/docs/facade-insulation.md index 5d00e3411..8b5371a46 100644 --- a/docs/facade-insulation.md +++ b/docs/facade-insulation.md @@ -582,4 +582,4 @@ ISO 16283-3 and EN ISO 717-1 for the prediction). radiating side of EN 12354-4. - [Theory](theory-rooms-buildings.md): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.facade_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/facade-prediction/) and [`building.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). +- API reference: [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/) and [`building.measurement.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). diff --git a/docs/flanking-lab.md b/docs/flanking-lab.md index 780dfecd2..7ded3083e 100644 --- a/docs/flanking-lab.md +++ b/docs/flanking-lab.md @@ -413,5 +413,5 @@ laboratory reports. reference-curve engines behind $D_{n,f,w}$ and $L_{n,f,w}$. - [Room-to-room and open-plan acoustics](open-plan-acoustics.md): the open-plan context the ceiling flanking path usually appears in. -- API reference: [`building.flanking_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) - and [`building.ceiling_plenum`](https://jmrplens.github.io/phonometry/reference/api/building/ceiling-plenum/). +- API reference: [`building.measurement.flanking_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) + and [`building.prediction.ceiling_plenum`](https://jmrplens.github.io/phonometry/reference/api/building/ceiling-plenum/). diff --git a/docs/impact-improvement.md b/docs/impact-improvement.md index 8fb64dc0e..73768240a 100644 --- a/docs/impact-improvement.md +++ b/docs/impact-improvement.md @@ -254,4 +254,4 @@ not a measurement). impact model whose Formula (21) consumes $\Delta L_w$. - [Insulation Ratings (ISO 717)](insulation-ratings.md): the reference-curve engine behind the weighted improvement. -- API reference: [`building.floor_covering_improvement`](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/). +- API reference: [`building.measurement.floor_covering_improvement`](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/). diff --git a/docs/insulation-field.md b/docs/insulation-field.md index 5c90aed38..c2ca551d2 100644 --- a/docs/insulation-field.md +++ b/docs/insulation-field.md @@ -460,4 +460,4 @@ ISO 16283 family (ISO 16283-3:2016) has its own page. used for the insulation spectra. - [Theory](theory-rooms-buildings.md): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) and [`building.building_uncertainty`](https://jmrplens.github.io/phonometry/reference/api/building/building-uncertainty/). +- API reference: [`building.measurement.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) and [`building.measurement.uncertainty`](https://jmrplens.github.io/phonometry/reference/api/building/uncertainty/). diff --git a/docs/insulation-intensity.md b/docs/insulation-intensity.md index ce0151733..5017346c9 100644 --- a/docs/insulation-intensity.md +++ b/docs/insulation-intensity.md @@ -322,4 +322,4 @@ apparent $R'_I$. The single-number ratings reuse ISO 717-1. reference-curve engine behind $R_{I,w}$ and $D_{I,n,e,w}$. - [Sound Intensity](intensity.md): the two-microphone probe, its field indicators and the residual-index qualification behind every scan. -- API reference: [`building.intensity_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/intensity-insulation/). +- API reference: [`building.measurement.intensity_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/intensity-insulation/). diff --git a/docs/insulation-lab.md b/docs/insulation-lab.md index 46e75b472..1979b0c97 100644 --- a/docs/insulation-lab.md +++ b/docs/insulation-lab.md @@ -289,4 +289,4 @@ procedures behind them. engine behind $R_w$ and $L_{n,w}$. - [Sound Power](sound-power.md): the $L_W$ methods that share the absorption-area machinery of the receiving room. -- API reference: [`building.lab_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/lab-insulation/). +- API reference: [`building.measurement.lab_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/lab-insulation/). diff --git a/docs/insulation-prediction.md b/docs/insulation-prediction.md index 1fc82a928..4f0def6e5 100644 --- a/docs/insulation-prediction.md +++ b/docs/insulation-prediction.md @@ -360,4 +360,4 @@ member of the family is EN 12354-6. the absorption member of the same EN 12354 family. - [Dynamic stiffness of resilient materials (EN 29052-1)](dynamic-stiffness.md): the $s'$ input to the EN 12354-2 floating-floor term. -- API reference: [`building.building_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/building-prediction/) and [`building.facade_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/facade-prediction/). +- API reference: [`building.prediction.global_model`](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) and [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/). diff --git a/docs/insulation-ratings.md b/docs/insulation-ratings.md index 2e063a2aa..1a86aebd3 100644 --- a/docs/insulation-ratings.md +++ b/docs/insulation-ratings.md @@ -430,4 +430,4 @@ worked examples. single-number model that consumes these ratings. - [Theory](theory-rooms-buildings.md): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). +- API reference: [`building.measurement.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). diff --git a/docs/insulation-survey.md b/docs/insulation-survey.md index a6fb39a43..11fc0b4e3 100644 --- a/docs/insulation-survey.md +++ b/docs/insulation-survey.md @@ -238,4 +238,4 @@ ISO 717-2. - [Room Acoustics](room-acoustics.md): the measured reverberation times behind the reverberation index. - [Levels](levels.md): the energy averaging behind the octave-band levels. -- API reference: [`building.survey_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/). +- API reference: [`building.measurement.survey_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/). diff --git a/docs/panel-sound-insulation.md b/docs/panel-sound-insulation.md index 53ce60921..843f48ed9 100644 --- a/docs/panel-sound-insulation.md +++ b/docs/panel-sound-insulation.md @@ -784,4 +784,4 @@ fig.tight_layout(); plt.show() the measured counterpart of the theoretical point mobilities. - [Porous and multilayer absorbers](porous-absorbers.md): the cavity-fill models a double wall consumes. -- API reference: [`building.panel_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/), [`building.masonry_cavity_wall`](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/), [`building.aperture_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](https://jmrplens.github.io/phonometry/reference/api/vibration/radiation-efficiency/) and [`vibration.structural.point_mobility`](https://jmrplens.github.io/phonometry/reference/api/vibration/point-mobility/). +- API reference: [`building.prediction.panel_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/), [`building.prediction.masonry_cavity_wall`](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/), [`building.prediction.aperture_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](https://jmrplens.github.io/phonometry/reference/api/vibration/radiation-efficiency/) and [`vibration.structural.point_mobility`](https://jmrplens.github.io/phonometry/reference/api/vibration/point-mobility/). diff --git a/docs/resilient-layers.md b/docs/resilient-layers.md index 17ce87111..5abd29520 100644 --- a/docs/resilient-layers.md +++ b/docs/resilient-layers.md @@ -435,4 +435,4 @@ set out in "What is anchored on a published number, and what is not" above. - [Predicting Panel Sound Insulation](panel-sound-insulation.md): the mass-spring-mass resonance of a double leaf, the airborne counterpart of the lining resonance. -- API reference: [`building.resilient_layers`](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/). +- API reference: [`building.prediction.resilient_layers`](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/). diff --git a/docs/spanish-building-code.md b/docs/spanish-building-code.md index 293ba258d..2f0661977 100644 --- a/docs/spanish-building-code.md +++ b/docs/spanish-building-code.md @@ -238,7 +238,7 @@ whole comes out at 31.5 dBA: ```python from phonometry import building -from phonometry.building.aperture_transmission import composite_transmission_loss +from phonometry.building.prediction.aperture_transmission import composite_transmission_loss building.window_size_correction(4.0) # -2 dB: 26 dBA catalogued -> 24 dBA @@ -301,7 +301,7 @@ enlarged-range term $C_{100-5000}$, not the core-range one. composite-facade calculation and transmission through openings and slits. - [Field Insulation Measurement (ISO 16283)](insulation-field.md): the band spectra of $R'$, $D_{nT}$ and $L'_{nT}$ that these global quantities summarise. -- API reference: [`building.spanish_building_code`](https://jmrplens.github.io/phonometry/reference/api/building/spanish-building-code/). +- API reference: [`building.regulation.spain`](https://jmrplens.github.io/phonometry/reference/api/building/spain/). ## References diff --git a/llms-full.txt b/llms-full.txt index 47c5654b7..406f2e586 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -259,13 +259,12 @@ The generated API reference, one page per module. Fetch these only when a specif - [aeroacoustics/rotorcraft-noise](https://jmrplens.github.io/phonometry/reference/api/aeroacoustics/rotorcraft-noise/) - [broadcast/program-loudness](https://jmrplens.github.io/phonometry/reference/api/broadcast/program-loudness/) - [building/aperture-transmission](https://jmrplens.github.io/phonometry/reference/api/building/aperture-transmission/) -- [building/building-prediction](https://jmrplens.github.io/phonometry/reference/api/building/building-prediction/) -- [building/building-uncertainty](https://jmrplens.github.io/phonometry/reference/api/building/building-uncertainty/) - [building/ceiling-plenum](https://jmrplens.github.io/phonometry/reference/api/building/ceiling-plenum/) -- [building/detailed-prediction](https://jmrplens.github.io/phonometry/reference/api/building/detailed-prediction/) -- [building/facade-prediction](https://jmrplens.github.io/phonometry/reference/api/building/facade-prediction/) +- [building/detailed-model](https://jmrplens.github.io/phonometry/reference/api/building/detailed-model/) +- [building/facade](https://jmrplens.github.io/phonometry/reference/api/building/facade/) - [building/flanking-transmission](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) - [building/floor-covering-improvement](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/) +- [building/global-model](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) - [building/heavy-impact](https://jmrplens.github.io/phonometry/reference/api/building/heavy-impact/) - [building/installed-structure-borne](https://jmrplens.github.io/phonometry/reference/api/building/installed-structure-borne/) - [building/insulation](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) @@ -274,9 +273,10 @@ The generated API reference, one page per module. Fetch these only when a specif - [building/masonry-cavity-wall](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/) - [building/panel-transmission](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/) - [building/resilient-layers](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/) -- [building/spanish-building-code](https://jmrplens.github.io/phonometry/reference/api/building/spanish-building-code/) +- [building/spain](https://jmrplens.github.io/phonometry/reference/api/building/spain/) - [building/structure-borne-power](https://jmrplens.github.io/phonometry/reference/api/building/structure-borne-power/) - [building/survey-insulation](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/) +- [building/uncertainty](https://jmrplens.github.io/phonometry/reference/api/building/uncertainty/) - [electroacoustics/distortion](https://jmrplens.github.io/phonometry/reference/api/electroacoustics/distortion/) - [electroacoustics/frequency-response](https://jmrplens.github.io/phonometry/reference/api/electroacoustics/frequency-response/) - [electroacoustics/loudspeaker](https://jmrplens.github.io/phonometry/reference/api/electroacoustics/loudspeaker/) @@ -2265,11 +2265,11 @@ warns and delegates as well. | Deprecated path | Resolves to | Removed in | | :--- | :--- | :--- | -| `phonometry.insulation` | `phonometry.building.insulation` | 4.0 | -| `phonometry.metrology.levels` | `phonometry.signals.levels` | 5.0 | -| `phonometry.hearing.sti` | `phonometry.speech.sti` | 5.0 | -| `phonometry.vibration.human_vibration` | `phonometry.vibration.human.exposure` | 5.0 | -| `phonometry.environmental` | `phonometry.environment` | 5.0 | +| `phonometry.building.measurement.insulation` | `phonometry.building.measurement.insulation` | 4.0 | +| `phonometry.signals.levels` | `phonometry.signals.levels` | 5.0 | +| `phonometry.speech.sti` | `phonometry.speech.sti` | 5.0 | +| `phonometry.vibration.human.exposure` | `phonometry.vibration.human.exposure` | 5.0 | +| `phonometry.environment` | `phonometry.environment` | 5.0 | | Name | Type | Description (Inputs) | Usage Snippet (Outputs) | | :--- | :--- | :--- | :--- | @@ -6774,7 +6774,7 @@ printed tables are recorded in [Errata](https://jmrplens.github.io/phonometry/re result the prediction is checked against. - [Dynamic stiffness of resilient materials (EN 29052-1)](https://jmrplens.github.io/phonometry/guides/dynamic-stiffness/): the $s'$ behind the floating floor's resonance frequency. -- API reference: [`building.detailed_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/detailed-prediction/). +- API reference: [`building.prediction.detailed_model`](https://jmrplens.github.io/phonometry/reference/api/building/detailed-model/). --- @@ -10222,7 +10222,7 @@ ISO 16283-3 and EN ISO 717-1 for the prediction). radiating side of EN 12354-4. - [Theory](https://jmrplens.github.io/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.facade_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/facade-prediction/) and [`building.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). +- API reference: [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/) and [`building.measurement.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). --- @@ -12349,8 +12349,8 @@ laboratory reports. reference-curve engines behind $D_{n,f,w}$ and $L_{n,f,w}$. - [Room-to-room and open-plan acoustics](https://jmrplens.github.io/phonometry/guides/open-plan-acoustics/): the open-plan context the ceiling flanking path usually appears in. -- API reference: [`building.flanking_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) - and [`building.ceiling_plenum`](https://jmrplens.github.io/phonometry/reference/api/building/ceiling-plenum/). +- API reference: [`building.measurement.flanking_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) + and [`building.prediction.ceiling_plenum`](https://jmrplens.github.io/phonometry/reference/api/building/ceiling-plenum/). --- @@ -14238,7 +14238,7 @@ not a measurement). impact model whose Formula (21) consumes $\Delta L_w$. - [Insulation Ratings (ISO 717)](https://jmrplens.github.io/phonometry/guides/insulation-ratings/): the reference-curve engine behind the weighted improvement. -- API reference: [`building.floor_covering_improvement`](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/). +- API reference: [`building.measurement.floor_covering_improvement`](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/). --- @@ -15907,7 +15907,7 @@ ISO 16283 family (ISO 16283-3:2016) has its own page. used for the insulation spectra. - [Theory](https://jmrplens.github.io/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) and [`building.building_uncertainty`](https://jmrplens.github.io/phonometry/reference/api/building/building-uncertainty/). +- API reference: [`building.measurement.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) and [`building.measurement.uncertainty`](https://jmrplens.github.io/phonometry/reference/api/building/uncertainty/). --- @@ -16237,7 +16237,7 @@ apparent $R'_I$. The single-number ratings reuse ISO 717-1. reference-curve engine behind $R_{I,w}$ and $D_{I,n,e,w}$. - [Sound Intensity](https://jmrplens.github.io/phonometry/guides/intensity/): the two-microphone probe, its field indicators and the residual-index qualification behind every scan. -- API reference: [`building.intensity_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/intensity-insulation/). +- API reference: [`building.measurement.intensity_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/intensity-insulation/). --- @@ -16534,7 +16534,7 @@ procedures behind them. engine behind $R_w$ and $L_{n,w}$. - [Sound Power](https://jmrplens.github.io/phonometry/guides/sound-power/): the $L_W$ methods that share the absorption-area machinery of the receiving room. -- API reference: [`building.lab_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/lab-insulation/). +- API reference: [`building.measurement.lab_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/lab-insulation/). --- @@ -16902,7 +16902,7 @@ member of the family is EN 12354-6. the absorption member of the same EN 12354 family. - [Dynamic stiffness of resilient materials (EN 29052-1)](https://jmrplens.github.io/phonometry/guides/dynamic-stiffness/): the $s'$ input to the EN 12354-2 floating-floor term. -- API reference: [`building.building_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/building-prediction/) and [`building.facade_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/facade-prediction/). +- API reference: [`building.prediction.global_model`](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) and [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/). --- @@ -17340,7 +17340,7 @@ worked examples. single-number model that consumes these ratings. - [Theory](https://jmrplens.github.io/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). +- API reference: [`building.measurement.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). --- @@ -17586,7 +17586,7 @@ ISO 717-2. - [Room Acoustics](https://jmrplens.github.io/phonometry/guides/room-acoustics/): the measured reverberation times behind the reverberation index. - [Levels](https://jmrplens.github.io/phonometry/guides/levels/): the energy averaging behind the octave-band levels. -- API reference: [`building.survey_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/). +- API reference: [`building.measurement.survey_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/). --- @@ -25192,7 +25192,7 @@ fig.tight_layout(); plt.show() the measured counterpart of the theoretical point mobilities. - [Porous and multilayer absorbers](https://jmrplens.github.io/phonometry/guides/porous-absorbers/): the cavity-fill models a double wall consumes. -- API reference: [`building.panel_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/), [`building.masonry_cavity_wall`](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/), [`building.aperture_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](https://jmrplens.github.io/phonometry/reference/api/vibration/radiation-efficiency/) and [`vibration.structural.point_mobility`](https://jmrplens.github.io/phonometry/reference/api/vibration/point-mobility/). +- API reference: [`building.prediction.panel_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/), [`building.prediction.masonry_cavity_wall`](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/), [`building.prediction.aperture_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](https://jmrplens.github.io/phonometry/reference/api/vibration/radiation-efficiency/) and [`vibration.structural.point_mobility`](https://jmrplens.github.io/phonometry/reference/api/vibration/point-mobility/). --- @@ -28526,7 +28526,7 @@ set out in "What is anchored on a published number, and what is not" above. - [Predicting Panel Sound Insulation](https://jmrplens.github.io/phonometry/guides/panel-sound-insulation/): the mass-spring-mass resonance of a double leaf, the airborne counterpart of the lining resonance. -- API reference: [`building.resilient_layers`](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/). +- API reference: [`building.prediction.resilient_layers`](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/). --- @@ -34140,7 +34140,7 @@ whole comes out at 31.5 dBA: ```python from phonometry import building -from phonometry.building.aperture_transmission import composite_transmission_loss +from phonometry.building.prediction.aperture_transmission import composite_transmission_loss building.window_size_correction(4.0) # -2 dB: 26 dBA catalogued -> 24 dBA @@ -34203,7 +34203,7 @@ enlarged-range term $C_{100-5000}$, not the core-range one. composite-facade calculation and transmission through openings and slits. - [Field Insulation Measurement (ISO 16283)](https://jmrplens.github.io/phonometry/guides/insulation-field/): the band spectra of $R'$, $D_{nT}$ and $L'_{nT}$ that these global quantities summarise. -- API reference: [`building.spanish_building_code`](https://jmrplens.github.io/phonometry/reference/api/building/spanish-building-code/). +- API reference: [`building.regulation.spain`](https://jmrplens.github.io/phonometry/reference/api/building/spain/). ## References diff --git a/llms.txt b/llms.txt index 27e4dcd64..b7ebbbf3f 100644 --- a/llms.txt +++ b/llms.txt @@ -259,13 +259,12 @@ The generated API reference, one page per module. Fetch these only when a specif - [aeroacoustics/rotorcraft-noise](https://jmrplens.github.io/phonometry/reference/api/aeroacoustics/rotorcraft-noise/) - [broadcast/program-loudness](https://jmrplens.github.io/phonometry/reference/api/broadcast/program-loudness/) - [building/aperture-transmission](https://jmrplens.github.io/phonometry/reference/api/building/aperture-transmission/) -- [building/building-prediction](https://jmrplens.github.io/phonometry/reference/api/building/building-prediction/) -- [building/building-uncertainty](https://jmrplens.github.io/phonometry/reference/api/building/building-uncertainty/) - [building/ceiling-plenum](https://jmrplens.github.io/phonometry/reference/api/building/ceiling-plenum/) -- [building/detailed-prediction](https://jmrplens.github.io/phonometry/reference/api/building/detailed-prediction/) -- [building/facade-prediction](https://jmrplens.github.io/phonometry/reference/api/building/facade-prediction/) +- [building/detailed-model](https://jmrplens.github.io/phonometry/reference/api/building/detailed-model/) +- [building/facade](https://jmrplens.github.io/phonometry/reference/api/building/facade/) - [building/flanking-transmission](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) - [building/floor-covering-improvement](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/) +- [building/global-model](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) - [building/heavy-impact](https://jmrplens.github.io/phonometry/reference/api/building/heavy-impact/) - [building/installed-structure-borne](https://jmrplens.github.io/phonometry/reference/api/building/installed-structure-borne/) - [building/insulation](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) @@ -274,9 +273,10 @@ The generated API reference, one page per module. Fetch these only when a specif - [building/masonry-cavity-wall](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/) - [building/panel-transmission](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/) - [building/resilient-layers](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/) -- [building/spanish-building-code](https://jmrplens.github.io/phonometry/reference/api/building/spanish-building-code/) +- [building/spain](https://jmrplens.github.io/phonometry/reference/api/building/spain/) - [building/structure-borne-power](https://jmrplens.github.io/phonometry/reference/api/building/structure-borne-power/) - [building/survey-insulation](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/) +- [building/uncertainty](https://jmrplens.github.io/phonometry/reference/api/building/uncertainty/) - [electroacoustics/distortion](https://jmrplens.github.io/phonometry/reference/api/electroacoustics/distortion/) - [electroacoustics/frequency-response](https://jmrplens.github.io/phonometry/reference/api/electroacoustics/frequency-response/) - [electroacoustics/loudspeaker](https://jmrplens.github.io/phonometry/reference/api/electroacoustics/loudspeaker/) diff --git a/scripts/api_taxonomy.py b/scripts/api_taxonomy.py index fce7ad082..3cf20e20e 100644 --- a/scripts/api_taxonomy.py +++ b/scripts/api_taxonomy.py @@ -154,25 +154,25 @@ class Section: label_en="Building acoustics", label_es="Acústica de la edificación", modules=( - "phonometry.building.insulation", - "phonometry.building.panel_transmission", - "phonometry.building.masonry_cavity_wall", - "phonometry.building.heavy_impact", - "phonometry.building.ceiling_plenum", - "phonometry.building.aperture_transmission", - "phonometry.building.lab_insulation", - "phonometry.building.survey_insulation", - "phonometry.building.intensity_insulation", - "phonometry.building.flanking_transmission", - "phonometry.building.facade_prediction", - "phonometry.building.building_prediction", - "phonometry.building.detailed_prediction", - "phonometry.building.building_uncertainty", - "phonometry.building.floor_covering_improvement", - "phonometry.building.resilient_layers", - "phonometry.building.structure_borne_power", - "phonometry.building.installed_structure_borne", - "phonometry.building.spanish_building_code", + "phonometry.building.measurement.insulation", + "phonometry.building.prediction.panel_transmission", + "phonometry.building.prediction.masonry_cavity_wall", + "phonometry.building.measurement.heavy_impact", + "phonometry.building.prediction.ceiling_plenum", + "phonometry.building.prediction.aperture_transmission", + "phonometry.building.measurement.lab_insulation", + "phonometry.building.measurement.survey_insulation", + "phonometry.building.measurement.intensity_insulation", + "phonometry.building.measurement.flanking_transmission", + "phonometry.building.prediction.facade", + "phonometry.building.prediction.global_model", + "phonometry.building.prediction.detailed_model", + "phonometry.building.measurement.uncertainty", + "phonometry.building.measurement.floor_covering_improvement", + "phonometry.building.prediction.resilient_layers", + "phonometry.building.measurement.structure_borne_power", + "phonometry.building.prediction.installed_structure_borne", + "phonometry.building.regulation.spain", ), ), Section( @@ -381,12 +381,12 @@ class Section: "plot_plenum_geometry": "phonometry.noise_control.hvac", "plot_barrier_geometry": "phonometry.environment.propagation.ground_barriers", "plot_microphone_positions": "phonometry.emission.sound_power", - "plot_aperture_geometry": "phonometry.building.aperture_transmission", + "plot_aperture_geometry": "phonometry.building.prediction.aperture_transmission", "plot_piston_geometry": "phonometry.electroacoustics.piston", "plot_sound_reinforcement_geometry": "phonometry.electroacoustics.sound_reinforcement", - "plot_facade_elements": "phonometry.building.facade_prediction", - "plot_double_wall_geometry": "phonometry.building.panel_transmission", + "plot_facade_elements": "phonometry.building.prediction.facade", + "plot_double_wall_geometry": "phonometry.building.prediction.panel_transmission", "plot_junction_geometry": "phonometry.vibration.structural.junction_transmission", "plot_insitu_geometry": "phonometry.materials.road_absorption", "plot_dynamic_stiffness_rig": "phonometry.materials.dynamic_stiffness", @@ -399,7 +399,7 @@ class Section: "UNDERWATER_REFERENCE_PRESSURE": "phonometry.underwater.acoustics", # Defined in the private phonometry._report package; documented with the # building insulation ratings whose report() method it drives. - "ReportMetadata": "phonometry.building.insulation", + "ReportMetadata": "phonometry.building.measurement.insulation", } diff --git a/scripts/conformance_report.py b/scripts/conformance_report.py index 9f8ab72b8..805ef43e8 100644 --- a/scripts/conformance_report.py +++ b/scripts/conformance_report.py @@ -3434,7 +3434,7 @@ def _chk_iso12999_annex_b_values() -> Outcome: "Single-number uncertainties (uncorrelated 0,6/0,8; correlated u(Rw) 1,9)", ) def _chk_iso12999_annex_b_uncertainties() -> Outcome: - from phonometry.building.insulation import ( + from phonometry.building.measurement.insulation import ( _SPECTRUM1_50_5000, _SPECTRUM2_50_5000, ) diff --git a/scripts/generate_api_docs.py b/scripts/generate_api_docs.py index 7d6869160..e80447d1b 100644 --- a/scripts/generate_api_docs.py +++ b/scripts/generate_api_docs.py @@ -1030,7 +1030,7 @@ def _page_description(page: ModuleDoc) -> str: """The page's meta description, taken from the module docstring. These pages used to describe themselves as "Public API of - phonometry.building.insulation (auto-generated)", which says nothing a URL + phonometry.building.measurement.insulation (auto-generated)", which says nothing a URL does not already say. The same page's body opens with a precise summary of what the module implements and which standards govern it, so that is what the description should be: it is what a search result shows and what an AI diff --git a/scripts/generate_graphs.py b/scripts/generate_graphs.py index e4fb1475a..099fdcc0f 100644 --- a/scripts/generate_graphs.py +++ b/scripts/generate_graphs.py @@ -4014,7 +4014,7 @@ def generate_impulse_response(output_dir: str) -> None: def generate_insulation_rating(output_dir: str) -> None: """ISO 717-1 weighted rating: measured R', shifted reference, deviations.""" print("Generating insulation_rating.png...") - from phonometry.building.insulation import ( + from phonometry.building.measurement.insulation import ( _INDEX_500_THIRD, _REF_THIRD_OCTAVE, weighted_rating, @@ -4081,7 +4081,7 @@ def generate_insulation_rating(output_dir: str) -> None: def generate_impact_rating(output_dir: str) -> None: """ISO 717-2 weighted impact rating: measured Ln, shifted reference, CI.""" print("Generating impact_rating.png...") - from phonometry.building.insulation import ( + from phonometry.building.measurement.insulation import ( _INDEX_500_THIRD, _REF_IMPACT_THIRD_OCTAVE, weighted_impact_rating, @@ -6971,7 +6971,7 @@ def generate_moore_glasberg_time_loudness(output_dir: str) -> None: def generate_prediction_flanking_demo(output_dir: str) -> None: """EN 12354-1 simplified flanking prediction (Annex H.3 worked example).""" print("Generating prediction_flanking_demo.png...") - from phonometry.building.building_prediction import ( + from phonometry.building.prediction.global_model import ( FlankingPath, flanking_element, predicted_airborne_insulation, @@ -8265,13 +8265,13 @@ def generate_absorption_uncertainty(output_dir: str) -> None: def generate_insulation_uncertainty_demo(output_dir: str) -> None: """ISO 12999-1 per-band + single-number measurement uncertainty (situation B).""" print("Generating insulation_uncertainty_demo.png...") - from phonometry.building.building_uncertainty import ( + from phonometry.building.measurement.insulation import weighted_rating + from phonometry.building.measurement.uncertainty import ( band_uncertainty, insulation_coverage_factor, insulation_expanded_uncertainty, single_number_uncertainty, ) - from phonometry.building.insulation import weighted_rating # Reuse the ISO 717-1 Annex C measured R' curve (100 Hz .. 3150 Hz); its # weighted rating is R'w = 30 dB. diff --git a/site/public/llms/llms-insulation-design.txt b/site/public/llms/llms-insulation-design.txt index f44741cfb..861999f8a 100644 --- a/site/public/llms/llms-insulation-design.txt +++ b/site/public/llms/llms-insulation-design.txt @@ -367,7 +367,7 @@ member of the family is EN 12354-6. the absorption member of the same EN 12354 family. - [Dynamic stiffness of resilient materials (EN 29052-1)](https://jmrplens.github.io/phonometry/guides/dynamic-stiffness/): the $s'$ input to the EN 12354-2 floating-floor term. -- API reference: [`building.building_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/building-prediction/) and [`building.facade_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/facade-prediction/). +- API reference: [`building.prediction.global_model`](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) and [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/). --- @@ -780,7 +780,7 @@ printed tables are recorded in [Errata](https://jmrplens.github.io/phonometry/re result the prediction is checked against. - [Dynamic stiffness of resilient materials (EN 29052-1)](https://jmrplens.github.io/phonometry/guides/dynamic-stiffness/): the $s'$ behind the floating floor's resonance frequency. -- API reference: [`building.detailed_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/detailed-prediction/). +- API reference: [`building.prediction.detailed_model`](https://jmrplens.github.io/phonometry/reference/api/building/detailed-model/). --- @@ -1572,7 +1572,7 @@ fig.tight_layout(); plt.show() the measured counterpart of the theoretical point mobilities. - [Porous and multilayer absorbers](https://jmrplens.github.io/phonometry/guides/porous-absorbers/): the cavity-fill models a double wall consumes. -- API reference: [`building.panel_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/), [`building.masonry_cavity_wall`](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/), [`building.aperture_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](https://jmrplens.github.io/phonometry/reference/api/vibration/radiation-efficiency/) and [`vibration.structural.point_mobility`](https://jmrplens.github.io/phonometry/reference/api/vibration/point-mobility/). +- API reference: [`building.prediction.panel_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/), [`building.prediction.masonry_cavity_wall`](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/), [`building.prediction.aperture_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](https://jmrplens.github.io/phonometry/reference/api/vibration/radiation-efficiency/) and [`vibration.structural.point_mobility`](https://jmrplens.github.io/phonometry/reference/api/vibration/point-mobility/). --- @@ -1834,7 +1834,7 @@ not a measurement). impact model whose Formula (21) consumes $\Delta L_w$. - [Insulation Ratings (ISO 717)](https://jmrplens.github.io/phonometry/guides/insulation-ratings/): the reference-curve engine behind the weighted improvement. -- API reference: [`building.floor_covering_improvement`](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/). +- API reference: [`building.measurement.floor_covering_improvement`](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/). --- @@ -2516,6 +2516,6 @@ set out in "What is anchored on a published number, and what is not" above. - [Predicting Panel Sound Insulation](https://jmrplens.github.io/phonometry/guides/panel-sound-insulation/): the mass-spring-mass resonance of a double leaf, the airborne counterpart of the lining resonance. -- API reference: [`building.resilient_layers`](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/). +- API reference: [`building.prediction.resilient_layers`](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/). --- diff --git a/site/public/llms/llms-sound-insulation.txt b/site/public/llms/llms-sound-insulation.txt index 6721b599d..a1c754219 100644 --- a/site/public/llms/llms-sound-insulation.txt +++ b/site/public/llms/llms-sound-insulation.txt @@ -296,7 +296,7 @@ procedures behind them. engine behind $R_w$ and $L_{n,w}$. - [Sound Power](https://jmrplens.github.io/phonometry/guides/sound-power/): the $L_W$ methods that share the absorption-area machinery of the receiving room. -- API reference: [`building.lab_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/lab-insulation/). +- API reference: [`building.measurement.lab_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/lab-insulation/). --- @@ -626,7 +626,7 @@ apparent $R'_I$. The single-number ratings reuse ISO 717-1. reference-curve engine behind $R_{I,w}$ and $D_{I,n,e,w}$. - [Sound Intensity](https://jmrplens.github.io/phonometry/guides/intensity/): the two-microphone probe, its field indicators and the residual-index qualification behind every scan. -- API reference: [`building.intensity_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/intensity-insulation/). +- API reference: [`building.measurement.intensity_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/intensity-insulation/). --- @@ -1047,8 +1047,8 @@ laboratory reports. reference-curve engines behind $D_{n,f,w}$ and $L_{n,f,w}$. - [Room-to-room and open-plan acoustics](https://jmrplens.github.io/phonometry/guides/open-plan-acoustics/): the open-plan context the ceiling flanking path usually appears in. -- API reference: [`building.flanking_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) - and [`building.ceiling_plenum`](https://jmrplens.github.io/phonometry/reference/api/building/ceiling-plenum/). +- API reference: [`building.measurement.flanking_transmission`](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) + and [`building.prediction.ceiling_plenum`](https://jmrplens.github.io/phonometry/reference/api/building/ceiling-plenum/). --- @@ -1516,7 +1516,7 @@ ISO 16283 family (ISO 16283-3:2016) has its own page. used for the insulation spectra. - [Theory](https://jmrplens.github.io/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) and [`building.building_uncertainty`](https://jmrplens.github.io/phonometry/reference/api/building/building-uncertainty/). +- API reference: [`building.measurement.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) and [`building.measurement.uncertainty`](https://jmrplens.github.io/phonometry/reference/api/building/uncertainty/). --- @@ -1762,7 +1762,7 @@ ISO 717-2. - [Room Acoustics](https://jmrplens.github.io/phonometry/guides/room-acoustics/): the measured reverberation times behind the reverberation index. - [Levels](https://jmrplens.github.io/phonometry/guides/levels/): the energy averaging behind the octave-band levels. -- API reference: [`building.survey_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/). +- API reference: [`building.measurement.survey_insulation`](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/). --- @@ -2200,7 +2200,7 @@ worked examples. single-number model that consumes these ratings. - [Theory](https://jmrplens.github.io/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). +- API reference: [`building.measurement.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). --- @@ -2790,7 +2790,7 @@ ISO 16283-3 and EN ISO 717-1 for the prediction). radiating side of EN 12354-4. - [Theory](https://jmrplens.github.io/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.facade_prediction`](https://jmrplens.github.io/phonometry/reference/api/building/facade-prediction/) and [`building.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). +- API reference: [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/) and [`building.measurement.insulation`](https://jmrplens.github.io/phonometry/reference/api/building/insulation/). --- @@ -3036,7 +3036,7 @@ whole comes out at 31.5 dBA: ```python from phonometry import building -from phonometry.building.aperture_transmission import composite_transmission_loss +from phonometry.building.prediction.aperture_transmission import composite_transmission_loss building.window_size_correction(4.0) # -2 dB: 26 dBA catalogued -> 24 dBA @@ -3099,7 +3099,7 @@ enlarged-range term $C_{100-5000}$, not the core-range one. composite-facade calculation and transmission through openings and slits. - [Field Insulation Measurement (ISO 16283)](https://jmrplens.github.io/phonometry/guides/insulation-field/): the band spectra of $R'$, $D_{nT}$ and $L'_{nT}$ that these global quantities summarise. -- API reference: [`building.spanish_building_code`](https://jmrplens.github.io/phonometry/reference/api/building/spanish-building-code/). +- API reference: [`building.regulation.spain`](https://jmrplens.github.io/phonometry/reference/api/building/spain/). ## References diff --git a/site/src/content/docs/es/guides/detailed-prediction.mdx b/site/src/content/docs/es/guides/detailed-prediction.mdx index 912f47675..4917acf9a 100644 --- a/site/src/content/docs/es/guides/detailed-prediction.mdx +++ b/site/src/content/docs/es/guides/detailed-prediction.mdx @@ -429,4 +429,4 @@ necesitan la valoración ISO 717, así que el espectro debe cubrir de 100 Hz a el resultado construido frente al que se contrasta la predicción. - [Rigidez dinámica de materiales elásticos (EN 29052-1)](/phonometry/es/guides/dynamic-stiffness/): la $s'$ que hay detrás de la frecuencia de resonancia del suelo flotante. -- Referencia de la API: [`building.detailed_prediction`](/phonometry/es/reference/api/building/detailed-prediction/). +- Referencia de la API: [`building.prediction.detailed_model`](/phonometry/es/reference/api/building/detailed-model/). diff --git a/site/src/content/docs/es/guides/facade-insulation.mdx b/site/src/content/docs/es/guides/facade-insulation.mdx index 9097e594c..1f94f9186 100644 --- a/site/src/content/docs/es/guides/facade-insulation.mdx +++ b/site/src/content/docs/es/guides/facade-insulation.mdx @@ -643,4 +643,4 @@ donde aparecen: la implementación sigue las fórmulas y no las filas impresas. hacia fuera, desde el lado radiante de EN 12354-4. - [Teoría](/phonometry/es/reference/theory/rooms-buildings/): la derivación de la curva de referencia que sustenta los índices ponderados de un solo número. -- Referencia de la API: [`building.facade_prediction`](/phonometry/es/reference/api/building/facade-prediction/) y [`building.insulation`](/phonometry/es/reference/api/building/insulation/). +- Referencia de la API: [`building.prediction.facade`](/phonometry/es/reference/api/building/facade/) y [`building.measurement.insulation`](/phonometry/es/reference/api/building/insulation/). diff --git a/site/src/content/docs/es/guides/flanking-lab.mdx b/site/src/content/docs/es/guides/flanking-lab.mdx index 0b97f9f00..9722c60af 100644 --- a/site/src/content/docs/es/guides/flanking-lab.mdx +++ b/site/src/content/docs/es/guides/flanking-lab.mdx @@ -482,5 +482,5 @@ conducto revestido es aquí un dato de entrada, no una predicción. de flancos en la derivación de EN 12354. - [Acústica de recintos y espacios diáfanos](/phonometry/es/guides/open-plan-acoustics/): el contexto de oficina diáfana en el que suele aparecer el trayecto por el techo. -- Referencia de la API: [`building.flanking_transmission`](/phonometry/es/reference/api/building/flanking-transmission/) - y [`building.ceiling_plenum`](/phonometry/es/reference/api/building/ceiling-plenum/). +- Referencia de la API: [`building.measurement.flanking_transmission`](/phonometry/es/reference/api/building/flanking-transmission/) + y [`building.prediction.ceiling_plenum`](/phonometry/es/reference/api/building/ceiling-plenum/). diff --git a/site/src/content/docs/es/guides/heavy-impact-sources.mdx b/site/src/content/docs/es/guides/heavy-impact-sources.mdx index bc405d5e0..799969ba2 100644 --- a/site/src/content/docs/es/guides/heavy-impact-sources.mdx +++ b/site/src/content/docs/es/guides/heavy-impact-sources.mdx @@ -283,4 +283,4 @@ una reproducción publicada de 25 bandas de la Fórmula (4). impactos. - [Mejora del aislamiento a impacto de suelos (ISO 16251-1)](/phonometry/es/guides/impact-improvement/): la mejora que aporta un revestimiento blando frente a la fuente ligera. -- Referencia de la API: [`building.heavy_impact`](/phonometry/es/reference/api/building/heavy-impact/). +- Referencia de la API: [`building.measurement.heavy_impact`](/phonometry/es/reference/api/building/heavy-impact/). diff --git a/site/src/content/docs/es/guides/impact-improvement.mdx b/site/src/content/docs/es/guides/impact-improvement.mdx index 98ec04f21..76a27b845 100644 --- a/site/src/content/docs/es/guides/impact-improvement.mdx +++ b/site/src/content/docs/es/guides/impact-improvement.mdx @@ -285,4 +285,4 @@ eje de comparación del ejemplo resuelto de Foret et al. (2011). el motor de curva de referencia tras la mejora ponderada. - [Teoría](/phonometry/es/reference/theory/rooms-buildings/): la derivación de la curva de referencia tras los números únicos ponderados. -- Referencia de la API: [`building.floor_covering_improvement`](/phonometry/es/reference/api/building/floor-covering-improvement/). +- Referencia de la API: [`building.measurement.floor_covering_improvement`](/phonometry/es/reference/api/building/floor-covering-improvement/). diff --git a/site/src/content/docs/es/guides/installed-structure-borne.mdx b/site/src/content/docs/es/guides/installed-structure-borne.mdx index 3ddcf890c..3a551f9a7 100644 --- a/site/src/content/docs/es/guides/installed-structure-borne.mdx +++ b/site/src/content/docs/es/guides/installed-structure-borne.mdx @@ -262,4 +262,4 @@ norma. Solo está implementada la edición de 2009, no la revisión de 2023. flancos. - [Predicción del aislamiento acústico (EN 12354)](/phonometry/es/guides/insulation-prediction/): los miembros aéreo y de impactos de la misma familia de predicción. -- Referencia de la API: [`building.installed_structure_borne`](/phonometry/es/reference/api/building/installed-structure-borne/). +- Referencia de la API: [`building.prediction.installed_structure_borne`](/phonometry/es/reference/api/building/installed-structure-borne/). diff --git a/site/src/content/docs/es/guides/insulation-field.mdx b/site/src/content/docs/es/guides/insulation-field.mdx index d8e9716c3..cd9545052 100644 --- a/site/src/content/docs/es/guides/insulation-field.mdx +++ b/site/src/content/docs/es/guides/insulation-field.mdx @@ -524,7 +524,7 @@ la vía de intensidad acústica ISO 15186-1/-2 fraccionaria IEC 61260 usados para los espectros de aislamiento. - [Teoría](/phonometry/es/reference/theory/rooms-buildings/): la derivación de la curva de referencia que sustenta los índices ponderados de un solo número. -- Referencia de la API: [`building.insulation`](/phonometry/es/reference/api/building/insulation/) y [`building.building_uncertainty`](/phonometry/es/reference/api/building/building-uncertainty/). +- Referencia de la API: [`building.measurement.insulation`](/phonometry/es/reference/api/building/insulation/) y [`building.measurement.uncertainty`](/phonometry/es/reference/api/building/uncertainty/). ## Respuestas rápidas diff --git a/site/src/content/docs/es/guides/insulation-intensity.mdx b/site/src/content/docs/es/guides/insulation-intensity.mdx index 811e2c77f..d328f2f80 100644 --- a/site/src/content/docs/es/guides/insulation-intensity.mdx +++ b/site/src/content/docs/es/guides/insulation-intensity.mdx @@ -365,4 +365,4 @@ campo, pero nada comprueba cómo se adquirieron. residual tras cada barrido. - [Teoría](/phonometry/es/reference/theory/rooms-buildings/): la derivación de la curva de referencia tras los índices globales ponderados. -- Referencia de la API: [`building.intensity_insulation`](/phonometry/es/reference/api/building/intensity-insulation/). +- Referencia de la API: [`building.measurement.intensity_insulation`](/phonometry/es/reference/api/building/intensity-insulation/). diff --git a/site/src/content/docs/es/guides/insulation-lab.mdx b/site/src/content/docs/es/guides/insulation-lab.mdx index 193cfcbc1..70db3b557 100644 --- a/site/src/content/docs/es/guides/insulation-lab.mdx +++ b/site/src/content/docs/es/guides/insulation-lab.mdx @@ -343,4 +343,4 @@ suelo (ISO 16251-1) y la transmisión por flancos (ISO 10848). el motor de curva de referencia tras $R_w$ y $L_{n,w}$. - [Potencia acústica](/phonometry/es/guides/sound-power/): los métodos de $L_W$ que comparten la maquinaria de área de absorción del recinto receptor. -- Referencia de la API: [`building.lab_insulation`](/phonometry/es/reference/api/building/lab-insulation/). +- Referencia de la API: [`building.measurement.lab_insulation`](/phonometry/es/reference/api/building/lab-insulation/). diff --git a/site/src/content/docs/es/guides/insulation-prediction.mdx b/site/src/content/docs/es/guides/insulation-prediction.mdx index 0913fd25b..52971dd16 100644 --- a/site/src/content/docs/es/guides/insulation-prediction.mdx +++ b/site/src/content/docs/es/guides/insulation-prediction.mdx @@ -449,4 +449,4 @@ y el modelo de absorción de la EN 12354-6 en el miembro de absorción de la misma familia EN 12354. - [Rigidez dinámica de materiales resilientes (EN 29052-1)](/phonometry/es/guides/dynamic-stiffness/): la $s'$ que alimenta el término de suelo flotante de EN 12354-2. -- Referencia de la API: [`building.building_prediction`](/phonometry/es/reference/api/building/building-prediction/) y [`building.facade_prediction`](/phonometry/es/reference/api/building/facade-prediction/). +- Referencia de la API: [`building.prediction.global_model`](/phonometry/es/reference/api/building/global-model/) y [`building.prediction.facade`](/phonometry/es/reference/api/building/facade/). diff --git a/site/src/content/docs/es/guides/insulation-ratings.mdx b/site/src/content/docs/es/guides/insulation-ratings.mdx index 39b6c2d15..c13a1404b 100644 --- a/site/src/content/docs/es/guides/insulation-ratings.mdx +++ b/site/src/content/docs/es/guides/insulation-ratings.mdx @@ -468,7 +468,7 @@ motores desde sus propias guías en lugar de duplicarlos. el modelo de número único que consume estos índices. - [Teoría](/phonometry/es/reference/theory/rooms-buildings/): la derivación de la curva de referencia tras los índices globales ponderados. -- Referencia de la API: [`building.insulation`](/phonometry/es/reference/api/building/insulation/). +- Referencia de la API: [`building.measurement.insulation`](/phonometry/es/reference/api/building/insulation/). ## Respuestas rápidas diff --git a/site/src/content/docs/es/guides/insulation-survey.mdx b/site/src/content/docs/es/guides/insulation-survey.mdx index ae02d9179..b45534973 100644 --- a/site/src/content/docs/es/guides/insulation-survey.mdx +++ b/site/src/content/docs/es/guides/insulation-survey.mdx @@ -275,4 +275,4 @@ sube lo que hay en juego, pasa a los niveles en bandas de octava. - [Teoría](/phonometry/es/reference/theory/rooms-buildings/): la derivación de la curva de referencia tras los índices globales ponderados. -- Referencia de la API: [`building.survey_insulation`](/phonometry/es/reference/api/building/survey-insulation/). +- Referencia de la API: [`building.measurement.survey_insulation`](/phonometry/es/reference/api/building/survey-insulation/). diff --git a/site/src/content/docs/es/guides/panel-sound-insulation.mdx b/site/src/content/docs/es/guides/panel-sound-insulation.mdx index d49a1f40d..76aaba871 100644 --- a/site/src/content/docs/es/guides/panel-sound-insulation.mdx +++ b/site/src/content/docs/es/guides/panel-sound-insulation.mdx @@ -914,4 +914,4 @@ cita Vigran. la contraparte medida de las movilidades puntuales teóricas. - [Absorbentes porosos y multicapa](/phonometry/es/guides/porous-absorbers/): los modelos de relleno de cámara que consume una pared doble. -- Referencia de API: [`building.panel_transmission`](/phonometry/es/reference/api/building/panel-transmission/), [`building.masonry_cavity_wall`](/phonometry/es/reference/api/building/masonry-cavity-wall/), [`building.aperture_transmission`](/phonometry/es/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](/phonometry/es/reference/api/vibration/radiation-efficiency/) y [`vibration.structural.point_mobility`](/phonometry/es/reference/api/vibration/point-mobility/). +- Referencia de API: [`building.prediction.panel_transmission`](/phonometry/es/reference/api/building/panel-transmission/), [`building.prediction.masonry_cavity_wall`](/phonometry/es/reference/api/building/masonry-cavity-wall/), [`building.prediction.aperture_transmission`](/phonometry/es/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](/phonometry/es/reference/api/vibration/radiation-efficiency/) y [`vibration.structural.point_mobility`](/phonometry/es/reference/api/vibration/point-mobility/). diff --git a/site/src/content/docs/es/guides/resilient-layers.mdx b/site/src/content/docs/es/guides/resilient-layers.mdx index 435477b6e..3cd78d72a 100644 --- a/site/src/content/docs/es/guides/resilient-layers.mdx +++ b/site/src/content/docs/es/guides/resilient-layers.mdx @@ -444,4 +444,4 @@ impacto pesadas (la pelota de caucho) no las cubre ninguno de estos modelos. - [Predicción del aislamiento de paneles](/phonometry/es/guides/panel-sound-insulation/): la resonancia masa-resorte-masa de una hoja doble, la contrapartida a ruido aéreo de la resonancia de la capa adicional. -- Referencia de la API: [`building.resilient_layers`](/phonometry/es/reference/api/building/resilient-layers/). +- Referencia de la API: [`building.prediction.resilient_layers`](/phonometry/es/reference/api/building/resilient-layers/). diff --git a/site/src/content/docs/es/guides/spanish-building-code.mdx b/site/src/content/docs/es/guides/spanish-building-code.mdx index 0ddc35a1c..8b9fbc0a9 100644 --- a/site/src/content/docs/es/guides/spanish-building-code.mdx +++ b/site/src/content/docs/es/guides/spanish-building-code.mdx @@ -274,7 +274,7 @@ Con la fachada de 8 m² del ejemplo 7.5, parte ciega de 40 dBA y ventana de ```python from phonometry import building -from phonometry.building.aperture_transmission import composite_transmission_loss +from phonometry.building.prediction.aperture_transmission import composite_transmission_loss building.window_size_correction(4.0) # -2 dB: 26 dBA de catálogo -> 24 dBA @@ -321,7 +321,7 @@ mantenimiento del apartado 6. - [Aislamiento acústico de fachadas](/phonometry/es/guides/facade-insulation/): la medición de $D_{2m,nT}$ según ISO 16283-3 y su predicción según EN 12354-3, que alimentan el índice $D_{2m,nT,Atr}$ de esta página. - [Predicción del aislamiento de paneles](/phonometry/es/guides/panel-sound-insulation/): el cálculo de fachadas mixtas y la transmisión por huecos y rendijas. - [Medición del aislamiento en campo (ISO 16283)](/phonometry/es/guides/insulation-field/): los espectros por bandas de $R'$, $D_{nT}$ y $L'_{nT}$ que estas magnitudes globales resumen. -- Referencia de la API: [`building.spanish_building_code`](/phonometry/es/reference/api/building/spanish-building-code/). +- Referencia de la API: [`building.regulation.spain`](/phonometry/es/reference/api/building/spain/). ## Respuestas rápidas diff --git a/site/src/content/docs/es/guides/structure-borne-power.mdx b/site/src/content/docs/es/guides/structure-borne-power.mdx index bba14400f..a4d086637 100644 --- a/site/src/content/docs/es/guides/structure-borne-power.mdx +++ b/site/src/content/docs/es/guides/structure-borne-power.mdx @@ -285,4 +285,4 @@ sin implementar. ## Véase también -- Referencia de la API: [`building.structure_borne_power`](/phonometry/es/reference/api/building/structure-borne-power/). +- Referencia de la API: [`building.measurement.structure_borne_power`](/phonometry/es/reference/api/building/structure-borne-power/). diff --git a/site/src/content/docs/es/reference/errata.md b/site/src/content/docs/es/reference/errata.md index d37a3af1b..1aead2339 100644 --- a/site/src/content/docs/es/reference/errata.md +++ b/site/src/content/docs/es/reference/errata.md @@ -296,10 +296,10 @@ which is the check that enforces the rule; see (the 2017 Formulae (4) and (5)). - **Library behaviour:** unaffected. No code path implements the reduced form: the façade model computes $D_{2m,nT}$ from Formula (13) - ([`facade_prediction.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/facade_prediction.py)), + ([`facade_prediction.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/prediction/facade.py)), and the survey method converts with the unreduced $D_{2m,n} = D_{2m} + k + 10\log_{10}[A_0 T_0/(0{,}16 V)]$ of ISO 10052 Clause 3.15 - ([`survey_insulation.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/survey_insulation.py)). + ([`survey_insulation.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/measurement/survey_insulation.py)). The two standardization constants that *are* pre-folded elsewhere in the library are both correct: $0{,}032$ for the Part 2 impact form and $0{,}32$ for the Part 1 airborne form $D_{nT} = R' + 10\log_{10}(0{,}16 V/(T_0 S_s))$, @@ -403,7 +403,7 @@ which is the check that enforces the rule; see - **Library behaviour:** `in_situ_total_loss_factor` takes $\sum l_k \alpha_k$ as an input and `perimeter_absorption_coefficient` implements Formula (C.4); the Annex L fixture derives all five sums that way rather than using the - printed block, and says so ([`tests/building/test_detailed_prediction.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/test_detailed_prediction.py)). + printed block, and says so ([`tests/building/prediction/test_detailed_model.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/prediction/test_detailed_model.py)). - **Status:** unreported. ## ISO 12354-1:2017 Table L.3 / ISO 12354-2:2017 Table G.3 (external wall ηint) @@ -599,7 +599,7 @@ which is the check that enforces the rule; see - **Library behaviour:** `weighted_lining_improvement` returns the more conservative -10 dB at exactly 1 600 Hz and -5 dB above it, the 2000 reading, with the ambiguity named in the docstring and pinned in - [`tests/building/test_resilient_layers.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/test_resilient_layers.py). + [`tests/building/prediction/test_resilient_layers.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/prediction/test_resilient_layers.py). - **Status:** unreported. - **Related, not an erratum:** NOTE 1 of the same table sets a floor of 0 dB @@ -660,7 +660,7 @@ which is the check that enforces the rule; see 12354-1:2017 prints the same $\pi$-free form in its symbol definitions ($f_c = c_0^2/(1{,}8 c_L t)$). - **Library behaviour:** implements the $\pi$-free form - (`phonometry.building.flanking_transmission.critical_frequency`), with a + (`phonometry.building.measurement.flanking_transmission.critical_frequency`), with a misprint note in the docstring. - **Status:** corrected upstream — ISO 10848-1:2017 (second edition) prints the $\pi$-free form in its Formula (5), $f_c = c_0^2/(1{,}8 h c_L)$, @@ -1931,7 +1931,7 @@ which is the check that enforces the rule; see - **Library behaviour:** the regression test uses $\eta = 1{,}5 \cdot 10^{-3}$, the value the printed answers require - ([`tests/building/test_panel_transmission.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/test_panel_transmission.py)). + ([`tests/building/prediction/test_panel_transmission.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/prediction/test_panel_transmission.py)). - **Status:** unreported (textbook rather than a standard). --- @@ -1975,14 +1975,14 @@ which is the check that enforces the rule; see Eq. (9.19) at all: the two equations the book presents as a pair are inconsistent with each other. - **Library behaviour:** `plenum_flanking_reduction_index` in - [`ceiling_plenum.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/ceiling_plenum.py) + [`ceiling_plenum.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/prediction/ceiling_plenum.py) implements the derived $m'_R$ in both the exponent and the denominator, with the reading documented at the formula, and rejects a transmission factor above unity rather than reporting a negative sound reduction index. Tests pin the monotonicity, the $\tau_\text{cl} \le 1$ bound, the convergence to Eq. (9.20) and the size of the Eq. (9.17) leakage term at a realistic ceiling - ([`tests/building/test_ceiling_plenum.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/test_ceiling_plenum.py)). + ([`tests/building/prediction/test_ceiling_plenum.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/prediction/test_ceiling_plenum.py)). - **Status:** unreported (textbook rather than a standard). Mechel's original 1980 paper, which Vigran reproduces, was not available to check whether the misprint originates there. diff --git a/site/src/content/docs/guides/detailed-prediction.mdx b/site/src/content/docs/guides/detailed-prediction.mdx index f389e9c42..2d84536e1 100644 --- a/site/src/content/docs/guides/detailed-prediction.mdx +++ b/site/src/content/docs/guides/detailed-prediction.mdx @@ -414,4 +414,4 @@ which each path peaks. Both need the ISO 717 rating, so the spectrum must cover result the prediction is checked against. - [Dynamic stiffness of resilient materials (EN 29052-1)](/phonometry/guides/dynamic-stiffness/): the $s'$ behind the floating floor's resonance frequency. -- API reference: [`building.detailed_prediction`](/phonometry/reference/api/building/detailed-prediction/). +- API reference: [`building.prediction.detailed_model`](/phonometry/reference/api/building/detailed-model/). diff --git a/site/src/content/docs/guides/facade-insulation.mdx b/site/src/content/docs/guides/facade-insulation.mdx index c5164a3e3..0ce7d05da 100644 --- a/site/src/content/docs/guides/facade-insulation.mdx +++ b/site/src/content/docs/guides/facade-insulation.mdx @@ -629,4 +629,4 @@ formulas rather than the printed rows. onwards from the radiating side of EN 12354-4. - [Theory](/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.facade_prediction`](/phonometry/reference/api/building/facade-prediction/) and [`building.insulation`](/phonometry/reference/api/building/insulation/). +- API reference: [`building.prediction.facade`](/phonometry/reference/api/building/facade/) and [`building.measurement.insulation`](/phonometry/reference/api/building/insulation/). diff --git a/site/src/content/docs/guides/flanking-lab.mdx b/site/src/content/docs/guides/flanking-lab.mdx index 62d8b0624..1552fc17f 100644 --- a/site/src/content/docs/guides/flanking-lab.mdx +++ b/site/src/content/docs/guides/flanking-lab.mdx @@ -462,5 +462,5 @@ $k'$ of a lined duct is an input here, not a prediction. formulae in the EN 12354 derivation. - [Room-to-room and open-plan acoustics](/phonometry/guides/open-plan-acoustics/): the open-plan context the ceiling flanking path usually appears in. -- API reference: [`building.flanking_transmission`](/phonometry/reference/api/building/flanking-transmission/) - and [`building.ceiling_plenum`](/phonometry/reference/api/building/ceiling-plenum/). +- API reference: [`building.measurement.flanking_transmission`](/phonometry/reference/api/building/flanking-transmission/) + and [`building.prediction.ceiling_plenum`](/phonometry/reference/api/building/ceiling-plenum/). diff --git a/site/src/content/docs/guides/heavy-impact-sources.mdx b/site/src/content/docs/guides/heavy-impact-sources.mdx index 02968bdc9..3242570e6 100644 --- a/site/src/content/docs/guides/heavy-impact-sources.mdx +++ b/site/src/content/docs/guides/heavy-impact-sources.mdx @@ -274,4 +274,4 @@ published 25-band reproduction of Formula (4). engine that rates the tapping-machine quantities. - [Floor-Covering Impact Improvement (ISO 16251-1)](/phonometry/guides/impact-improvement/): the improvement a soft covering gives against the light source. -- API reference: [`building.heavy_impact`](/phonometry/reference/api/building/heavy-impact/). +- API reference: [`building.measurement.heavy_impact`](/phonometry/reference/api/building/heavy-impact/). diff --git a/site/src/content/docs/guides/impact-improvement.mdx b/site/src/content/docs/guides/impact-improvement.mdx index 163e1d5b3..6f403eeca 100644 --- a/site/src/content/docs/guides/impact-improvement.mdx +++ b/site/src/content/docs/guides/impact-improvement.mdx @@ -272,4 +272,4 @@ axis of the Foret et al. (2011) worked example. the reference-curve engine behind the weighted improvement. - [Theory](/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single numbers. -- API reference: [`building.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/). +- API reference: [`building.measurement.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/). diff --git a/site/src/content/docs/guides/installed-structure-borne.mdx b/site/src/content/docs/guides/installed-structure-borne.mdx index c2f878370..b3f9c55a7 100644 --- a/site/src/content/docs/guides/installed-structure-borne.mdx +++ b/site/src/content/docs/guides/installed-structure-borne.mdx @@ -257,4 +257,4 @@ implemented, not the 2023 revision. radiators. - [Predicting Sound Insulation (EN 12354)](/phonometry/guides/insulation-prediction/): the airborne and impact members of the same prediction family. -- API reference: [`building.installed_structure_borne`](/phonometry/reference/api/building/installed-structure-borne/). +- API reference: [`building.prediction.installed_structure_borne`](/phonometry/reference/api/building/installed-structure-borne/). diff --git a/site/src/content/docs/guides/insulation-field.mdx b/site/src/content/docs/guides/insulation-field.mdx index d77590c35..a1612b64e 100644 --- a/site/src/content/docs/guides/insulation-field.mdx +++ b/site/src/content/docs/guides/insulation-field.mdx @@ -509,7 +509,7 @@ sound-intensity route ISO 15186-1/-2 used for the insulation spectra. - [Theory](/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.insulation`](/phonometry/reference/api/building/insulation/) and [`building.building_uncertainty`](/phonometry/reference/api/building/building-uncertainty/). +- API reference: [`building.measurement.insulation`](/phonometry/reference/api/building/insulation/) and [`building.measurement.uncertainty`](/phonometry/reference/api/building/uncertainty/). ## Quick answers diff --git a/site/src/content/docs/guides/insulation-intensity.mdx b/site/src/content/docs/guides/insulation-intensity.mdx index 5e18d0960..568973199 100644 --- a/site/src/content/docs/guides/insulation-intensity.mdx +++ b/site/src/content/docs/guides/insulation-intensity.mdx @@ -354,4 +354,4 @@ unchanged to field data, but nothing checks how that data was acquired. every scan. - [Theory](/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.intensity_insulation`](/phonometry/reference/api/building/intensity-insulation/). +- API reference: [`building.measurement.intensity_insulation`](/phonometry/reference/api/building/intensity-insulation/). diff --git a/site/src/content/docs/guides/insulation-lab.mdx b/site/src/content/docs/guides/insulation-lab.mdx index 7f3f7ab64..8ac0003fa 100644 --- a/site/src/content/docs/guides/insulation-lab.mdx +++ b/site/src/content/docs/guides/insulation-lab.mdx @@ -335,4 +335,4 @@ the floor-covering improvement (ISO 16251-1) and flanking transmission the reference-curve engine behind $R_w$ and $L_{n,w}$. - [Sound Power](/phonometry/guides/sound-power/): the $L_W$ methods that share the absorption-area machinery of the receiving room. -- API reference: [`building.lab_insulation`](/phonometry/reference/api/building/lab-insulation/). +- API reference: [`building.measurement.lab_insulation`](/phonometry/reference/api/building/lab-insulation/). diff --git a/site/src/content/docs/guides/insulation-prediction.mdx b/site/src/content/docs/guides/insulation-prediction.mdx index 1d5f955a9..8638c1592 100644 --- a/site/src/content/docs/guides/insulation-prediction.mdx +++ b/site/src/content/docs/guides/insulation-prediction.mdx @@ -438,4 +438,4 @@ and EN 12354-6's absorption model in the absorption member of the same EN 12354 family. - [Dynamic stiffness of resilient materials (EN 29052-1)](/phonometry/guides/dynamic-stiffness/): the $s'$ input to the EN 12354-2 floating-floor term. -- API reference: [`building.building_prediction`](/phonometry/reference/api/building/building-prediction/) and [`building.facade_prediction`](/phonometry/reference/api/building/facade-prediction/). +- API reference: [`building.prediction.global_model`](/phonometry/reference/api/building/global-model/) and [`building.prediction.facade`](/phonometry/reference/api/building/facade/). diff --git a/site/src/content/docs/guides/insulation-ratings.mdx b/site/src/content/docs/guides/insulation-ratings.mdx index 56c14dc19..39180344c 100644 --- a/site/src/content/docs/guides/insulation-ratings.mdx +++ b/site/src/content/docs/guides/insulation-ratings.mdx @@ -457,7 +457,7 @@ engines from their own guides rather than duplicating them. the single-number model that consumes these ratings. - [Theory](/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.insulation`](/phonometry/reference/api/building/insulation/). +- API reference: [`building.measurement.insulation`](/phonometry/reference/api/building/insulation/). ## Quick answers diff --git a/site/src/content/docs/guides/insulation-survey.mdx b/site/src/content/docs/guides/insulation-survey.mdx index 274f0b211..4e3584d32 100644 --- a/site/src/content/docs/guides/insulation-survey.mdx +++ b/site/src/content/docs/guides/insulation-survey.mdx @@ -267,4 +267,4 @@ step up to octave-band levels. - [Theory](/phonometry/reference/theory/rooms-buildings/): the reference-curve derivation behind the weighted single-number ratings. -- API reference: [`building.survey_insulation`](/phonometry/reference/api/building/survey-insulation/). +- API reference: [`building.measurement.survey_insulation`](/phonometry/reference/api/building/survey-insulation/). diff --git a/site/src/content/docs/guides/panel-sound-insulation.mdx b/site/src/content/docs/guides/panel-sound-insulation.mdx index 4497d1766..a4fa640d1 100644 --- a/site/src/content/docs/guides/panel-sound-insulation.mdx +++ b/site/src/content/docs/guides/panel-sound-insulation.mdx @@ -898,4 +898,4 @@ room-plate-cavity-plate-room chain. the measured counterpart of the theoretical point mobilities. - [Porous and multilayer absorbers](/phonometry/guides/porous-absorbers/): the cavity-fill models a double wall consumes. -- API reference: [`building.panel_transmission`](/phonometry/reference/api/building/panel-transmission/), [`building.masonry_cavity_wall`](/phonometry/reference/api/building/masonry-cavity-wall/), [`building.aperture_transmission`](/phonometry/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](/phonometry/reference/api/vibration/radiation-efficiency/) and [`vibration.structural.point_mobility`](/phonometry/reference/api/vibration/point-mobility/). +- API reference: [`building.prediction.panel_transmission`](/phonometry/reference/api/building/panel-transmission/), [`building.prediction.masonry_cavity_wall`](/phonometry/reference/api/building/masonry-cavity-wall/), [`building.prediction.aperture_transmission`](/phonometry/reference/api/building/aperture-transmission/), [`vibration.structural.radiation_efficiency`](/phonometry/reference/api/vibration/radiation-efficiency/) and [`vibration.structural.point_mobility`](/phonometry/reference/api/vibration/point-mobility/). diff --git a/site/src/content/docs/guides/resilient-layers.mdx b/site/src/content/docs/guides/resilient-layers.mdx index d2f4498cd..022c31cd5 100644 --- a/site/src/content/docs/guides/resilient-layers.mdx +++ b/site/src/content/docs/guides/resilient-layers.mdx @@ -432,4 +432,4 @@ sources (the rubber ball) are not covered by any of these models. - [Predicting Panel Sound Insulation](/phonometry/guides/panel-sound-insulation/): the mass-spring-mass resonance of a double leaf, the airborne counterpart of the lining resonance. -- API reference: [`building.resilient_layers`](/phonometry/reference/api/building/resilient-layers/). +- API reference: [`building.prediction.resilient_layers`](/phonometry/reference/api/building/resilient-layers/). diff --git a/site/src/content/docs/guides/spanish-building-code.mdx b/site/src/content/docs/guides/spanish-building-code.mdx index 08871bddd..64b7f26b8 100644 --- a/site/src/content/docs/guides/spanish-building-code.mdx +++ b/site/src/content/docs/guides/spanish-building-code.mdx @@ -263,7 +263,7 @@ of 26 dBA, the whole comes out at 31.5 dBA: ```python from phonometry import building -from phonometry.building.aperture_transmission import composite_transmission_loss +from phonometry.building.prediction.aperture_transmission import composite_transmission_loss building.window_size_correction(4.0) # -2 dB: 26 dBA catalogued -> 24 dBA @@ -308,7 +308,7 @@ are out of scope as well. - [Façade Sound Insulation](/phonometry/guides/facade-insulation/): the ISO 16283-3 measurement of $D_{2m,nT}$ and its EN 12354-3 prediction, which feed the $D_{2m,nT,Atr}$ index of this page. - [Predicting Panel Sound Insulation](/phonometry/guides/panel-sound-insulation/): the composite-facade calculation and transmission through openings and slits. - [Field Insulation Measurement (ISO 16283)](/phonometry/guides/insulation-field/): the band spectra of $R'$, $D_{nT}$ and $L'_{nT}$ that these global quantities summarise. -- API reference: [`building.spanish_building_code`](/phonometry/reference/api/building/spanish-building-code/). +- API reference: [`building.regulation.spain`](/phonometry/reference/api/building/spain/). ## Quick answers diff --git a/site/src/content/docs/guides/structure-borne-power.mdx b/site/src/content/docs/guides/structure-borne-power.mdx index aeadaa24d..692f64dab 100644 --- a/site/src/content/docs/guides/structure-borne-power.mdx +++ b/site/src/content/docs/guides/structure-borne-power.mdx @@ -273,4 +273,4 @@ cited as the source-side counterpart, not implemented. ## See also -- API reference: [`building.structure_borne_power`](/phonometry/reference/api/building/structure-borne-power/). +- API reference: [`building.measurement.structure_borne_power`](/phonometry/reference/api/building/structure-borne-power/). diff --git a/site/src/content/docs/reference/api/building/aperture-transmission.md b/site/src/content/docs/reference/api/building/aperture-transmission.md index 994e211a2..1d42329e3 100644 --- a/site/src/content/docs/reference/api/building/aperture-transmission.md +++ b/site/src/content/docs/reference/api/building/aperture-transmission.md @@ -1,5 +1,5 @@ --- -title: "building.aperture_transmission" +title: "building.prediction.aperture_transmission" description: "Sound transmission through slits, holes and apertures (Hopkins 2007, Sound Insulation, Section 4.3.10; Gomperts 1964; Wilson & Soroka 1965)." sidebar: label: "aperture_transmission" @@ -49,7 +49,7 @@ $$ so a bare opening ($R = 0$, $\tau = 1$) of relative area $S_a/S$ caps the composite at $10 \log_{10}(S / S_a)$. This is the same energetic combination used by the EN 12354-3/-4 facade model of -[`phonometry.building.facade_prediction`](/phonometry/reference/api/building/facade-prediction/). +[`phonometry.building.prediction.facade`](/phonometry/reference/api/building/facade/). > Auto-generated from the source docstrings by `scripts/generate_api_docs.py` (`make api-docs`). Do not edit by hand. diff --git a/site/src/content/docs/reference/api/building/ceiling-plenum.md b/site/src/content/docs/reference/api/building/ceiling-plenum.md index 821044c84..7b5b75c31 100644 --- a/site/src/content/docs/reference/api/building/ceiling-plenum.md +++ b/site/src/content/docs/reference/api/building/ceiling-plenum.md @@ -1,5 +1,5 @@ --- -title: "building.ceiling_plenum" +title: "building.prediction.ceiling_plenum" description: "Suspended-ceiling plenum flanking path (Vigran 9.2.3 after Mechel 1980; ISO 140-9 / ISO 10848-2; ASTM E1414 / ASTM E413)." sidebar: label: "ceiling_plenum" diff --git a/site/src/content/docs/reference/api/building/detailed-prediction.md b/site/src/content/docs/reference/api/building/detailed-model.md similarity index 92% rename from site/src/content/docs/reference/api/building/detailed-prediction.md rename to site/src/content/docs/reference/api/building/detailed-model.md index f4d363fec..3a2f41d94 100644 --- a/site/src/content/docs/reference/api/building/detailed-prediction.md +++ b/site/src/content/docs/reference/api/building/detailed-model.md @@ -1,15 +1,15 @@ --- -title: "building.detailed_prediction" +title: "building.prediction.detailed_model" description: "Detailed per-band building prediction (EN/ISO 12354-1/-2:2017)." sidebar: - label: "detailed_prediction" + label: "detailed_model" --- Detailed per-band building prediction (EN/ISO 12354-1/-2:2017). This is the **detailed model** of the building-prediction chain, the per-band counterpart of the simplified single-number model implemented in -[`phonometry.building.building_prediction`](/phonometry/reference/api/building/building-prediction/). Where the simplified model +[`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/). Where the simplified model combines the weighted ratings of the elements (`Rw`, `ΔRw`, `Kij`) into a single `R'w` / `L'n,w`, the detailed model carries every quantity through the one-third-octave (or octave) bands, converts the laboratory element data to @@ -22,10 +22,10 @@ spectra are known and the dominant path per band matters. 1. Element data per band. For homogeneous elements the sound reduction index follows from the material properties with the Annex B model: the radiation factor for free bending waves `σ` (Formulae B.4 to B.6, - [`bending_radiation_factor`](/phonometry/reference/api/building/detailed-prediction/#bending_radiation_factor)), the radiation factor for forced waves `σf` - (Formula B.3, [`forced_radiation_factor`](/phonometry/reference/api/building/detailed-prediction/#forced_radiation_factor)) and the three-branch + [`bending_radiation_factor`](/phonometry/reference/api/building/detailed-model/#bending_radiation_factor)), the radiation factor for forced waves `σf` + (Formula B.3, [`forced_radiation_factor`](/phonometry/reference/api/building/detailed-model/#forced_radiation_factor)) and the three-branch transmission factor of Formula (B.2) - ([`calculated_sound_reduction_index`](/phonometry/reference/api/building/detailed-prediction/#calculated_sound_reduction_index)). + ([`calculated_sound_reduction_index`](/phonometry/reference/api/building/detailed-model/#calculated_sound_reduction_index)). 2. In-situ conversion (Clause 4.2.2). The total loss factor in situ follows from Annex C Formula (C.1), @@ -33,56 +33,56 @@ spectra are known and the dominant path per band matters. \eta_{tot} = \eta_{int} + \frac{2 \rho_o c_o \sigma}{2 \pi f m'} + \frac{c_o}{\pi^2 S \sqrt{f f_c}} \sum_k l_k \alpha_k $$ - ([`in_situ_total_loss_factor`](/phonometry/reference/api/building/detailed-prediction/#in_situ_total_loss_factor)), with the perimeter absorption + ([`in_situ_total_loss_factor`](/phonometry/reference/api/building/detailed-model/#in_situ_total_loss_factor)), with the perimeter absorption coefficients deduced from the junctions' vibration reduction indices - (Formula C.4, [`perimeter_absorption_coefficient`](/phonometry/reference/api/building/detailed-prediction/#perimeter_absorption_coefficient)). From it come the + (Formula C.4, [`perimeter_absorption_coefficient`](/phonometry/reference/api/building/detailed-model/#perimeter_absorption_coefficient)). From it come the structural reverberation time $T_s = 2.2/(f \eta_{tot})$ - ([`structural_reverberation_time`](/phonometry/reference/api/building/detailed-prediction/#structural_reverberation_time)), the in-situ index + ([`structural_reverberation_time`](/phonometry/reference/api/building/detailed-model/#structural_reverberation_time)), the in-situ index $R_{situ} = R - 10 \log_{10}(T_{s,situ}/T_{s,lab})$ (Formula 9, - [`in_situ_reduction_index`](/phonometry/reference/api/building/detailed-prediction/#in_situ_reduction_index)) and the equivalent absorption length + [`in_situ_reduction_index`](/phonometry/reference/api/building/detailed-model/#in_situ_reduction_index)) and the equivalent absorption length $a_{situ} = 2.2\,\pi^2 S \sqrt{f_{ref}/f}/(c_o T_{s,situ})$ (Formula 11). 3. Junctions (Formula 10). $D_{v,ij,situ} = K_{ij} - 10 \log_{10}(l_{ij}/\sqrt{a_{i,situ} a_{j,situ}})$, - floored at 0 dB ([`in_situ_velocity_level_difference`](/phonometry/reference/api/building/detailed-prediction/#in_situ_velocity_level_difference)). + floored at 0 dB ([`in_situ_velocity_level_difference`](/phonometry/reference/api/building/detailed-model/#in_situ_velocity_level_difference)). 4. Paths. The direct path is $R_{Dd} = R_{s,situ} + \Delta R_{D,situ} + \Delta R_{d,situ}$ (Formula 14) and each flanking path (Formula 15) is $R_{ij} = R_{i,situ}/2 + \Delta R_{i,situ} + R_{j,situ}/2 + \Delta R_{j,situ} + D_{v,ij,situ} + T$ with the geometry term $T = 10 \log_{10}(S_s/\sqrt{S_i S_j})$ - ([`flanking_reduction_index`](/phonometry/reference/api/building/detailed-prediction/#flanking_reduction_index)). + ([`flanking_reduction_index`](/phonometry/reference/api/building/detailed-model/#flanking_reduction_index)). 5. Assembly. $R' = -10 \log_{10}(\sum 10^{-R/10})$ over the direct path and all flanking paths (Formulae 1 to 4), then `R'w (C; Ctr)` per ISO 717-1 - ([`detailed_airborne_prediction`](/phonometry/reference/api/building/detailed-prediction/#detailed_airborne_prediction)). + ([`detailed_airborne_prediction`](/phonometry/reference/api/building/detailed-model/#detailed_airborne_prediction)). **Chain, impact (ISO 12354-2:2017, Clause 4.2).** The bare floor's normalized impact sound pressure level per band follows from Annex B Formula (B.2), $L_n = 155 - 30 \log_{10}(m') + 10 \log_{10}(T_s) + 10 \log_{10}(\sigma) + 10 \log_{10}(f/f_{ref})$ -([`bare_floor_impact_level`](/phonometry/reference/api/building/detailed-prediction/#bare_floor_impact_level)); the direct path is +([`bare_floor_impact_level`](/phonometry/reference/api/building/detailed-model/#bare_floor_impact_level)); the direct path is $L_{n,d} = L_{n,situ} - \Delta L_{situ} - \Delta L_{d,situ}$ (Formula 11) and each flanking path (Formula 12) is $L_{n,ij} = L_{n,situ} - \Delta L_{situ} + (R_{i,situ} - R_{j,situ})/2 - \Delta R_{j,situ} - D_{v,ij,situ} - 10 \log_{10}(S_i/\sqrt{S_i S_j})$ -([`flanking_impact_level`](/phonometry/reference/api/building/detailed-prediction/#flanking_impact_level)), combined +([`flanking_impact_level`](/phonometry/reference/api/building/detailed-model/#flanking_impact_level)), combined energetically into `L'n` and rated `L'n,w (CI)` per ISO 717-2 -([`detailed_impact_prediction`](/phonometry/reference/api/building/detailed-prediction/#detailed_impact_prediction)). +([`detailed_impact_prediction`](/phonometry/reference/api/building/detailed-model/#detailed_impact_prediction)). The two parts share the same in-situ machinery, so a building is described once -([`HomogeneousElement`](/phonometry/reference/api/building/detailed-prediction/#homogeneouselement) per element, [`in_situ_element`](/phonometry/reference/api/building/detailed-prediction/#in_situ_element) per band) and +([`HomogeneousElement`](/phonometry/reference/api/building/detailed-model/#homogeneouselement) per element, [`in_situ_element`](/phonometry/reference/api/building/detailed-model/#in_situ_element) per band) and both the airborne and the impact chain read the same -[`InSituElementResult`](/phonometry/reference/api/building/detailed-prediction/#insituelementresult). +[`InSituElementResult`](/phonometry/reference/api/building/detailed-model/#insituelementresult). -**Type A and Type B elements.** [`HomogeneousElement`](/phonometry/reference/api/building/detailed-prediction/#homogeneouselement) and -[`in_situ_element`](/phonometry/reference/api/building/detailed-prediction/#in_situ_element) describe a **Type A** element, one whose structural +**Type A and Type B elements.** [`HomogeneousElement`](/phonometry/reference/api/building/detailed-model/#homogeneouselement) and +[`in_situ_element`](/phonometry/reference/api/building/detailed-model/#in_situ_element) describe a **Type A** element, one whose structural reverberation time is set by the elements connected to it. For a **Type B** element the standard takes $T_{s,situ} = T_{s,lab}$ (so no in-situ transfer is needed) and describes the junction with the normalized direction-averaged velocity level difference `Dv,ij,n` instead of `Kij`, or with a laboratory measurement of the flanking level difference `Dn,f`. Those branches are -[`flanking_reduction_index_from_normalized_difference`](/phonometry/reference/api/building/detailed-prediction/#flanking_reduction_index_from_normalized_difference) (Formula 17), -[`flanking_impact_level_from_normalized_difference`](/phonometry/reference/api/building/detailed-prediction/#flanking_impact_level_from_normalized_difference) (Part 2, Formula 14) -and [`flanking_reduction_index_from_flanking_level`](/phonometry/reference/api/building/detailed-prediction/#flanking_reduction_index_from_flanking_level) (Formula 16), with -[`resonant_sound_reduction_index`](/phonometry/reference/api/building/detailed-prediction/#resonant_sound_reduction_index) for the Annex B.1 correction their +[`flanking_reduction_index_from_normalized_difference`](/phonometry/reference/api/building/detailed-model/#flanking_reduction_index_from_normalized_difference) (Formula 17), +[`flanking_impact_level_from_normalized_difference`](/phonometry/reference/api/building/detailed-model/#flanking_impact_level_from_normalized_difference) (Part 2, Formula 14) +and [`flanking_reduction_index_from_flanking_level`](/phonometry/reference/api/building/detailed-model/#flanking_reduction_index_from_flanking_level) (Formula 16), with +[`resonant_sound_reduction_index`](/phonometry/reference/api/building/detailed-model/#resonant_sound_reduction_index) for the Annex B.1 correction their element indices need below `fc`. Clause and formula citations refer to ISO 12354-1:2017 (airborne) or @@ -130,7 +130,7 @@ equivalent absorption lengths with Formula (10), then Formula (15) gives | `delta_r_i` | `ΔRi,situ` on element `i`, per band, in dB. | | `delta_r_j` | `ΔRj,situ` on element `j`, per band, in dB. | -**Returns:** The [`BandPath`](/phonometry/reference/api/building/detailed-prediction/#bandpath) carrying `Rij`. +**Returns:** The [`BandPath`](/phonometry/reference/api/building/detailed-model/#bandpath) carrying `Rij`. **Raises** @@ -316,8 +316,8 @@ upwards on its lightweight blockwork. | `mass_per_area` | Mass per unit area `m'`, in kg/m². | | `critical_frequency` | Critical frequency `fc`, in Hz. | | `total_loss_factor` | Total loss factor `ηtot` per band (laboratory or in situ, matching the situation being described). | -| `radiation_factor` | Radiation factor for free bending waves `σ` per band (see [`bending_radiation_factor`](/phonometry/reference/api/building/detailed-prediction/#bending_radiation_factor)). | -| `forced_radiation_factor` | Radiation factor for forced waves `σf` per band (see [`forced_radiation_factor`](/phonometry/reference/api/building/detailed-prediction/#forced_radiation_factor)); ignored when `resonant_only` is set. | +| `radiation_factor` | Radiation factor for free bending waves `σ` per band (see [`bending_radiation_factor`](/phonometry/reference/api/building/detailed-model/#bending_radiation_factor)). | +| `forced_radiation_factor` | Radiation factor for forced waves `σf` per band (see [`forced_radiation_factor`](/phonometry/reference/api/building/detailed-model/#forced_radiation_factor)); ignored when `resonant_only` is set. | | `bands` | `"third"` (default) or `"octave"`, setting the band limits used to locate the $f \approx f_c$ branch. | | `resonant_only` | Drop the forced-transmission term below `fc`. | | `density` | Density `ρ` of the material, in kg/m³; with `longitudinal_velocity` it enables the Formula (B.10) plateau. | @@ -361,12 +361,12 @@ the bands cover the rating range (100 Hz to 3150 Hz in one-third octaves, | Name | Description | | :--- | :--- | | `frequencies` | Band centre frequencies, in Hz. | -| `direct_index` | `RDd` per band, in dB (see [`direct_reduction_index`](/phonometry/reference/api/building/detailed-prediction/#direct_reduction_index)). | -| `flanking_paths` | The flanking paths (see [`airborne_flanking_path`](/phonometry/reference/api/building/detailed-prediction/#airborne_flanking_path)); may be empty. | +| `direct_index` | `RDd` per band, in dB (see [`direct_reduction_index`](/phonometry/reference/api/building/detailed-model/#direct_reduction_index)). | +| `flanking_paths` | The flanking paths (see [`airborne_flanking_path`](/phonometry/reference/api/building/detailed-model/#airborne_flanking_path)); may be empty. | | `direct_label` | Label of the direct path (Default: `"Dd"`). | | `bands` | `"third"` (default) or `"octave"`, selecting the ISO 717-1 rating range. | -**Returns:** The [`DetailedAirborneResult`](/phonometry/reference/api/building/detailed-prediction/#detailedairborneresult). +**Returns:** The [`DetailedAirborneResult`](/phonometry/reference/api/building/detailed-model/#detailedairborneresult). **Raises** @@ -402,12 +402,12 @@ carries no direct path at all. | Name | Description | | :--- | :--- | | `frequencies` | Band centre frequencies, in Hz. | -| `direct_level` | `Ln,d` per band, in dB (see [`direct_impact_level`](/phonometry/reference/api/building/detailed-prediction/#direct_impact_level)), or `None` for the Formula (2) case of two rooms next to each other, which has no direct path. | -| `flanking_paths` | The flanking paths (see [`impact_flanking_path`](/phonometry/reference/api/building/detailed-prediction/#impact_flanking_path)); may be empty when `direct_level` is given. | +| `direct_level` | `Ln,d` per band, in dB (see [`direct_impact_level`](/phonometry/reference/api/building/detailed-model/#direct_impact_level)), or `None` for the Formula (2) case of two rooms next to each other, which has no direct path. | +| `flanking_paths` | The flanking paths (see [`impact_flanking_path`](/phonometry/reference/api/building/detailed-model/#impact_flanking_path)); may be empty when `direct_level` is given. | | `direct_label` | Label of the direct path (Default: `"Dd"`). | | `bands` | `"third"` (default) or `"octave"`. | -**Returns:** The [`DetailedImpactResult`](/phonometry/reference/api/building/detailed-prediction/#detailedimpactresult). +**Returns:** The [`DetailedImpactResult`](/phonometry/reference/api/building/detailed-model/#detailedimpactresult). **Raises** @@ -563,7 +563,7 @@ DetailedImpactResult.report( Render a detailed impact prediction fiche (EN/ISO 12354-2). -The impact counterpart of [`DetailedAirborneResult.report`](/phonometry/reference/api/building/detailed-prediction/#detailedairborneresultreport): the +The impact counterpart of [`DetailedAirborneResult.report`](/phonometry/reference/api/building/detailed-model/#detailedairborneresultreport): the per-band detailed model of ISO 12354-2:2017 Clause 4.2, with the boxed predicted `L'n,w` and a PASS/FAIL verdict against a requirement (a lower level passing). @@ -704,7 +704,7 @@ flanking_impact_level_from_flanking_level( Flanking impact level from a measured `Ln,f` (Part 2, Formula 13). $L_{n,ij} = L_{n,f,ij,situ} - 10 \log_{10}(S_i l_{lab}/(S_{i,lab} l_{ij}))$, the impact twin of -the airborne [`flanking_reduction_index_from_flanking_level`](/phonometry/reference/api/building/detailed-prediction/#flanking_reduction_index_from_flanking_level): the +the airborne [`flanking_reduction_index_from_flanking_level`](/phonometry/reference/api/building/detailed-model/#flanking_reduction_index_from_flanking_level): the route used when the flanking construction is characterised as a whole by a laboratory measurement of the normalized flanking impact sound pressure level (ISO 10848) instead of by the properties of its elements. The @@ -808,7 +808,7 @@ flanking element as `j`. | :--- | :--- | | `index_i` | `Ri,situ` of the element excited in the source room, in dB per band. | | `index_j` | `Rj,situ` of the radiating element in the receiving room, per band, in dB. | -| `velocity_level_difference` | `Dv,ij,situ` per band, in dB (see [`in_situ_velocity_level_difference`](/phonometry/reference/api/building/detailed-prediction/#in_situ_velocity_level_difference); for a Type B junction pass the Formula (12) value derived from `Dv,ij,n`). | +| `velocity_level_difference` | `Dv,ij,situ` per band, in dB (see [`in_situ_velocity_level_difference`](/phonometry/reference/api/building/detailed-model/#in_situ_velocity_level_difference); for a Type B junction pass the Formula (12) value derived from `Dv,ij,n`). | | `separating_area` | Separating-element area `Ss`, in m². | | `area_i` | Area `Si` of element `i`, in m². | | `area_j` | Area `Sj` of element `j`, in m². | @@ -889,7 +889,7 @@ the *normalized* direction-averaged velocity level difference `Dv,ij,n` (ISO 12354-1 Annex F) rather than by `Kij`: the form used for lightweight double-leaf constructions, where the indices refer either to the double element as a whole or to its inner leaf and should relate to resonant -transmission only (see [`resonant_sound_reduction_index`](/phonometry/reference/api/building/detailed-prediction/#resonant_sound_reduction_index)). +transmission only (see [`resonant_sound_reduction_index`](/phonometry/reference/api/building/detailed-model/#resonant_sound_reduction_index)). **Parameters** @@ -1025,7 +1025,7 @@ A Type A homogeneous element of the detailed model. | `mass_per_area` | Mass per unit area `m'`, in kg/m². | | `critical_frequency` | Critical frequency `fc`, in Hz. | | `internal_loss_factor` | Internal loss factor `ηint` of the material (about 0,01 for common homogeneous building materials; ISO 12354-1 Table B.3 tabulates it per material). | -| `perimeter_absorption` | $\sum l_k \alpha_k$ over the element's perimeter, in m (Formula C.1; build it from [`perimeter_absorption_coefficient`](/phonometry/reference/api/building/detailed-prediction/#perimeter_absorption_coefficient) times the border lengths). | +| `perimeter_absorption` | $\sum l_k \alpha_k$ over the element's perimeter, in m (Formula C.1; build it from [`perimeter_absorption_coefficient`](/phonometry/reference/api/building/detailed-model/#perimeter_absorption_coefficient) times the border lengths). | | `density` | Density `ρ` of the material, in kg/m³; supplied together with `longitudinal_velocity` it enables the high-frequency plateau of Formula (B.10). `None` (the default) leaves the plateau off. | | `longitudinal_velocity` | Quasi-longitudinal phase velocity `cL` of the material, in m/s (ISO 12354-1 Table B.3). | @@ -1058,7 +1058,7 @@ Build one impact flanking path `Df` (Part 2, Formula 12). | `delta_l` | Improvement of the floor covering `ΔLsitu`, in dB. | | `delta_r_j` | `ΔRj,situ` of a lining on the flanking element, in dB. | -**Returns:** The [`BandPath`](/phonometry/reference/api/building/detailed-prediction/#bandpath) carrying `Ln,ij`. +**Returns:** The [`BandPath`](/phonometry/reference/api/building/detailed-model/#bandpath) carrying `Ln,ij`. **Raises** @@ -1090,21 +1090,21 @@ index and, for a floor, the calculated in-situ normalized impact level. Because the element performance is *calculated from material properties*, the in-situ loss factor enters Formula (B.2) directly and no $10 \log_{10}(T_{s,situ}/T_{s,lab})$ transfer is needed -(Annex B.3). Use [`in_situ_reduction_index`](/phonometry/reference/api/building/detailed-prediction/#in_situ_reduction_index) instead when the element +(Annex B.3). Use [`in_situ_reduction_index`](/phonometry/reference/api/building/detailed-model/#in_situ_reduction_index) instead when the element data come from a laboratory measurement. **Parameters** | Name | Description | | :--- | :--- | -| `element` | The [`HomogeneousElement`](/phonometry/reference/api/building/detailed-prediction/#homogeneouselement) description. | +| `element` | The [`HomogeneousElement`](/phonometry/reference/api/building/detailed-model/#homogeneouselement) description. | | `frequencies` | Band centre frequencies, in Hz. | | `bands` | `"third"` (default) or `"octave"`. | | `resonant_only` | Drop the forced-transmission term of Formula (B.2) below `fc` (Annex B.1, flanking paths). | | `speed_of_sound` | Speed of sound in air `co`, in m/s. | | `air_density` | Density of air `ρo`, in kg/m³. | -**Returns:** The [`InSituElementResult`](/phonometry/reference/api/building/detailed-prediction/#insituelementresult). +**Returns:** The [`InSituElementResult`](/phonometry/reference/api/building/detailed-model/#insituelementresult). **Raises** @@ -1168,7 +1168,7 @@ In-situ normalized impact level `Ln,situ` (Part 2, Formula 5). $L_{n,situ} = L_n + 10 \log_{10}(T_{s,situ}/T_{s,lab})$, the sign opposite to -[`in_situ_reduction_index`](/phonometry/reference/api/building/detailed-prediction/#in_situ_reduction_index): a floor that rings longer in the building +[`in_situ_reduction_index`](/phonometry/reference/api/building/detailed-model/#in_situ_reduction_index): a floor that rings longer in the building than in the laboratory radiates more impact sound. **Parameters** @@ -1246,7 +1246,7 @@ internal losses of the material, the losses by radiation into the air and the losses at the perimeter of the element. $\sum l_k \alpha_k$ is the junction-length-weighted sum of the Formula (C.4) absorption coefficients (see -[`perimeter_absorption_coefficient`](/phonometry/reference/api/building/detailed-prediction/#perimeter_absorption_coefficient)). +[`perimeter_absorption_coefficient`](/phonometry/reference/api/building/detailed-model/#perimeter_absorption_coefficient)). **Parameters** @@ -1407,7 +1407,7 @@ summed over the elements `j` connected to the considered element at border `k` (the standard sums over at most three). Multiplied by the border length and summed over the perimeter it gives the $\sum l_k \alpha_k$ that -[`in_situ_total_loss_factor`](/phonometry/reference/api/building/detailed-prediction/#in_situ_total_loss_factor) takes. Annex C.3 places the in-situ +[`in_situ_total_loss_factor`](/phonometry/reference/api/building/detailed-model/#in_situ_total_loss_factor) takes. Annex C.3 places the in-situ coefficients between 0,05 and 0,5. **Parameters** diff --git a/site/src/content/docs/reference/api/building/facade-prediction.md b/site/src/content/docs/reference/api/building/facade.md similarity index 96% rename from site/src/content/docs/reference/api/building/facade-prediction.md rename to site/src/content/docs/reference/api/building/facade.md index dd8aa6248..acdb8ff7e 100644 --- a/site/src/content/docs/reference/api/building/facade-prediction.md +++ b/site/src/content/docs/reference/api/building/facade.md @@ -1,8 +1,8 @@ --- -title: "building.facade_prediction" +title: "building.prediction.facade" description: "Fa\u00e7ade sound insulation and outdoor radiation prediction (EN 12354-3/-4:2000)." sidebar: - label: "facade_prediction" + label: "facade" --- Façade sound insulation and outdoor radiation prediction (EN 12354-3/-4:2000). @@ -88,7 +88,7 @@ of the façade (gallery, balcony or terrace), as a function of the height of the line of sight from the source on the façade plane and the weighted sound absorption coefficient `αw` (EN ISO 11654) of the underside of the balcony/roof above. The value feeds `delta_l_fs` of -[`facade_sound_reduction`](/phonometry/reference/api/building/facade-prediction/#facade_sound_reduction) (Formula 13). Intermediate `αw` values +[`facade_sound_reduction`](/phonometry/reference/api/building/facade/#facade_sound_reduction) (Formula 13). Intermediate `αw` values are interpolated linearly between the tabulated 0,3 / 0,6 / 0,9 columns, as the annex allows; outside that range the edge column applies. The 2017 edition tabulates the same values (Tabelle C.1). @@ -138,14 +138,14 @@ indices (Formulas 11-12) and the standardized level difference (Formula 13). | Name | Description | | :--- | :--- | -| `elements` | Façade elements (see [`FacadeElement`](/phonometry/reference/api/building/facade-prediction/#facadeelement)); per-band arrays must share a common length (5 octave or 16 third-octave bands to get single-number ratings). | +| `elements` | Façade elements (see [`FacadeElement`](/phonometry/reference/api/building/facade/#facadeelement)); per-band arrays must share a common length (5 octave or 16 third-octave bands to get single-number ratings). | | `area` | Total façade area `S` seen from inside, in m². | | `volume` | Receiving-room volume `V`, in m³ (Formula 13). | | `delta_l_fs` | Façade-shape term `ΔLfs` in dB (Annex C; 0 for a flat reflecting façade). | | `bands` | `"octave"`, `"third-octave"` or `None` (auto) for the single number ratings, passed to [`weighted_rating`](/phonometry/reference/api/building/insulation/#weighted_rating). | | `frequencies` | Optional band centre frequencies (Hz), stored on the result for plotting; must match the element band count. | -**Returns:** A [`FacadePredictionResult`](/phonometry/reference/api/building/facade-prediction/#facadepredictionresult). +**Returns:** A [`FacadePredictionResult`](/phonometry/reference/api/building/facade/#facadepredictionresult). ## FacadeElement @@ -378,7 +378,7 @@ plot_facade_elements( Draw a composite facade elevation with element areas to scale. -Each element of [`facade_sound_reduction`](/phonometry/reference/api/building/facade-prediction/#facade_sound_reduction) is a +Each element of [`facade_sound_reduction`](/phonometry/reference/api/building/facade/#facade_sound_reduction) is a tile whose drawn area equals its real area (small-area elements without an area, such as airbriks rated by `dn_e`, get a nominal 0,1 m2 tile). @@ -386,7 +386,7 @@ an area, such as airbriks rated by `dn_e`, get a nominal 0,1 m2 tile). | Name | Description | | :--- | :--- | -| `elements` | The [`FacadeElement`](/phonometry/reference/api/building/facade-prediction/#facadeelement) sequence. | +| `elements` | The [`FacadeElement`](/phonometry/reference/api/building/facade/#facadeelement) sequence. | | `ax` | Existing axes, or `None` to create a figure. | | `language` | Label language, `"en"` (default) or `"es"`. | | `kwargs` | Forwarded to the first element rectangle. | @@ -412,7 +412,7 @@ Predict the sound power radiated outside by a segment (EN 12354-4). `R'` combines the element transmission factors (Formula 3); the radiated power level is $L_W = L_{p,in} + C_d - R' + 10 \log_{10}(S/S_0)$ (Formula 2). Openings -may be included as [`FacadeElement`](/phonometry/reference/api/building/facade-prediction/#facadeelement) entries with an `insertion_loss` +may be included as [`FacadeElement`](/phonometry/reference/api/building/facade/#facadeelement) entries with an `insertion_loss` (0 for a bare opening); see the module docstring for how this differs from the standard's separate segment-of-openings Formula (4). @@ -420,14 +420,14 @@ the standard's separate segment-of-openings Formula (4). | Name | Description | | :--- | :--- | -| `elements` | Segment elements (see [`FacadeElement`](/phonometry/reference/api/building/facade-prediction/#facadeelement)). | +| `elements` | Segment elements (see [`FacadeElement`](/phonometry/reference/api/building/facade/#facadeelement)). | | `lp_in` | Inside sound pressure level `Lp,in` per band, in dB. | | `area` | Segment area `S`, in m². | | `c_d` | Inside-field diffusivity term `Cd` in dB (Annex B: -6 ideal diffuse, -5 average industrial building). | | `r_prime_cap` | Optional practical maximum on `R'` per band, in dB. This cap is **not** part of Formula (2)/(3): it appears only as a footnote of the Annex G worked example ("R' limited to 40 dB" for field situations with unavoidable leaks). Pass `40.0` to reproduce Annex G; the default `None` computes the bare formulas. | | `octave_bands` | Optional octave-band centre frequencies (Hz) matching the per-band data; enables the A-weighted single number. | -**Returns:** A [`RadiatedPowerResult`](/phonometry/reference/api/building/facade-prediction/#radiatedpowerresult). +**Returns:** A [`RadiatedPowerResult`](/phonometry/reference/api/building/facade/#radiatedpowerresult). ## RadiatedPowerResult diff --git a/site/src/content/docs/reference/api/building/flanking-transmission.md b/site/src/content/docs/reference/api/building/flanking-transmission.md index 716950c38..72382b3df 100644 --- a/site/src/content/docs/reference/api/building/flanking-transmission.md +++ b/site/src/content/docs/reference/api/building/flanking-transmission.md @@ -1,5 +1,5 @@ --- -title: "building.flanking_transmission" +title: "building.measurement.flanking_transmission" description: "Laboratory measurement of flanking sound transmission (ISO 10848:2006/2010)." sidebar: label: "flanking_transmission" @@ -8,13 +8,13 @@ sidebar: Laboratory measurement of flanking sound transmission (ISO 10848:2006/2010). This is the **measurement** counterpart of the flanking-transmission -*prediction* in [`phonometry.building.building_prediction`](/phonometry/reference/api/building/building-prediction/). EN 12354-1 predicts the +*prediction* in [`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/). EN 12354-1 predicts the apparent in-situ performance from, among other inputs, the **vibration reduction index** `Kij` of each junction; ISO 10848 is the standard that *measures* that `Kij` (and the overall flanking descriptors `Dn,f` / `Ln,f`) in a qualified test facility. The measured `Kij` is a situation-invariant junction descriptor that feeds straight into the -[`phonometry.flanking_path`](/phonometry/reference/api/building/building-prediction/#flanking_path) model. +[`phonometry.flanking_path`](/phonometry/reference/api/building/global-model/#flanking_path) model. **Vibration reduction index (Part 1, Clause 3.9).** From the *direction averaged* velocity level difference diff --git a/site/src/content/docs/reference/api/building/floor-covering-improvement.md b/site/src/content/docs/reference/api/building/floor-covering-improvement.md index 93834c9be..fb8159373 100644 --- a/site/src/content/docs/reference/api/building/floor-covering-improvement.md +++ b/site/src/content/docs/reference/api/building/floor-covering-improvement.md @@ -1,5 +1,5 @@ --- -title: "building.floor_covering_improvement" +title: "building.measurement.floor_covering_improvement" description: "Impact-sound improvement of floor coverings on a small mock-up (ISO 16251-1:2014)." sidebar: label: "floor_covering_improvement" diff --git a/site/src/content/docs/reference/api/building/building-prediction.md b/site/src/content/docs/reference/api/building/global-model.md similarity index 95% rename from site/src/content/docs/reference/api/building/building-prediction.md rename to site/src/content/docs/reference/api/building/global-model.md index caba42ca9..c779d158a 100644 --- a/site/src/content/docs/reference/api/building/building-prediction.md +++ b/site/src/content/docs/reference/api/building/global-model.md @@ -1,15 +1,15 @@ --- -title: "building.building_prediction" +title: "building.prediction.global_model" description: "Building acoustic performance prediction (EN 12354-1/-2:2000)." sidebar: - label: "building_prediction" + label: "global_model" --- Building acoustic performance prediction (EN 12354-1/-2:2000). This is the **prediction** counterpart of the measurement modules -([`phonometry.building.lab_insulation`](/phonometry/reference/api/building/lab-insulation/) for laboratory `R`/`Ln` and -[`phonometry.building.insulation`](/phonometry/reference/api/building/insulation/) for field `R'`/`L'n`). EN 12354 estimates the +([`phonometry.building.measurement.lab_insulation`](/phonometry/reference/api/building/lab-insulation/) for laboratory `R`/`Ln` and +[`phonometry.building.measurement.insulation`](/phonometry/reference/api/building/insulation/) for field `R'`/`L'n`). EN 12354 estimates the *in-situ* apparent performance of a building from the laboratory performance of its elements, adding the flanking transmission that a field measurement would capture but a laboratory measurement suppresses. @@ -233,7 +233,7 @@ flanking_element( Build the three flanking paths (Ff, Df, Fd) of one flanking element. -Convenience wrapper over [`flanking_path`](/phonometry/reference/api/building/building-prediction/#flanking_path) for the common case where a +Convenience wrapper over [`flanking_path`](/phonometry/reference/api/building/global-model/#flanking_path) for the common case where a flanking element is essentially the same on the source and receiving side (Clause 4.4.1). Returns the `Ff`, `Df` and `Fd` paths that this element contributes across its junction with the separating element. @@ -245,10 +245,10 @@ junction elements are the flanking element) and `KFd`/`KDf` to $10 \log_{10}[l_f l_0 (1/S_F + 1/S_s)]$ (flanking and separating element), via -[`junction_min_vibration_reduction`](/phonometry/reference/api/building/building-prediction/#junction_min_vibration_reduction). Without `flanking_area` the +[`junction_min_vibration_reduction`](/phonometry/reference/api/building/global-model/#junction_min_vibration_reduction). Without `flanking_area` the per-path floors cannot be formed from the available geometry, so the raw `k_ff`/`k_fd`/`k_df` are used unchanged; compute the floors -yourself (or call [`flanking_path`](/phonometry/reference/api/building/building-prediction/#flanking_path) with `kij_min`) in that case to +yourself (or call [`flanking_path`](/phonometry/reference/api/building/global-model/#flanking_path) with `kij_min`) in that case to stay within Clause 4.4.2. **Parameters** @@ -268,7 +268,7 @@ stay within Clause 4.4.2. | `delta_r_df` | Combined lining improvement for the Df path, in dB. | | `flanking_area` | Flanking-element area $S_F = S_f$, in m². Enables the automatic `Kij,min` clamp (Clause 4.4.2); `None` skips it. | -**Returns:** The `(Ff, Df, Fd)` [`FlankingPath`](/phonometry/reference/api/building/building-prediction/#flankingpath) triple. +**Returns:** The `(Ff, Df, Fd)` [`FlankingPath`](/phonometry/reference/api/building/global-model/#flankingpath) triple. **Raises** @@ -310,7 +310,7 @@ When `kij_min` is given, `k_ij` is clamped up to it (`max(k_ij, kij_min)`) before the path is formed, enforcing the floor $K_{ij} \ge K_{ij,\mathrm{min}}$ of Clause 4.4.2 (compute `kij_min` with -[`junction_min_vibration_reduction`](/phonometry/reference/api/building/building-prediction/#junction_min_vibration_reduction)). Left as `None` the raw `k_ij` +[`junction_min_vibration_reduction`](/phonometry/reference/api/building/global-model/#junction_min_vibration_reduction)). Left as `None` the raw `k_ij` is used unchanged. **Parameters** @@ -327,7 +327,7 @@ is used unchanged. | `delta_r` | Combined lining improvement `ΔRij,w` for this path, in dB. | | `kij_min` | Optional `Kij,min` floor (Clause 4.4.2); `k_ij` is raised to it when it lies below. `None` disables the clamp. | -**Returns:** The [`FlankingPath`](/phonometry/reference/api/building/building-prediction/#flankingpath). +**Returns:** The [`FlankingPath`](/phonometry/reference/api/building/global-model/#flankingpath). **Raises** @@ -646,10 +646,10 @@ the transmitted energy so the dominant path is visible. | Name | Description | | :--- | :--- | | `r_direct` | Weighted sound reduction index of the separating element `Rs,w`, in dB. | -| `flanking_paths` | Flanking paths (see [`flanking_element`](/phonometry/reference/api/building/building-prediction/#flanking_element)). May be empty for the direct-only case. | +| `flanking_paths` | Flanking paths (see [`flanking_element`](/phonometry/reference/api/building/global-model/#flanking_element)). May be empty for the direct-only case. | | `delta_r_direct` | Combined lining improvement `ΔRDd,w` on the separating element, in dB. | -**Returns:** The [`AirbornePredictionResult`](/phonometry/reference/api/building/building-prediction/#airbornepredictionresult). +**Returns:** The [`AirbornePredictionResult`](/phonometry/reference/api/building/global-model/#airbornepredictionresult). **Raises** @@ -672,8 +672,8 @@ Predict the apparent impact insulation `L'n,w` (EN 12354-2 Formula 21). $L'_{n,w} = L_{n,w,eq} - \Delta L_w + K$. The bare-floor equivalent level may come from -[`equivalent_impact_level`](/phonometry/reference/api/building/building-prediction/#equivalent_impact_level) and the flanking correction from -[`impact_flanking_correction`](/phonometry/reference/api/building/building-prediction/#impact_flanking_correction). +[`equivalent_impact_level`](/phonometry/reference/api/building/global-model/#equivalent_impact_level) and the flanking correction from +[`impact_flanking_correction`](/phonometry/reference/api/building/global-model/#impact_flanking_correction). **Parameters** @@ -683,7 +683,7 @@ level may come from | `delta_l_w` | Weighted covering improvement `ΔLw` (ISO 717-2), in dB. | | `k_correction` | Flanking correction `K` (Table 1), in dB. | -**Returns:** The [`ImpactPredictionResult`](/phonometry/reference/api/building/building-prediction/#impactpredictionresult). +**Returns:** The [`ImpactPredictionResult`](/phonometry/reference/api/building/global-model/#impactpredictionresult). **Raises** @@ -750,7 +750,7 @@ both round to the same $D_{nT,w} = 54$ dB. | Name | Description | | :--- | :--- | -| `r_prime_w` | Apparent weighted sound reduction index `R'w`, in dB (see [`predicted_airborne_insulation`](/phonometry/reference/api/building/building-prediction/#predicted_airborne_insulation)). | +| `r_prime_w` | Apparent weighted sound reduction index `R'w`, in dB (see [`predicted_airborne_insulation`](/phonometry/reference/api/building/global-model/#predicted_airborne_insulation)). | | `volume` | Receiving-room volume `V`, in m³ (must be positive). | | `separating_area` | Separating-element area `Ss`, in m² (must be positive). | diff --git a/site/src/content/docs/reference/api/building/heavy-impact.md b/site/src/content/docs/reference/api/building/heavy-impact.md index 317774684..406f15a9d 100644 --- a/site/src/content/docs/reference/api/building/heavy-impact.md +++ b/site/src/content/docs/reference/api/building/heavy-impact.md @@ -1,5 +1,5 @@ --- -title: "building.heavy_impact" +title: "building.measurement.heavy_impact" description: "Heavy and soft impact sources: rubber ball and bang machine (ISO 16283-2:2020 Annex A, ISO 10140-5:2010 Annex F, JIS A 1418-2:2019, ISO 717-2:2020 Annex D)." sidebar: label: "heavy_impact" diff --git a/site/src/content/docs/reference/api/building/installed-structure-borne.md b/site/src/content/docs/reference/api/building/installed-structure-borne.md index f1b5786b5..8ae699cb4 100644 --- a/site/src/content/docs/reference/api/building/installed-structure-borne.md +++ b/site/src/content/docs/reference/api/building/installed-structure-borne.md @@ -1,5 +1,5 @@ --- -title: "building.installed_structure_borne" +title: "building.prediction.installed_structure_borne" description: "Installed structure-borne sound from service equipment (EN 12354-5:2009)." sidebar: label: "installed_structure_borne" @@ -15,7 +15,7 @@ building. The chain closes the structural-vibroacoustics series: `L_Ws,c`. It is **not** the raw reception-plate power of EN 15657 Formula (14): that plate-injected level must first be converted to the plate-independent `L_Ws,n` (EN 15657 Formulae (15)/(17); see - [`phonometry.building.structure_borne_power`](/phonometry/reference/api/building/structure-borne-power/)) and then referred to the + [`phonometry.building.measurement.structure_borne_power`](/phonometry/reference/api/building/structure-borne-power/)) and then referred to the actual receiver with the Annex I mobility correction ([`installed_power_from_reception_plate`](/phonometry/reference/api/building/installed-structure-borne/#installed_power_from_reception_plate)), $L_{Ws,inst,i} = L_{Ws,n} + 10 \log_{10}( Y_{\infty,i} / Y_{\infty,rec} )$ diff --git a/site/src/content/docs/reference/api/building/insulation.md b/site/src/content/docs/reference/api/building/insulation.md index 170387f1a..4742c71f6 100644 --- a/site/src/content/docs/reference/api/building/insulation.md +++ b/site/src/content/docs/reference/api/building/insulation.md @@ -1,5 +1,5 @@ --- -title: "building.insulation" +title: "building.measurement.insulation" description: "Field airborne sound insulation (ISO 16283-1:2014) and impact sound insulation (ISO 16283-2), with single-number weighted ratings and spectrum adaptation terms (ISO 717-1 airborne, ISO 717-2 impact)." sidebar: label: "insulation" diff --git a/site/src/content/docs/reference/api/building/intensity-insulation.md b/site/src/content/docs/reference/api/building/intensity-insulation.md index 8edd48d99..7ab4807a8 100644 --- a/site/src/content/docs/reference/api/building/intensity-insulation.md +++ b/site/src/content/docs/reference/api/building/intensity-insulation.md @@ -1,5 +1,5 @@ --- -title: "building.intensity_insulation" +title: "building.measurement.intensity_insulation" description: "Sound insulation measured with sound intensity (ISO 15186)." sidebar: label: "intensity_insulation" @@ -8,7 +8,7 @@ sidebar: Sound insulation measured with sound intensity (ISO 15186). This is the sound-**intensity** counterpart of the sound-pressure methods in -[`phonometry.building.lab_insulation`](/phonometry/reference/api/building/lab-insulation/) (ISO 10140) and [`phonometry.building.insulation`](/phonometry/reference/api/building/insulation/) +[`phonometry.building.measurement.lab_insulation`](/phonometry/reference/api/building/lab-insulation/) (ISO 10140) and [`phonometry.building.measurement.insulation`](/phonometry/reference/api/building/insulation/) (ISO 16283). Instead of an equivalent absorption area in the receiving room, the transmitted sound power is measured directly by scanning an intensity probe over a measurement surface enclosing the specimen. The main use is when diff --git a/site/src/content/docs/reference/api/building/lab-insulation.md b/site/src/content/docs/reference/api/building/lab-insulation.md index 3d6cb3c9e..d11dc42e6 100644 --- a/site/src/content/docs/reference/api/building/lab-insulation.md +++ b/site/src/content/docs/reference/api/building/lab-insulation.md @@ -1,5 +1,5 @@ --- -title: "building.lab_insulation" +title: "building.measurement.lab_insulation" description: "Laboratory sound insulation of building elements (ISO 10140)." sidebar: label: "lab_insulation" @@ -8,7 +8,7 @@ sidebar: Laboratory sound insulation of building elements (ISO 10140). This is the **laboratory** counterpart of the field ISO 16283 family in -[`phonometry.building.insulation`](/phonometry/reference/api/building/insulation/). In a qualified test facility flanking +[`phonometry.building.measurement.insulation`](/phonometry/reference/api/building/insulation/). In a qualified test facility flanking transmission is suppressed, so the *direct* airborne sound reduction index `R` (not the apparent `R'`) is the primary quantity, and the receiving room's equivalent absorption area `A` is a property of the known facility. diff --git a/site/src/content/docs/reference/api/building/masonry-cavity-wall.md b/site/src/content/docs/reference/api/building/masonry-cavity-wall.md index f121f6a31..9b1469cc4 100644 --- a/site/src/content/docs/reference/api/building/masonry-cavity-wall.md +++ b/site/src/content/docs/reference/api/building/masonry-cavity-wall.md @@ -1,5 +1,5 @@ --- -title: "building.masonry_cavity_wall" +title: "building.prediction.masonry_cavity_wall" description: "Wall ties in masonry cavity walls: the structural bridge across the cavity (Hopkins 2007, Sections 3.11.3.2 and 4.3.5.4.1)." sidebar: label: "masonry_cavity_wall" diff --git a/site/src/content/docs/reference/api/building/panel-transmission.md b/site/src/content/docs/reference/api/building/panel-transmission.md index 85e0635b2..57d72fa89 100644 --- a/site/src/content/docs/reference/api/building/panel-transmission.md +++ b/site/src/content/docs/reference/api/building/panel-transmission.md @@ -1,5 +1,5 @@ --- -title: "building.panel_transmission" +title: "building.prediction.panel_transmission" description: "Predicted airborne sound reduction index of panels (Bies, Hansen & Howard 2017, Engineering Noise Control 5e, Section 7.2; Sharp 1973)." sidebar: label: "panel_transmission" @@ -8,7 +8,7 @@ sidebar: Predicted airborne sound reduction index of panels (Bies, Hansen & Howard 2017, Engineering Noise Control 5e, Section 7.2; Sharp 1973). -Where EN 12354-1 ([`phonometry.building.building_prediction`](/phonometry/reference/api/building/building-prediction/)) takes the +Where EN 12354-1 ([`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/)) takes the element sound reduction index `R` as a *measured* input, this module **predicts** `R(f)` from the physical properties of the construction: the mass per unit area, bending stiffness (through the coincidence frequency) and loss diff --git a/site/src/content/docs/reference/api/building/resilient-layers.md b/site/src/content/docs/reference/api/building/resilient-layers.md index e50246fd3..e9313ffd4 100644 --- a/site/src/content/docs/reference/api/building/resilient-layers.md +++ b/site/src/content/docs/reference/api/building/resilient-layers.md @@ -1,5 +1,5 @@ --- -title: "building.resilient_layers" +title: "building.prediction.resilient_layers" description: "Prediction of resilient-layer performance: tapping force, coverings, floors, linings." sidebar: label: "resilient_layers" @@ -8,7 +8,7 @@ sidebar: Prediction of resilient-layer performance: tapping force, coverings, floors, linings. The measurement modules of this domain report what a resilient layer *achieved* -([`phonometry.building.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/) for the ISO 16251-1 +([`phonometry.building.measurement.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/) for the ISO 16251-1 mock-up, [`phonometry.materials.dynamic_stiffness`](/phonometry/reference/api/materials/dynamic-stiffness/) for the EN 29052-1 dynamic stiffness). This module is their **prediction** counterpart: it walks the physical chain from the material data to the improvement spectrum, so a @@ -1088,7 +1088,7 @@ weighted_floating_floor_improvement( Weighted improvement `ΔLw` of a floating floor (Formulae C.4/C.5). The single number that feeds the simplified prediction -([`phonometry.predicted_impact_insulation`](/phonometry/reference/api/building/building-prediction/#predicted_impact_insulation)), read directly from the +([`phonometry.predicted_impact_insulation`](/phonometry/reference/api/building/global-model/#predicted_impact_insulation)), read directly from the floating floor's mass per unit area and the resilient layer's dynamic stiffness. ISO 12354-2:2017 gives it as the two nomograms of Figures C.1 and C.2 and prints the fits: diff --git a/site/src/content/docs/reference/api/building/spanish-building-code.md b/site/src/content/docs/reference/api/building/spain.md similarity index 93% rename from site/src/content/docs/reference/api/building/spanish-building-code.md rename to site/src/content/docs/reference/api/building/spain.md index 0934d5926..70d40e0aa 100644 --- a/site/src/content/docs/reference/api/building/spanish-building-code.md +++ b/site/src/content/docs/reference/api/building/spain.md @@ -1,8 +1,8 @@ --- -title: "building.spanish_building_code" +title: "building.regulation.spain" description: "Spanish building code CTE DB-HR: global indices and requirement checks." sidebar: - label: "spanish_building_code" + label: "spain" --- Spanish building code CTE DB-HR: global indices and requirement checks. @@ -38,8 +38,8 @@ free choice: Table H.1 prints the same split. The railway spectrum of Table A.4 happens to be numerically identical to the road-traffic spectrum of Table A.3, so the two routes give the same number for a rail-dominant site; the *name* of the -reported quantity still differs, which is why [`d2m_nt_a`](/phonometry/reference/api/building/spanish-building-code/#d2m_nt_a) and -[`d2m_nt_atr`](/phonometry/reference/api/building/spanish-building-code/#d2m_nt_atr) are separate entry points rather than one function with a +reported quantity still differs, which is why [`d2m_nt_a`](/phonometry/reference/api/building/spain/#d2m_nt_a) and +[`d2m_nt_atr`](/phonometry/reference/api/building/spain/#d2m_nt_atr) are separate entry points rather than one function with a spectrum switch. **Relationship with the ISO 717-1 route.** DB-HR Annex H accepts @@ -99,7 +99,7 @@ Check a set of achieved values against their DB-HR requirements. | :--- | :--- | | `items` | `(value, requirement)` pairs. | -**Returns:** A [`DbHrAssessment`](/phonometry/reference/api/building/spanish-building-code/#dbhrassessment). +**Returns:** A [`DbHrAssessment`](/phonometry/reference/api/building/spain/#dbhrassessment). **Raises** @@ -127,9 +127,9 @@ for a reverberation time), and the rounded value is compared with the limit. | Name | Description | | :--- | :--- | | `value` | The achieved value, in the requirement's unit. | -| `requirement` | The [`DbHrRequirement`](/phonometry/reference/api/building/spanish-building-code/#dbhrrequirement) to check against. | +| `requirement` | The [`DbHrRequirement`](/phonometry/reference/api/building/spain/#dbhrrequirement) to check against. | -**Returns:** A [`DbHrCheck`](/phonometry/reference/api/building/spanish-building-code/#dbhrcheck). +**Returns:** A [`DbHrCheck`](/phonometry/reference/api/building/spain/#dbhrcheck). **Raises** @@ -157,7 +157,7 @@ with the Table A.4 railway spectrum; Table H.1 prints the same split and Annex H (H.2) gives `D2m,nT,w + C` as its ISO 717-1 approximation. For a road-traffic or aircraft dominant site the quantity is -`D2m,nT,Atr` instead: use [`d2m_nt_atr`](/phonometry/reference/api/building/spanish-building-code/#d2m_nt_atr). +`D2m,nT,Atr` instead: use [`d2m_nt_atr`](/phonometry/reference/api/building/spain/#d2m_nt_atr). **Parameters** @@ -167,7 +167,7 @@ For a road-traffic or aircraft dominant site the quantity is | `frequencies` | Band centre frequencies, in Hz (optional). | | `spectrum` | `"pink"` (default, Table A.5) or `"railway"` (Table A.4), per the dominant outdoor noise. | -**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spanish-building-code/#dbhrglobalindexresult) named `"D2m,nT,A"`. +**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult) named `"D2m,nT,A"`. **Raises** @@ -195,7 +195,7 @@ case evaluated through the same Formula (A.6) with the Table A.2 aircraft spectrum. A railway-dominant site is assessed as `D2m,nT,A` through Formula (A.5) -instead: use [`d2m_nt_a`](/phonometry/reference/api/building/spanish-building-code/#d2m_nt_a). The railway spectrum of Table A.4 is +instead: use [`d2m_nt_a`](/phonometry/reference/api/building/spain/#d2m_nt_a). The railway spectrum of Table A.4 is numerically identical to the road-traffic spectrum of Table A.3, so the two give the same number, but the quantity that the requirement and the report are stated in is not the same. @@ -208,7 +208,7 @@ report are stated in is not the same. | `frequencies` | Band centre frequencies, in Hz (optional). | | `spectrum` | `"traffic"` (default, Table A.3) or `"aircraft"` (Table A.2), per the dominant outdoor noise. | -**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spanish-building-code/#dbhrglobalindexresult) named `"D2m,nT,Atr"`. +**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult) named `"D2m,nT,Atr"`. **Raises** @@ -249,7 +249,7 @@ those instead. | `source_room` | `"same_unit"`, `"other_unit"`, `"installations"` or `"activity"`. | | `shared_opening` | The two rooms share a door or window. | -**Returns:** A tuple of [`DbHrRequirement`](/phonometry/reference/api/building/spanish-building-code/#dbhrrequirement), of length one in the general case and two when `shared_opening` applies. +**Returns:** A tuple of [`DbHrRequirement`](/phonometry/reference/api/building/spain/#dbhrrequirement), of length one in the general case and two when `shared_opening` applies. **Raises** @@ -291,7 +291,7 @@ residential acoustic areas. | `dominant_noise` | `"road"` (default), `"railway"` or `"aircraft"`. This selects the quantity the requirement is stated in as well as the aircraft increment: `"railway"` gives a `D2m,nT,A` requirement (Formula (A.5)) and the other two a `D2m,nT,Atr` one (Formula (A.6)), per clause 3.1.3.4 point 1. | | `quiet_facade` | Assess with `Ld` reduced by 10 dBA. | -**Returns:** The [`DbHrRequirement`](/phonometry/reference/api/building/spanish-building-code/#dbhrrequirement), on `D2m,nT,Atr` or, for a railway-dominant site, on `D2m,nT,A`. +**Returns:** The [`DbHrRequirement`](/phonometry/reference/api/building/spain/#dbhrrequirement), on `D2m,nT,Atr` or, for a railway-dominant site, on `D2m,nT,A`. **Raises** @@ -333,7 +333,7 @@ one-third-octave bands 100 Hz to 5 kHz (Formulae (A.5) to (A.7)). | `frequencies` | Band centre frequencies, in Hz, one per value. `None` assumes exactly the eighteen DB-HR bands in order. | | `name` | Optional index name carried on the result (e.g. `"R'A"`). | -**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spanish-building-code/#dbhrglobalindexresult). +**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult). **Raises** @@ -365,7 +365,7 @@ horizontally adjacent to a staircase. | `receiving_room` | `"protected"` or `"habitable"`. | | `source_room` | `"other_unit"`, `"installations"` or `"activity"`. | -**Returns:** The [`DbHrRequirement`](/phonometry/reference/api/building/spanish-building-code/#dbhrrequirement) on `L'nT,w`. +**Returns:** The [`DbHrRequirement`](/phonometry/reference/api/building/spain/#dbhrrequirement) on `L'nT,w`. **Raises** @@ -403,7 +403,7 @@ requirements, so this function returns the one route asked for. | :--- | :--- | | `quantity` | `"D2m,nT,Atr"` (default, the per-leaf route) or `"DnT,A"` (the combined route). | -**Returns:** The [`DbHrRequirement`](/phonometry/reference/api/building/spanish-building-code/#dbhrrequirement) of the chosen route. +**Returns:** The [`DbHrRequirement`](/phonometry/reference/api/building/spain/#dbhrrequirement) of the chosen route. **Raises** @@ -436,7 +436,7 @@ area of at least 0,2 m2 per cubic metre of room volume. | `room_use` | `"classroom"` (or `"conference_hall"`), `"restaurant"` (or `"dining_room"`) or `"common_area"`. | | `furnished` | For a classroom or conference hall, include the seating (the 0,5 s limit). | -**Returns:** The [`DbHrRequirement`](/phonometry/reference/api/building/spanish-building-code/#dbhrrequirement). +**Returns:** The [`DbHrRequirement`](/phonometry/reference/api/building/spain/#dbhrrequirement). **Raises** @@ -456,7 +456,7 @@ A set of DB-HR requirement checks. | Name | Description | | :--- | :--- | -| `checks` | The individual [`DbHrCheck`](/phonometry/reference/api/building/spanish-building-code/#dbhrcheck) results. | +| `checks` | The individual [`DbHrCheck`](/phonometry/reference/api/building/spain/#dbhrcheck) results. | ### DbHrAssessment.complies @@ -495,7 +495,7 @@ A DB-HR requirement checked against an achieved value. | Name | Description | | :--- | :--- | -| `requirement` | The [`DbHrRequirement`](/phonometry/reference/api/building/spanish-building-code/#dbhrrequirement) checked. | +| `requirement` | The [`DbHrRequirement`](/phonometry/reference/api/building/spain/#dbhrrequirement) checked. | | `value` | The achieved value, unrounded. | | `reported` | The achieved value rounded as DB-HR prescribes. | | `margin` | `reported - limit` for a `"min"` requirement and `limit - reported` for a `"max"` one; non-negative when compliant. | @@ -595,7 +595,7 @@ A-weighted standardized level difference `DnT,A` (Formula (A.7)). | `level_difference` | Band standardized level difference `DnT`, in dB. | | `frequencies` | Band centre frequencies, in Hz (optional). | -**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spanish-building-code/#dbhrglobalindexresult) named `"DnT,A"`. +**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult) named `"DnT,A"`. ## ra @@ -616,7 +616,7 @@ A-weighted global sound reduction index `RA` for pink noise. | `reduction_index` | Band sound reduction index `R` (or `R'`), in dB. | | `frequencies` | Band centre frequencies, in Hz (optional). | -**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spanish-building-code/#dbhrglobalindexresult) named `"RA"`. +**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult) named `"RA"`. ## ra_tr @@ -637,7 +637,7 @@ A-weighted global sound reduction index `RA,tr` for road-traffic noise. | `reduction_index` | Band sound reduction index `R` (or `R'`), in dB. | | `frequencies` | Band centre frequencies, in Hz (optional). | -**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spanish-building-code/#dbhrglobalindexresult) named `"RA,tr"`. +**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult) named `"RA,tr"`. ## window_size_correction diff --git a/site/src/content/docs/reference/api/building/structure-borne-power.md b/site/src/content/docs/reference/api/building/structure-borne-power.md index a6cedbca2..60f756cee 100644 --- a/site/src/content/docs/reference/api/building/structure-borne-power.md +++ b/site/src/content/docs/reference/api/building/structure-borne-power.md @@ -1,5 +1,5 @@ --- -title: "building.structure_borne_power" +title: "building.measurement.structure_borne_power" description: "Structure-borne sound power of building equipment (EN 15657:2018; ISO 9611)." sidebar: label: "structure_borne_power" @@ -61,7 +61,7 @@ source): - the **equivalent free velocity level** (Formula 18, dB re `1e-9 m/s`) from the high-mobility plate, and the **source mobility** from both (Formula 19). `L_Wsn` plus the mobility corrections of EN 12354-5 - Annex I (see [`phonometry.building.installed_structure_borne`](/phonometry/reference/api/building/installed-structure-borne/)) close + Annex I (see [`phonometry.building.prediction.installed_structure_borne`](/phonometry/reference/api/building/installed-structure-borne/)) close the EN 15657 -> EN 12354-5 chain. The source-side free velocity of ISO 9611:1996 is the direct-measurement diff --git a/site/src/content/docs/reference/api/building/survey-insulation.md b/site/src/content/docs/reference/api/building/survey-insulation.md index 345916c97..29ed22cb6 100644 --- a/site/src/content/docs/reference/api/building/survey-insulation.md +++ b/site/src/content/docs/reference/api/building/survey-insulation.md @@ -1,5 +1,5 @@ --- -title: "building.survey_insulation" +title: "building.measurement.survey_insulation" description: "Field survey method for sound insulation and service-equipment noise (ISO 10052:2021)." sidebar: label: "survey_insulation" @@ -10,7 +10,7 @@ Field survey method for sound insulation and service-equipment noise This is the **survey (control) method**: a fast, octave-band field procedure for dwellings and rooms of comparable size (up to 150 m³). It trades the -resolution of the ISO 16283 engineering method ([`phonometry.building.insulation`](/phonometry/reference/api/building/insulation/)) +resolution of the ISO 16283 engineering method ([`phonometry.building.measurement.insulation`](/phonometry/reference/api/building/insulation/)) for speed: a single hand-held integrating sound level meter swept through the room. It measures airborne and impact sound insulation between rooms, façade sound insulation, and the sound pressure level from building service equipment. diff --git a/site/src/content/docs/reference/api/building/building-uncertainty.md b/site/src/content/docs/reference/api/building/uncertainty.md similarity index 90% rename from site/src/content/docs/reference/api/building/building-uncertainty.md rename to site/src/content/docs/reference/api/building/uncertainty.md index 3bff5dcd9..6bede6c97 100644 --- a/site/src/content/docs/reference/api/building/building-uncertainty.md +++ b/site/src/content/docs/reference/api/building/uncertainty.md @@ -1,16 +1,16 @@ --- -title: "building.building_uncertainty" +title: "building.measurement.uncertainty" description: "Measurement uncertainty in building acoustics (ISO 12999-1:2020)." sidebar: - label: "building_uncertainty" + label: "uncertainty" --- Measurement uncertainty in building acoustics (ISO 12999-1:2020). This module supplies the **measurement uncertainty** of the sound-insulation quantities produced by the field/lab/prediction modules -([`phonometry.building.insulation`](/phonometry/reference/api/building/insulation/), [`phonometry.building.lab_insulation`](/phonometry/reference/api/building/lab-insulation/), -[`phonometry.building.building_prediction`](/phonometry/reference/api/building/building-prediction/)). ISO 12999-1 does not re-measure anything; +([`phonometry.building.measurement.insulation`](/phonometry/reference/api/building/insulation/), [`phonometry.building.measurement.lab_insulation`](/phonometry/reference/api/building/lab-insulation/), +[`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/)). ISO 12999-1 does not re-measure anything; it tabulates *standard uncertainties* `u` derived from inter-laboratory tests (ISO 5725) and prescribes how to expand and combine them. @@ -159,7 +159,7 @@ coefficients, also the model/reality combination of Formula (A.2). coverage_factor(confidence: float = 0.95, one_sided: bool = False) -> float ``` -Deprecated alias of [`insulation_coverage_factor`](/phonometry/reference/api/building/building-uncertainty/#insulation_coverage_factor). +Deprecated alias of [`insulation_coverage_factor`](/phonometry/reference/api/building/uncertainty/#insulation_coverage_factor). ## COVERAGE_FACTORS @@ -179,7 +179,7 @@ expanded_uncertainty( ) -> float ``` -Deprecated alias of [`insulation_expanded_uncertainty`](/phonometry/reference/api/building/building-uncertainty/#insulation_expanded_uncertainty). +Deprecated alias of [`insulation_expanded_uncertainty`](/phonometry/reference/api/building/uncertainty/#insulation_expanded_uncertainty). ## insulation_coverage_factor @@ -225,7 +225,7 @@ level; a minimum of $k = 1$ is enforced (Clause 8). | Name | Description | | :--- | :--- | | `u` | Standard uncertainty `u`, in dB (must be non-negative). | -| `coverage` | Confidence level as a fraction (see [`insulation_coverage_factor`](/phonometry/reference/api/building/building-uncertainty/#insulation_coverage_factor)). | +| `coverage` | Confidence level as a fraction (see [`insulation_coverage_factor`](/phonometry/reference/api/building/uncertainty/#insulation_coverage_factor)). | | `one_sided` | Use the one-sided coverage factor (conformity checks). | **Raises** @@ -432,18 +432,18 @@ uncertain_value( Attach the ISO 12999-1 expanded uncertainty to a single-number rating. -Convenience wrapper combining [`single_number_uncertainty`](/phonometry/reference/api/building/building-uncertainty/#single_number_uncertainty), -[`insulation_coverage_factor`](/phonometry/reference/api/building/building-uncertainty/#insulation_coverage_factor) and [`insulation_expanded_uncertainty`](/phonometry/reference/api/building/building-uncertainty/#insulation_expanded_uncertainty) into an -[`UncertainValue`](/phonometry/reference/api/building/building-uncertainty/#uncertainvalue) ($y \pm U$) without modifying the rating +Convenience wrapper combining [`single_number_uncertainty`](/phonometry/reference/api/building/uncertainty/#single_number_uncertainty), +[`insulation_coverage_factor`](/phonometry/reference/api/building/uncertainty/#insulation_coverage_factor) and [`insulation_expanded_uncertainty`](/phonometry/reference/api/building/uncertainty/#insulation_expanded_uncertainty) into an +[`UncertainValue`](/phonometry/reference/api/building/uncertainty/#uncertainvalue) ($y \pm U$) without modifying the rating dataclasses. For conformity checks pass `one_sided=True` and read -[`UncertainValue.lower`](/phonometry/reference/api/building/building-uncertainty/#uncertainvaluelower) / [`UncertainValue.upper`](/phonometry/reference/api/building/building-uncertainty/#uncertainvalueupper) (Formulae 4/5). +[`UncertainValue.lower`](/phonometry/reference/api/building/uncertainty/#uncertainvaluelower) / [`UncertainValue.upper`](/phonometry/reference/api/building/uncertainty/#uncertainvalueupper) (Formulae 4/5). **Parameters** | Name | Description | | :--- | :--- | | `value` | Best estimate `y` (e.g. `Rw` in dB). | -| `quantity` | Rating descriptor (see [`single_number_uncertainty`](/phonometry/reference/api/building/building-uncertainty/#single_number_uncertainty)). | +| `quantity` | Rating descriptor (see [`single_number_uncertainty`](/phonometry/reference/api/building/uncertainty/#single_number_uncertainty)). | | `situation` | Measurement situation `"A"`, `"B"` or `"C"` (Clause 5.2). | | `coverage` | Confidence level as a fraction. | | `one_sided` | Use the one-sided coverage factor. | diff --git a/site/src/content/docs/reference/api/index.md b/site/src/content/docs/reference/api/index.md index 3d5f47caf..f9a5673cf 100644 --- a/site/src/content/docs/reference/api/index.md +++ b/site/src/content/docs/reference/api/index.md @@ -111,25 +111,25 @@ La referencia de la API se genera a partir de los docstrings del código (en ing | Module | Summary | | :--- | :--- | -| [`building.insulation`](/phonometry/reference/api/building/insulation/) | Field airborne sound insulation (ISO 16283-1:2014) and impact sound insulation (ISO 16283-2), with single-number weighted ratings and spectrum adaptation terms (ISO 717-1 airborne, ISO 717-2 impact). | -| [`building.panel_transmission`](/phonometry/reference/api/building/panel-transmission/) | Predicted airborne sound reduction index of panels (Bies, Hansen & Howard 2017, Engineering Noise Control 5e, Section 7.2; Sharp 1973). | -| [`building.masonry_cavity_wall`](/phonometry/reference/api/building/masonry-cavity-wall/) | Wall ties in masonry cavity walls: the structural bridge across the cavity (Hopkins 2007, Sections 3.11.3.2 and 4.3.5.4.1). | -| [`building.heavy_impact`](/phonometry/reference/api/building/heavy-impact/) | Heavy and soft impact sources: rubber ball and bang machine (ISO 16283-2:2020 Annex A, ISO 10140-5:2010 Annex F, JIS A 1418-2:2019, ISO 717-2:2020 Annex D). | -| [`building.ceiling_plenum`](/phonometry/reference/api/building/ceiling-plenum/) | Suspended-ceiling plenum flanking path (Vigran 9.2.3 after Mechel 1980; ISO 140-9 / ISO 10848-2; ASTM E1414 / ASTM E413). | -| [`building.aperture_transmission`](/phonometry/reference/api/building/aperture-transmission/) | Sound transmission through slits, holes and apertures (Hopkins 2007, Sound Insulation, Section 4.3.10; Gomperts 1964; Wilson & Soroka 1965). | -| [`building.lab_insulation`](/phonometry/reference/api/building/lab-insulation/) | Laboratory sound insulation of building elements (ISO 10140). | -| [`building.survey_insulation`](/phonometry/reference/api/building/survey-insulation/) | Field survey method for sound insulation and service-equipment noise (ISO 10052:2021). | -| [`building.intensity_insulation`](/phonometry/reference/api/building/intensity-insulation/) | Sound insulation measured with sound intensity (ISO 15186). | -| [`building.flanking_transmission`](/phonometry/reference/api/building/flanking-transmission/) | Laboratory measurement of flanking sound transmission (ISO 10848:2006/2010). | -| [`building.facade_prediction`](/phonometry/reference/api/building/facade-prediction/) | Façade sound insulation and outdoor radiation prediction (EN 12354-3/-4:2000). | -| [`building.building_prediction`](/phonometry/reference/api/building/building-prediction/) | Building acoustic performance prediction (EN 12354-1/-2:2000). | -| [`building.detailed_prediction`](/phonometry/reference/api/building/detailed-prediction/) | Detailed per-band building prediction (EN/ISO 12354-1/-2:2017). | -| [`building.building_uncertainty`](/phonometry/reference/api/building/building-uncertainty/) | Measurement uncertainty in building acoustics (ISO 12999-1:2020). | -| [`building.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/) | Impact-sound improvement of floor coverings on a small mock-up (ISO 16251-1:2014). | -| [`building.resilient_layers`](/phonometry/reference/api/building/resilient-layers/) | Prediction of resilient-layer performance: tapping force, coverings, floors, linings. | -| [`building.structure_borne_power`](/phonometry/reference/api/building/structure-borne-power/) | Structure-borne sound power of building equipment (EN 15657:2018; ISO 9611). | -| [`building.installed_structure_borne`](/phonometry/reference/api/building/installed-structure-borne/) | Installed structure-borne sound from service equipment (EN 12354-5:2009). | -| [`building.spanish_building_code`](/phonometry/reference/api/building/spanish-building-code/) | Spanish building code CTE DB-HR: global indices and requirement checks. | +| [`building.measurement.insulation`](/phonometry/reference/api/building/insulation/) | Field airborne sound insulation (ISO 16283-1:2014) and impact sound insulation (ISO 16283-2), with single-number weighted ratings and spectrum adaptation terms (ISO 717-1 airborne, ISO 717-2 impact). | +| [`building.prediction.panel_transmission`](/phonometry/reference/api/building/panel-transmission/) | Predicted airborne sound reduction index of panels (Bies, Hansen & Howard 2017, Engineering Noise Control 5e, Section 7.2; Sharp 1973). | +| [`building.prediction.masonry_cavity_wall`](/phonometry/reference/api/building/masonry-cavity-wall/) | Wall ties in masonry cavity walls: the structural bridge across the cavity (Hopkins 2007, Sections 3.11.3.2 and 4.3.5.4.1). | +| [`building.measurement.heavy_impact`](/phonometry/reference/api/building/heavy-impact/) | Heavy and soft impact sources: rubber ball and bang machine (ISO 16283-2:2020 Annex A, ISO 10140-5:2010 Annex F, JIS A 1418-2:2019, ISO 717-2:2020 Annex D). | +| [`building.prediction.ceiling_plenum`](/phonometry/reference/api/building/ceiling-plenum/) | Suspended-ceiling plenum flanking path (Vigran 9.2.3 after Mechel 1980; ISO 140-9 / ISO 10848-2; ASTM E1414 / ASTM E413). | +| [`building.prediction.aperture_transmission`](/phonometry/reference/api/building/aperture-transmission/) | Sound transmission through slits, holes and apertures (Hopkins 2007, Sound Insulation, Section 4.3.10; Gomperts 1964; Wilson & Soroka 1965). | +| [`building.measurement.lab_insulation`](/phonometry/reference/api/building/lab-insulation/) | Laboratory sound insulation of building elements (ISO 10140). | +| [`building.measurement.survey_insulation`](/phonometry/reference/api/building/survey-insulation/) | Field survey method for sound insulation and service-equipment noise (ISO 10052:2021). | +| [`building.measurement.intensity_insulation`](/phonometry/reference/api/building/intensity-insulation/) | Sound insulation measured with sound intensity (ISO 15186). | +| [`building.measurement.flanking_transmission`](/phonometry/reference/api/building/flanking-transmission/) | Laboratory measurement of flanking sound transmission (ISO 10848:2006/2010). | +| [`building.prediction.facade`](/phonometry/reference/api/building/facade/) | Façade sound insulation and outdoor radiation prediction (EN 12354-3/-4:2000). | +| [`building.prediction.global_model`](/phonometry/reference/api/building/global-model/) | Building acoustic performance prediction (EN 12354-1/-2:2000). | +| [`building.prediction.detailed_model`](/phonometry/reference/api/building/detailed-model/) | Detailed per-band building prediction (EN/ISO 12354-1/-2:2017). | +| [`building.measurement.uncertainty`](/phonometry/reference/api/building/uncertainty/) | Measurement uncertainty in building acoustics (ISO 12999-1:2020). | +| [`building.measurement.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/) | Impact-sound improvement of floor coverings on a small mock-up (ISO 16251-1:2014). | +| [`building.prediction.resilient_layers`](/phonometry/reference/api/building/resilient-layers/) | Prediction of resilient-layer performance: tapping force, coverings, floors, linings. | +| [`building.measurement.structure_borne_power`](/phonometry/reference/api/building/structure-borne-power/) | Structure-borne sound power of building equipment (EN 15657:2018; ISO 9611). | +| [`building.prediction.installed_structure_borne`](/phonometry/reference/api/building/installed-structure-borne/) | Installed structure-borne sound from service equipment (EN 12354-5:2009). | +| [`building.regulation.spain`](/phonometry/reference/api/building/spain/) | Spanish building code CTE DB-HR: global indices and requirement checks. | ## Materials and surfaces diff --git a/site/src/content/docs/reference/api/materials/absorption-uncertainty.md b/site/src/content/docs/reference/api/materials/absorption-uncertainty.md index ffa1b9b3f..078284943 100644 --- a/site/src/content/docs/reference/api/materials/absorption-uncertainty.md +++ b/site/src/content/docs/reference/api/materials/absorption-uncertainty.md @@ -7,7 +7,7 @@ sidebar: Measurement uncertainty for sound absorption (ISO 12999-2:2020). -Companion of the sound-insulation uncertainty of [`phonometry.building.building_uncertainty`](/phonometry/reference/api/building/building-uncertainty/) +Companion of the sound-insulation uncertainty of [`phonometry.building.measurement.uncertainty`](/phonometry/reference/api/building/uncertainty/) (ISO 12999-1). This part gives the standard uncertainty `u` of the quantities produced by a reverberation-room absorption measurement and its ratings: diff --git a/site/src/content/docs/reference/api/materials/dynamic-stiffness.md b/site/src/content/docs/reference/api/materials/dynamic-stiffness.md index 13ccc3910..a8f708f27 100644 --- a/site/src/content/docs/reference/api/materials/dynamic-stiffness.md +++ b/site/src/content/docs/reference/api/materials/dynamic-stiffness.md @@ -63,8 +63,8 @@ applies when $s'_t \gg s'_a$, otherwise `s'` cannot be resolved. This module is the resilient-layer characterisation feeding the floating-floor term of the EN 12354-2 impact model -([`phonometry.building.building_prediction`](/phonometry/reference/api/building/building-prediction/)). It does **not** feed -ISO 16251-1 ([`phonometry.building.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/)), whose +([`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/)). It does **not** feed +ISO 16251-1 ([`phonometry.building.measurement.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/)), whose scope is limited to soft, locally-reacting floor coverings; floating floors are explicitly excluded there. diff --git a/site/src/content/docs/reference/api/noise_control/room-to-room.md b/site/src/content/docs/reference/api/noise_control/room-to-room.md index 5af7600e6..52b3e52e9 100644 --- a/site/src/content/docs/reference/api/noise_control/room-to-room.md +++ b/site/src/content/docs/reference/api/noise_control/room-to-room.md @@ -15,7 +15,7 @@ criterion. The answer is a short chain, and every link of it already exists in the library: the reverberant level the machine builds up in the source room ([`phonometry.room.steady_state_spl`](/phonometry/reference/api/rooms/steady-field/#steady_state_spl) over the room constant of [`phonometry.room.room_constant`](/phonometry/reference/api/rooms/steady-field/#room_constant)), the transmission loss of the partition -(measured, or predicted by [`phonometry.building.panel_transmission`](/phonometry/reference/api/building/panel-transmission/)), the +(measured, or predicted by [`phonometry.building.prediction.panel_transmission`](/phonometry/reference/api/building/panel-transmission/)), the absorption of the receiving room ([`phonometry.room.equivalent_absorption_area`](/phonometry/reference/api/rooms/enclosed-space-absorption/#equivalent_absorption_area)) and the rating of what arrives ([`phonometry.room.noise_criterion`](/phonometry/reference/api/rooms/room-noise/#noise_criterion)). What this module adds is the @@ -102,7 +102,7 @@ across the partition. | Name | Description | | :--- | :--- | | `frequencies` | Octave-band centre frequencies, Hz (1-D array). | -| `transmission_loss` | Transmission loss of the partition `TL`, dB; a scalar or one value per band. Measured, tabulated, or predicted by [`phonometry.building.panel_transmission`](/phonometry/reference/api/building/panel-transmission/). | +| `transmission_loss` | Transmission loss of the partition `TL`, dB; a scalar or one value per band. Measured, tabulated, or predicted by [`phonometry.building.prediction.panel_transmission`](/phonometry/reference/api/building/panel-transmission/). | | `partition_area` | Area of the partition between the rooms `S_w`, m2. | | `receiving_absorption` | Equivalent absorption area of the receiving room `S_2 alpha_2` per band, m2; e.g. from [`phonometry.room.equivalent_absorption_area`](/phonometry/reference/api/rooms/enclosed-space-absorption/#equivalent_absorption_area). | | `source_level` | Reverberant sound pressure level in the source room `L_p1`, dB (scalar or per band). Mutually exclusive with `source_power_level`. | diff --git a/site/src/content/docs/reference/api/vibration/radiation-efficiency.md b/site/src/content/docs/reference/api/vibration/radiation-efficiency.md index cb237c54d..69652ada0 100644 --- a/site/src/content/docs/reference/api/vibration/radiation-efficiency.md +++ b/site/src/content/docs/reference/api/vibration/radiation-efficiency.md @@ -22,7 +22,7 @@ measured input: this module predicts it from the plate geometry and its coincidence (critical) frequency, closing the ISO 7849 chain without a power measurement, and it supplies the *resonant* transmission path of the single- and double-leaf sound-reduction-index predictions in -[`phonometry.building.panel_transmission`](/phonometry/reference/api/building/panel-transmission/). +[`phonometry.building.prediction.panel_transmission`](/phonometry/reference/api/building/panel-transmission/). **Coincidence (critical) frequency (Hopkins Eq. 2.201).** Below it the free bending wavelength is shorter than the acoustic wavelength, so the plate diff --git a/site/src/content/docs/reference/errata.md b/site/src/content/docs/reference/errata.md index 15bf38569..506194b54 100644 --- a/site/src/content/docs/reference/errata.md +++ b/site/src/content/docs/reference/errata.md @@ -287,10 +287,10 @@ which is the check that enforces the rule; see (the 2017 Formulae (4) and (5)). - **Library behaviour:** unaffected. No code path implements the reduced form: the façade model computes $D_{2m,nT}$ from Formula (13) - ([`facade_prediction.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/facade_prediction.py)), + ([`facade_prediction.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/prediction/facade.py)), and the survey method converts with the unreduced $D_{2m,n} = D_{2m} + k + 10\log_{10}[A_0 T_0/(0{,}16 V)]$ of ISO 10052 Clause 3.15 - ([`survey_insulation.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/survey_insulation.py)). + ([`survey_insulation.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/measurement/survey_insulation.py)). The two standardization constants that *are* pre-folded elsewhere in the library are both correct: $0{,}032$ for the Part 2 impact form and $0{,}32$ for the Part 1 airborne form $D_{nT} = R' + 10\log_{10}(0{,}16 V/(T_0 S_s))$, @@ -394,7 +394,7 @@ which is the check that enforces the rule; see - **Library behaviour:** `in_situ_total_loss_factor` takes $\sum l_k \alpha_k$ as an input and `perimeter_absorption_coefficient` implements Formula (C.4); the Annex L fixture derives all five sums that way rather than using the - printed block, and says so ([`tests/building/test_detailed_prediction.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/test_detailed_prediction.py)). + printed block, and says so ([`tests/building/prediction/test_detailed_model.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/prediction/test_detailed_model.py)). - **Status:** unreported. ## ISO 12354-1:2017 Table L.3 / ISO 12354-2:2017 Table G.3 (external wall ηint) @@ -590,7 +590,7 @@ which is the check that enforces the rule; see - **Library behaviour:** `weighted_lining_improvement` returns the more conservative -10 dB at exactly 1 600 Hz and -5 dB above it, the 2000 reading, with the ambiguity named in the docstring and pinned in - [`tests/building/test_resilient_layers.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/test_resilient_layers.py). + [`tests/building/prediction/test_resilient_layers.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/prediction/test_resilient_layers.py). - **Status:** unreported. - **Related, not an erratum:** NOTE 1 of the same table sets a floor of 0 dB @@ -651,7 +651,7 @@ which is the check that enforces the rule; see 12354-1:2017 prints the same $\pi$-free form in its symbol definitions ($f_c = c_0^2/(1{,}8 c_L t)$). - **Library behaviour:** implements the $\pi$-free form - (`phonometry.building.flanking_transmission.critical_frequency`), with a + (`phonometry.building.measurement.flanking_transmission.critical_frequency`), with a misprint note in the docstring. - **Status:** corrected upstream — ISO 10848-1:2017 (second edition) prints the $\pi$-free form in its Formula (5), $f_c = c_0^2/(1{,}8 h c_L)$, @@ -1922,7 +1922,7 @@ which is the check that enforces the rule; see - **Library behaviour:** the regression test uses $\eta = 1{,}5 \cdot 10^{-3}$, the value the printed answers require - ([`tests/building/test_panel_transmission.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/test_panel_transmission.py)). + ([`tests/building/prediction/test_panel_transmission.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/prediction/test_panel_transmission.py)). - **Status:** unreported (textbook rather than a standard). --- @@ -1966,14 +1966,14 @@ which is the check that enforces the rule; see Eq. (9.19) at all: the two equations the book presents as a pair are inconsistent with each other. - **Library behaviour:** `plenum_flanking_reduction_index` in - [`ceiling_plenum.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/ceiling_plenum.py) + [`ceiling_plenum.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/prediction/ceiling_plenum.py) implements the derived $m'_R$ in both the exponent and the denominator, with the reading documented at the formula, and rejects a transmission factor above unity rather than reporting a negative sound reduction index. Tests pin the monotonicity, the $\tau_\text{cl} \le 1$ bound, the convergence to Eq. (9.20) and the size of the Eq. (9.17) leakage term at a realistic ceiling - ([`tests/building/test_ceiling_plenum.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/test_ceiling_plenum.py)). + ([`tests/building/prediction/test_ceiling_plenum.py`](https://github.com/jmrplens/phonometry/blob/main/tests/building/prediction/test_ceiling_plenum.py)). - **Status:** unreported (textbook rather than a standard). Mechel's original 1980 paper, which Vigran reproduces, was not available to check whether the misprint originates there. diff --git a/site/src/generated/api-sidebar.mjs b/site/src/generated/api-sidebar.mjs index f2553d54c..ad63f225f 100644 --- a/site/src/generated/api-sidebar.mjs +++ b/site/src/generated/api-sidebar.mjs @@ -120,15 +120,15 @@ export const apiSidebar = { 'reference/api/building/survey-insulation', 'reference/api/building/intensity-insulation', 'reference/api/building/flanking-transmission', - 'reference/api/building/facade-prediction', - 'reference/api/building/building-prediction', - 'reference/api/building/detailed-prediction', - 'reference/api/building/building-uncertainty', + 'reference/api/building/facade', + 'reference/api/building/global-model', + 'reference/api/building/detailed-model', + 'reference/api/building/uncertainty', 'reference/api/building/floor-covering-improvement', 'reference/api/building/resilient-layers', 'reference/api/building/structure-borne-power', 'reference/api/building/installed-structure-borne', - 'reference/api/building/spanish-building-code', + 'reference/api/building/spain', ], }, { diff --git a/src/phonometry/__init__.py b/src/phonometry/__init__.py index 7f0132c64..4b197a6c5 100644 --- a/src/phonometry/__init__.py +++ b/src/phonometry/__init__.py @@ -105,32 +105,109 @@ program_loudness, true_peak_level, ) -from .building.aperture_transmission import ( - ApertureTransmissionResult, - circular_aperture_transmission_coefficient, - composite_transmission_loss, - slit_resonance_frequencies, - slit_transmission_coefficient, - transmission_loss_from_coefficient, +from .building.measurement.flanking_transmission import ( + FlankingImpactLevelResult, + FlankingLevelDifferenceResult, + VibrationReductionResult, + band_mode_count, + critical_frequency, + direction_averaged_level_difference, + equivalent_absorption_length, + modal_density, + modal_overlap_factor, + normalized_flanking_impact_level, + normalized_flanking_level_difference, + strong_coupling_satisfied, + total_loss_factor, + velocity_level_difference, + vibration_reduction_index, + vibration_reduction_index_from_flanking, ) -from .building.building_prediction import ( - AirbornePredictionResult, - FlankingPath, - ImpactPredictionResult, - PathContribution, - combine_linings, - equivalent_impact_level, - flanking_element, - flanking_path, - impact_flanking_correction, - junction_min_vibration_reduction, - junction_vibration_reduction, - predicted_airborne_insulation, - predicted_impact_insulation, - standardized_impact_level, - standardized_level_difference, +from .building.measurement.floor_covering_improvement import ( + FloorCoveringImprovementResult, + acceleration_level, + background_corrected_level, + impact_improvement, + improvement_octave_bands, +) +from .building.measurement.heavy_impact import ( + HEAVY_IMPACT_A_WEIGHTING, + HEAVY_IMPACT_OCTAVE_BANDS, + HEAVY_IMPACT_SOURCES, + AWeightedMaximumImpactResult, + HeavyImpactSourceCheck, + HeavyImpactSourceSpec, + StandardizedMaximumImpactResult, + a_weighted_maximum_impact_level, + check_heavy_impact_source, + fast_reverberation_correction, + heavy_impact_octave_levels, + heavy_impact_source_limits, + heavy_impact_source_specification, + impact_force_exposure_level, + standardized_maximum_impact_level, ) -from .building.building_uncertainty import ( +from .building.measurement.insulation import ( + AirborneInsulationResult, + ExtendedImpactRatingResult, + ExtendedWeightedRatingResult, + FacadeInsulationResult, + ImpactInsulationResult, + ImpactRatingResult, + WeightedRatingResult, + airborne_insulation, + energy_average_level, + facade_insulation, + impact_improvement_adaptation_term, + impact_insulation, + weighted_impact_improvement, + weighted_impact_rating, + weighted_impact_rating_extended, + weighted_rating, + weighted_rating_extended, +) +from .building.measurement.intensity_insulation import ( + IntensityElementNormalizedResult, + IntensityReductionResult, + adaptation_term_kc, + combine_subareas, + intensity_element_normalized_difference, + intensity_sound_reduction, + surface_pressure_intensity_indicator, +) +from .building.measurement.lab_insulation import ( + LabAirborneInsulationResult, + LabImpactInsulationResult, + LabInsulationWarning, + background_correction, + lab_airborne_insulation, + lab_impact_insulation, +) +from .building.measurement.structure_borne_power import ( + StructureBornePowerResult, + characteristic_reception_plate_power, + equivalent_blocked_force_level, + equivalent_free_velocity_level, + mean_free_velocity_level, + plate_loss_factor, + reception_plate_power, + source_mobility_from_levels, + spatial_mean_velocity_level, + structure_borne_power_level, +) +from .building.measurement.survey_insulation import ( + SurveyAirborneResult, + SurveyFacadeResult, + SurveyImpactResult, + SurveyServiceEquipmentResult, + estimate_reverberation_index, + reverberation_index, + survey_airborne_insulation, + survey_facade_insulation, + survey_impact_insulation, + survey_service_equipment_level, +) +from .building.measurement.uncertainty import ( COVERAGE_FACTORS, BandUncertainty, UncertainValue, @@ -149,7 +226,15 @@ single_number_uncertainty_uncorrelated, uncertain_value, ) -from .building.ceiling_plenum import ( +from .building.prediction.aperture_transmission import ( + ApertureTransmissionResult, + circular_aperture_transmission_coefficient, + composite_transmission_loss, + slit_resonance_frequencies, + slit_transmission_coefficient, + transmission_loss_from_coefficient, +) +from .building.prediction.ceiling_plenum import ( CEILING_ATTENUATION_CONTOUR, CeilingAttenuationResult, PlenumFlankingResult, @@ -158,7 +243,7 @@ partition_referenced_reduction_index, plenum_flanking_reduction_index, ) -from .building.detailed_prediction import ( +from .building.prediction.detailed_model import ( BandPath, DetailedAirborneResult, DetailedImpactResult, @@ -193,7 +278,7 @@ resonant_sound_reduction_index, structural_reverberation_time, ) -from .building.facade_prediction import ( +from .building.prediction.facade import ( FacadeElement, FacadePredictionResult, RadiatedPowerResult, @@ -203,49 +288,24 @@ outdoor_level, radiated_sound_power, ) -from .building.flanking_transmission import ( - FlankingImpactLevelResult, - FlankingLevelDifferenceResult, - VibrationReductionResult, - band_mode_count, - critical_frequency, - direction_averaged_level_difference, - equivalent_absorption_length, - modal_density, - modal_overlap_factor, - normalized_flanking_impact_level, - normalized_flanking_level_difference, - strong_coupling_satisfied, - total_loss_factor, - velocity_level_difference, - vibration_reduction_index, - vibration_reduction_index_from_flanking, -) -from .building.floor_covering_improvement import ( - FloorCoveringImprovementResult, - acceleration_level, - background_corrected_level, - impact_improvement, - improvement_octave_bands, -) -from .building.heavy_impact import ( - HEAVY_IMPACT_A_WEIGHTING, - HEAVY_IMPACT_OCTAVE_BANDS, - HEAVY_IMPACT_SOURCES, - AWeightedMaximumImpactResult, - HeavyImpactSourceCheck, - HeavyImpactSourceSpec, - StandardizedMaximumImpactResult, - a_weighted_maximum_impact_level, - check_heavy_impact_source, - fast_reverberation_correction, - heavy_impact_octave_levels, - heavy_impact_source_limits, - heavy_impact_source_specification, - impact_force_exposure_level, - standardized_maximum_impact_level, +from .building.prediction.global_model import ( + AirbornePredictionResult, + FlankingPath, + ImpactPredictionResult, + PathContribution, + combine_linings, + equivalent_impact_level, + flanking_element, + flanking_path, + impact_flanking_correction, + junction_min_vibration_reduction, + junction_vibration_reduction, + predicted_airborne_insulation, + predicted_impact_insulation, + standardized_impact_level, + standardized_level_difference, ) -from .building.installed_structure_borne import ( +from .building.prediction.installed_structure_borne import ( REFERENCE_AREA, InstalledSourceResult, coupling_term, @@ -257,50 +317,14 @@ structure_borne_pressure_level_path, total_structure_borne_pressure_level, ) -from .building.insulation import ( - AirborneInsulationResult, - ExtendedImpactRatingResult, - ExtendedWeightedRatingResult, - FacadeInsulationResult, - ImpactInsulationResult, - ImpactRatingResult, - WeightedRatingResult, - airborne_insulation, - energy_average_level, - facade_insulation, - impact_improvement_adaptation_term, - impact_insulation, - weighted_impact_improvement, - weighted_impact_rating, - weighted_impact_rating_extended, - weighted_rating, - weighted_rating_extended, -) -from .building.intensity_insulation import ( - IntensityElementNormalizedResult, - IntensityReductionResult, - adaptation_term_kc, - combine_subareas, - intensity_element_normalized_difference, - intensity_sound_reduction, - surface_pressure_intensity_indicator, -) -from .building.lab_insulation import ( - LabAirborneInsulationResult, - LabImpactInsulationResult, - LabInsulationWarning, - background_correction, - lab_airborne_insulation, - lab_impact_insulation, -) -from .building.masonry_cavity_wall import ( +from .building.prediction.masonry_cavity_wall import ( WALL_TIE_STIFFNESS, WallTieCouplingResult, wall_tie_coupling_loss_factor, wall_tie_stiffness, wall_tie_stiffness_per_area, ) -from .building.panel_transmission import ( +from .building.prediction.panel_transmission import ( PLATEAU_MATERIALS, SoundReductionResult, corrugated_plate_mass_factor, @@ -315,7 +339,7 @@ plateau_transmission_loss, single_panel_transmission_loss, ) -from .building.resilient_layers import ( +from .building.prediction.resilient_layers import ( TAPPING_DROP_HEIGHT, TAPPING_HAMMER_MASS, TAPPING_HAMMER_RADIUS, @@ -344,7 +368,7 @@ weighted_floating_floor_improvement, weighted_lining_improvement, ) -from .building.spanish_building_code import ( +from .building.regulation.spain import ( DB_HR_FREQUENCIES, DB_HR_NORMALISED_SPECTRA, DbHrAssessment, @@ -366,30 +390,6 @@ ra_tr, window_size_correction, ) -from .building.structure_borne_power import ( - StructureBornePowerResult, - characteristic_reception_plate_power, - equivalent_blocked_force_level, - equivalent_free_velocity_level, - mean_free_velocity_level, - plate_loss_factor, - reception_plate_power, - source_mobility_from_levels, - spatial_mean_velocity_level, - structure_borne_power_level, -) -from .building.survey_insulation import ( - SurveyAirborneResult, - SurveyFacadeResult, - SurveyImpactResult, - SurveyServiceEquipmentResult, - estimate_reverberation_index, - reverberation_index, - survey_airborne_insulation, - survey_facade_insulation, - survey_impact_insulation, - survey_service_equipment_level, -) from .electroacoustics.distortion import ( HarmonicDistortionResult, ModulationDistortionResult, diff --git a/src/phonometry/_compat.py b/src/phonometry/_compat.py index 1934127de..0a162d30f 100644 --- a/src/phonometry/_compat.py +++ b/src/phonometry/_compat.py @@ -89,17 +89,28 @@ "phonometry.room_acoustics": "phonometry.room.room_acoustics", "phonometry.room_ir": "phonometry.room.room_ir", "phonometry.room_noise": "phonometry.room.room_noise", - "phonometry.building_prediction": "phonometry.building.building_prediction", - "phonometry.building_uncertainty": "phonometry.building.building_uncertainty", - "phonometry.facade_prediction": "phonometry.building.facade_prediction", - "phonometry.flanking_transmission": "phonometry.building.flanking_transmission", - "phonometry.floor_covering_improvement": "phonometry.building.floor_covering_improvement", - "phonometry.installed_structure_borne": "phonometry.building.installed_structure_borne", - "phonometry.insulation": "phonometry.building.insulation", - "phonometry.intensity_insulation": "phonometry.building.intensity_insulation", - "phonometry.lab_insulation": "phonometry.building.lab_insulation", - "phonometry.structure_borne_power": "phonometry.building.structure_borne_power", - "phonometry.survey_insulation": "phonometry.building.survey_insulation", + "phonometry.building_prediction": + "phonometry.building.prediction.global_model", + "phonometry.building_uncertainty": + "phonometry.building.measurement.uncertainty", + "phonometry.facade_prediction": + "phonometry.building.prediction.facade", + "phonometry.flanking_transmission": + "phonometry.building.measurement.flanking_transmission", + "phonometry.floor_covering_improvement": + "phonometry.building.measurement.floor_covering_improvement", + "phonometry.installed_structure_borne": + "phonometry.building.prediction.installed_structure_borne", + "phonometry.insulation": + "phonometry.building.measurement.insulation", + "phonometry.intensity_insulation": + "phonometry.building.measurement.intensity_insulation", + "phonometry.lab_insulation": + "phonometry.building.measurement.lab_insulation", + "phonometry.structure_borne_power": + "phonometry.building.measurement.structure_borne_power", + "phonometry.survey_insulation": + "phonometry.building.measurement.survey_insulation", "phonometry.human_vibration": "phonometry.vibration.human.exposure", "phonometry.mechanical_mobility": "phonometry.vibration.structural.mechanical_mobility", @@ -217,6 +228,44 @@ "phonometry.environment.assessment.impulse_prominence", "phonometry.environmental.spanish_regulation": "phonometry.environment.assessment.spain", + "phonometry.building.insulation": + "phonometry.building.measurement.insulation", + "phonometry.building.lab_insulation": + "phonometry.building.measurement.lab_insulation", + "phonometry.building.survey_insulation": + "phonometry.building.measurement.survey_insulation", + "phonometry.building.intensity_insulation": + "phonometry.building.measurement.intensity_insulation", + "phonometry.building.flanking_transmission": + "phonometry.building.measurement.flanking_transmission", + "phonometry.building.heavy_impact": + "phonometry.building.measurement.heavy_impact", + "phonometry.building.floor_covering_improvement": + "phonometry.building.measurement.floor_covering_improvement", + "phonometry.building.structure_borne_power": + "phonometry.building.measurement.structure_borne_power", + "phonometry.building.building_uncertainty": + "phonometry.building.measurement.uncertainty", + "phonometry.building.building_prediction": + "phonometry.building.prediction.global_model", + "phonometry.building.detailed_prediction": + "phonometry.building.prediction.detailed_model", + "phonometry.building.facade_prediction": + "phonometry.building.prediction.facade", + "phonometry.building.installed_structure_borne": + "phonometry.building.prediction.installed_structure_borne", + "phonometry.building.panel_transmission": + "phonometry.building.prediction.panel_transmission", + "phonometry.building.aperture_transmission": + "phonometry.building.prediction.aperture_transmission", + "phonometry.building.ceiling_plenum": + "phonometry.building.prediction.ceiling_plenum", + "phonometry.building.masonry_cavity_wall": + "phonometry.building.prediction.masonry_cavity_wall", + "phonometry.building.resilient_layers": + "phonometry.building.prediction.resilient_layers", + "phonometry.building.spanish_building_code": + "phonometry.building.regulation.spain", } #: The two generations, each with the release that deprecated it and the one diff --git a/src/phonometry/_plot/building.py b/src/phonometry/_plot/building.py index d49d2a68b..3ed8083ae 100644 --- a/src/phonometry/_plot/building.py +++ b/src/phonometry/_plot/building.py @@ -34,31 +34,16 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from ..building.aperture_transmission import ApertureTransmissionResult - from ..building.building_prediction import ( - AirbornePredictionResult, - ImpactPredictionResult, - ) - from ..building.building_uncertainty import BandUncertainty - from ..building.ceiling_plenum import ( - CeilingAttenuationResult, - PlenumFlankingResult, + from ..building.measurement.flanking_transmission import VibrationReductionResult + from ..building.measurement.floor_covering_improvement import ( + FloorCoveringImprovementResult, ) - from ..building.detailed_prediction import ( - DetailedAirborneResult, - DetailedImpactResult, - InSituElementResult, - ) - from ..building.facade_prediction import FacadePredictionResult, RadiatedPowerResult - from ..building.flanking_transmission import VibrationReductionResult - from ..building.floor_covering_improvement import FloorCoveringImprovementResult - from ..building.heavy_impact import ( + from ..building.measurement.heavy_impact import ( AWeightedMaximumImpactResult, HeavyImpactSourceCheck, StandardizedMaximumImpactResult, ) - from ..building.installed_structure_borne import InstalledSourceResult - from ..building.insulation import ( + from ..building.measurement.insulation import ( AirborneInsulationResult, ExtendedImpactRatingResult, ExtendedWeightedRatingResult, @@ -67,19 +52,36 @@ ImpactRatingResult, WeightedRatingResult, ) - from ..building.masonry_cavity_wall import WallTieCouplingResult - from ..building.panel_transmission import SoundReductionResult - from ..building.resilient_layers import ( + from ..building.measurement.structure_borne_power import StructureBornePowerResult + from ..building.measurement.uncertainty import BandUncertainty + from ..building.prediction.aperture_transmission import ApertureTransmissionResult + from ..building.prediction.ceiling_plenum import ( + CeilingAttenuationResult, + PlenumFlankingResult, + ) + from ..building.prediction.detailed_model import ( + DetailedAirborneResult, + DetailedImpactResult, + InSituElementResult, + ) + from ..building.prediction.facade import FacadePredictionResult, RadiatedPowerResult + from ..building.prediction.global_model import ( + AirbornePredictionResult, + ImpactPredictionResult, + ) + from ..building.prediction.installed_structure_borne import InstalledSourceResult + from ..building.prediction.masonry_cavity_wall import WallTieCouplingResult + from ..building.prediction.panel_transmission import SoundReductionResult + from ..building.prediction.resilient_layers import ( CoveringImprovementResult, FloatingFloorImprovementResult, LiningImprovementResult, TappingForceResult, ) - from ..building.spanish_building_code import ( + from ..building.regulation.spain import ( DbHrAssessment, DbHrGlobalIndexResult, ) - from ..building.structure_borne_power import StructureBornePowerResult #: Shared x-axis label for the frequency-domain building plots. _FREQ_LABEL = "Frequency [Hz]" @@ -245,7 +247,7 @@ def plot_sound_reduction( """Predicted sound reduction index ``R(f)`` (Bies 7.2). :param result: A - :class:`~phonometry.building.panel_transmission.SoundReductionResult`. + :class:`~phonometry.building.prediction.panel_transmission.SoundReductionResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the ``R(f)`` curve ``plot``. @@ -310,7 +312,7 @@ def plot_aperture_transmission( """Aperture sound reduction index ``R(f) = -10 log10(tau)`` (Hopkins 4.3.10). :param result: An - :class:`~phonometry.building.aperture_transmission.ApertureTransmissionResult`. + :class:`~phonometry.building.prediction.aperture_transmission.ApertureTransmissionResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the ``R(f)`` curve ``plot``. @@ -340,7 +342,7 @@ def plot_weighted_rating( ) -> Axes: """Airborne rating curve vs shifted reference (ISO 717-1). - :param result: A :class:`~phonometry.building.insulation.WeightedRatingResult`. + :param result: A :class:`~phonometry.building.measurement.insulation.WeightedRatingResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the measured-curve ``plot`` call. @@ -381,7 +383,7 @@ def plot_impact_rating( the (undistorted) curve and annotates the -5 dB reduction rather than pulling the curve down to the rating. - :param result: An :class:`~phonometry.building.insulation.ImpactRatingResult`. + :param result: An :class:`~phonometry.building.measurement.insulation.ImpactRatingResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the measured-curve ``plot`` call. @@ -506,7 +508,7 @@ def plot_extended_weighted_rating( """Enlarged-range airborne rating curve vs shifted reference (ISO 717-1 Annex B). :param result: An - :class:`~phonometry.building.insulation.ExtendedWeightedRatingResult`. + :class:`~phonometry.building.measurement.insulation.ExtendedWeightedRatingResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the measured-curve ``plot`` call. @@ -548,7 +550,7 @@ def plot_extended_impact_rating( """Enlarged-range impact rating curve vs shifted reference (ISO 717-2 A.2.1). :param result: An - :class:`~phonometry.building.insulation.ExtendedImpactRatingResult`. + :class:`~phonometry.building.measurement.insulation.ExtendedImpactRatingResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the measured-curve ``plot`` call. @@ -584,7 +586,7 @@ def plot_facade_insulation( Draws the standardized level difference ``D2m,nT`` first, then the other available quantities (``D2m``, ``D2m,n``, ``R'``) against frequency. Works for - :class:`~phonometry.building.insulation.FacadeInsulationResult`. + :class:`~phonometry.building.measurement.insulation.FacadeInsulationResult`. :param result: A façade result exposing ``d_2m``, ``d_2m_nt``, ``d_2m_n``, ``r_prime`` and (optionally) ``frequencies``. @@ -635,7 +637,7 @@ def plot_facade_prediction( Draws the per-element partial indices ``Rp = -10 log10 τ`` as thin dashed lines, then the façade apparent reduction ``R'`` and the standardized level difference ``D2m,nT`` as bold curves, against frequency. Works for - :class:`~phonometry.building.facade_prediction.FacadePredictionResult`. + :class:`~phonometry.building.prediction.facade.FacadePredictionResult`. :param result: A façade prediction result exposing ``r_prime``, ``d_2m_nt``, ``element_r`` and (optionally) ``frequencies``. @@ -682,9 +684,9 @@ def plot_radiated_power( Draws the segment radiated power level as bars, annotating the A-weighted single number when available. Works for - :class:`~phonometry.building.facade_prediction.RadiatedPowerResult`. + :class:`~phonometry.building.prediction.facade.RadiatedPowerResult`. - :param result: A :class:`~phonometry.building.facade_prediction.RadiatedPowerResult`. + :param result: A :class:`~phonometry.building.prediction.facade.RadiatedPowerResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the ``bar`` call. @@ -733,7 +735,7 @@ def plot_vibration_reduction( band-index axis when the result carries no frequencies. :param result: A - :class:`~phonometry.building.flanking_transmission.VibrationReductionResult`. + :class:`~phonometry.building.measurement.flanking_transmission.VibrationReductionResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the ``Kij`` curve ``plot`` call. @@ -775,7 +777,7 @@ def plot_structure_borne_power( ) -> Axes: """Characteristic structure-borne sound power level per band (EN 15657). - :param result: A :class:`~phonometry.building.structure_borne_power.StructureBornePowerResult`. + :param result: A :class:`~phonometry.building.measurement.structure_borne_power.StructureBornePowerResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the bar ``plot``. @@ -800,7 +802,7 @@ def plot_installed_structure_borne( ) -> Axes: """Per-path and total normalised structure-borne SPL (EN 12354-5). - :param result: An :class:`~phonometry.building.installed_structure_borne.InstalledSourceResult`. + :param result: An :class:`~phonometry.building.prediction.installed_structure_borne.InstalledSourceResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the total-level ``plot``. @@ -845,7 +847,7 @@ def plot_airborne_prediction( share of the total transmitted sound energy, largest first. :param result: An - :class:`~phonometry.building.building_prediction.AirbornePredictionResult`. + :class:`~phonometry.building.prediction.global_model.AirbornePredictionResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the path :meth:`~matplotlib.axes.Axes.bar`. @@ -886,7 +888,7 @@ def plot_impact_prediction( apparent level ``L'n,w = Ln,w,eq - DLw + K``. :param result: An - :class:`~phonometry.building.building_prediction.ImpactPredictionResult`. + :class:`~phonometry.building.prediction.global_model.ImpactPredictionResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the term :meth:`~matplotlib.axes.Axes.bar`. @@ -991,7 +993,7 @@ def plot_detailed_airborne_prediction( """Per-band path contributions and ``R'`` (EN/ISO 12354-1 detailed model). :param result: A - :class:`~phonometry.building.detailed_prediction.DetailedAirborneResult`. + :class:`~phonometry.building.prediction.detailed_model.DetailedAirborneResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the stacked :meth:`~matplotlib.axes.Axes.bar`. @@ -1019,7 +1021,7 @@ def plot_detailed_impact_prediction( """Per-band path contributions and ``L'n`` (EN/ISO 12354-2 detailed model). :param result: A - :class:`~phonometry.building.detailed_prediction.DetailedImpactResult`. + :class:`~phonometry.building.prediction.detailed_model.DetailedImpactResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the stacked :meth:`~matplotlib.axes.Axes.bar`. @@ -1047,7 +1049,7 @@ def plot_in_situ_element( """In-situ ``Rsitu`` and ``Ln,situ`` of one element (EN/ISO 12354). :param result: An - :class:`~phonometry.building.detailed_prediction.InSituElementResult`. + :class:`~phonometry.building.prediction.detailed_model.InSituElementResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the ``Rsitu`` curve ``plot`` call. @@ -1087,7 +1089,7 @@ def plot_airborne_insulation( curve), then the level difference ``D`` and, when available, the apparent sound reduction index ``R'``. - :param result: An :class:`~phonometry.building.insulation.AirborneInsulationResult`. + :param result: An :class:`~phonometry.building.measurement.insulation.AirborneInsulationResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the primary ``DnT`` curve ``plot`` call. @@ -1121,7 +1123,7 @@ def plot_impact_insulation( Draws the standardized level ``L'nT`` first (the primary curve) and, when available, the normalized level ``L'n``. - :param result: An :class:`~phonometry.building.insulation.ImpactInsulationResult`. + :param result: An :class:`~phonometry.building.measurement.insulation.ImpactInsulationResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the primary ``L'nT`` curve ``plot`` call. @@ -1150,7 +1152,7 @@ def plot_band_uncertainty( """Per-band standard uncertainty of an insulation quantity (ISO 12999-1). :param result: A - :class:`~phonometry.building.building_uncertainty.BandUncertainty`. + :class:`~phonometry.building.measurement.uncertainty.BandUncertainty`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the uncertainty curve ``plot`` call. @@ -1183,7 +1185,7 @@ def plot_floor_covering_improvement( """Impact-sound improvement spectrum ΔL of a floor covering (ISO 16251-1). :param result: A - :class:`~phonometry.building.floor_covering_improvement.FloorCoveringImprovementResult`. + :class:`~phonometry.building.measurement.floor_covering_improvement.FloorCoveringImprovementResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the improvement-curve ``plot`` call. @@ -1238,7 +1240,7 @@ def plot_db_hr_global_index( the index. :param result: A - :class:`~phonometry.building.spanish_building_code.DbHrGlobalIndexResult`. + :class:`~phonometry.building.regulation.spain.DbHrGlobalIndexResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the band-insulation ``bar`` call. @@ -1294,7 +1296,7 @@ def plot_db_hr_assessment( that is not met. :param result: A - :class:`~phonometry.building.spanish_building_code.DbHrAssessment`. + :class:`~phonometry.building.regulation.spain.DbHrAssessment`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the achieved-value ``scatter`` call. @@ -1383,7 +1385,7 @@ def plot_heavy_impact_source( """Measured heavy-impact source ``LFE`` against its printed tolerance band. :param result: A - :class:`~phonometry.building.heavy_impact.HeavyImpactSourceCheck`. + :class:`~phonometry.building.measurement.heavy_impact.HeavyImpactSourceCheck`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the measured-curve ``plot`` call. @@ -1429,7 +1431,7 @@ def plot_standardized_maximum_impact( """Measured and standardized maximum impact levels (ISO 16283-2 3.16). :param result: A - :class:`~phonometry.building.heavy_impact.StandardizedMaximumImpactResult`. + :class:`~phonometry.building.measurement.heavy_impact.StandardizedMaximumImpactResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the standardized-curve ``plot`` call. @@ -1464,7 +1466,7 @@ def plot_a_weighted_maximum_impact( """A-weighted maximum impact level and its band contributions (ISO 717-2 D). :param result: An - :class:`~phonometry.building.heavy_impact.AWeightedMaximumImpactResult`. + :class:`~phonometry.building.measurement.heavy_impact.AWeightedMaximumImpactResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the ``bar`` call for the corrected values. @@ -1500,7 +1502,7 @@ def plot_ceiling_attenuation( """Normalized ceiling attenuation against the fitted ASTM E413 contour. :param result: A - :class:`~phonometry.building.ceiling_plenum.CeilingAttenuationResult`. + :class:`~phonometry.building.prediction.ceiling_plenum.CeilingAttenuationResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the measured-curve ``plot`` call. @@ -1535,7 +1537,7 @@ def plot_plenum_flanking( """Ceiling/plenum flanking path ``Rcl`` against the two ceilings. :param result: A - :class:`~phonometry.building.ceiling_plenum.PlenumFlankingResult`. + :class:`~phonometry.building.prediction.ceiling_plenum.PlenumFlankingResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the ``Rcl`` curve ``plot`` call. @@ -1572,7 +1574,7 @@ def plot_wall_tie_coupling( """Wall-tie coupling loss factor against the rigid-connection ceiling. :param result: A - :class:`~phonometry.building.masonry_cavity_wall.WallTieCouplingResult`. + :class:`~phonometry.building.prediction.masonry_cavity_wall.WallTieCouplingResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the ``eta_ij`` curve ``plot`` call. @@ -1657,7 +1659,7 @@ def plot_tapping_force( frequency ``fco`` marked. :param result: A - :class:`~phonometry.building.resilient_layers.TappingForceResult`. + :class:`~phonometry.building.prediction.resilient_layers.TappingForceResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the force-spectrum ``plot`` call. @@ -1701,7 +1703,7 @@ def plot_covering_improvement( """Predicted ``ΔL`` of a soft floor covering beside its two-line estimate. :param result: A - :class:`~phonometry.building.resilient_layers.CoveringImprovementResult`. + :class:`~phonometry.building.prediction.resilient_layers.CoveringImprovementResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the force-ratio curve ``plot`` call. @@ -1732,7 +1734,7 @@ def plot_floating_floor_improvement( """Predicted ``ΔL`` of a floating floor above its mass-spring resonance. :param result: A - :class:`~phonometry.building.resilient_layers.FloatingFloorImprovementResult`. + :class:`~phonometry.building.prediction.resilient_layers.FloatingFloorImprovementResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the improvement curve ``plot`` call. @@ -1767,14 +1769,14 @@ def plot_lining_improvement( D.3) and marks the result's own resonance frequency. :param result: A - :class:`~phonometry.building.resilient_layers.LiningImprovementResult`. + :class:`~phonometry.building.prediction.resilient_layers.LiningImprovementResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the ``ΔRw`` curve ``plot`` call. :return: The axes. """ from .._i18n import localize_axes - from ..building.resilient_layers import lining_improvement + from ..building.prediction.resilient_layers import lining_improvement ax = ax if ax is not None else _new_axes() # The endpoints are written back exactly: np.logspace lands a few ulps diff --git a/src/phonometry/_plot/common.py b/src/phonometry/_plot/common.py index 25f80e846..816d37687 100644 --- a/src/phonometry/_plot/common.py +++ b/src/phonometry/_plot/common.py @@ -34,7 +34,7 @@ from matplotlib.container import BarContainer from matplotlib.typing import ColorType - from ..building.insulation import ( + from ..building.measurement.insulation import ( ImpactRatingResult, WeightedRatingResult, ) diff --git a/src/phonometry/_plot/geometry.py b/src/phonometry/_plot/geometry.py index 9e164b406..b671c8553 100644 --- a/src/phonometry/_plot/geometry.py +++ b/src/phonometry/_plot/geometry.py @@ -40,9 +40,9 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from ..building.aperture_transmission import ApertureTransmissionResult - from ..building.facade_prediction import FacadeElement - from ..building.panel_transmission import SoundReductionResult + from ..building.prediction.aperture_transmission import ApertureTransmissionResult + from ..building.prediction.facade import FacadeElement + from ..building.prediction.panel_transmission import SoundReductionResult from ..electroacoustics.piston import RadiatingPistonResult from ..emission.intensity import IntensityResult from ..environment.propagation.ground_barriers import BarrierInsertionLoss diff --git a/src/phonometry/_report/_insulation_fiche.py b/src/phonometry/_report/_insulation_fiche.py index 3bded9d4c..1b2c15e0c 100644 --- a/src/phonometry/_report/_insulation_fiche.py +++ b/src/phonometry/_report/_insulation_fiche.py @@ -45,7 +45,10 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.insulation import ImpactRatingResult, WeightedRatingResult + from ..building.measurement.insulation import ( + ImpactRatingResult, + WeightedRatingResult, + ) #: A per-band table column: header markup, values and decimal places. Column = tuple[str, np.ndarray, int] diff --git a/src/phonometry/_report/en12354_5.py b/src/phonometry/_report/en12354_5.py index 64d139566..2fd34d496 100644 --- a/src/phonometry/_report/en12354_5.py +++ b/src/phonometry/_report/en12354_5.py @@ -2,7 +2,7 @@ """Installed structure-borne sound prediction fiche (reportlab, EN 12354-5). Renders an -:class:`~phonometry.building.installed_structure_borne.InstalledSourceResult` +:class:`~phonometry.building.prediction.installed_structure_borne.InstalledSourceResult` (the normalised structure-borne sound pressure level ``L_n,s`` predicted in a receiving room from building service equipment, EN 12354-5:2009) to a one-page **prediction** report. Unlike the measurement fiches, the reported result is an @@ -57,7 +57,7 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.installed_structure_borne import InstalledSourceResult + from ..building.prediction.installed_structure_borne import InstalledSourceResult def _basis(language: str = "en") -> str: @@ -195,7 +195,7 @@ def render_installed_structure_borne_report( """Render an EN 12354-5 installed structure-borne prediction fiche. :param result: An - :class:`~phonometry.building.installed_structure_borne.InstalledSourceResult` + :class:`~phonometry.building.prediction.installed_structure_borne.InstalledSourceResult` carrying the per-path ``path_levels`` ``L_n,s,ij``, the combined ``total_level`` ``L_n,s`` and the ``installed_power_level`` ``L_Ws,inst``. diff --git a/src/phonometry/_report/en15657.py b/src/phonometry/_report/en15657.py index f2e9bd0e2..7b3acedac 100644 --- a/src/phonometry/_report/en15657.py +++ b/src/phonometry/_report/en15657.py @@ -2,7 +2,7 @@ """Structure-borne sound power characterization fiche (reportlab, EN 15657). Renders a -:class:`~phonometry.building.structure_borne_power.StructureBornePowerResult` +:class:`~phonometry.building.measurement.structure_borne_power.StructureBornePowerResult` (the structure-borne sound power a piece of building service equipment injects into a reception plate of known mass per area ``m`` and area ``S`` from the spatial-average plate velocity level ``Lv`` and the plate loss factor ``eta``, @@ -55,7 +55,7 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.structure_borne_power import StructureBornePowerResult + from ..building.measurement.structure_borne_power import StructureBornePowerResult def _basis(language: str = "en") -> str: @@ -191,7 +191,7 @@ def render_structure_borne_power_report( """Render an EN 15657 structure-borne sound power fiche to a PDF at ``path``. :param result: A - :class:`~phonometry.building.structure_borne_power.StructureBornePowerResult` + :class:`~phonometry.building.measurement.structure_borne_power.StructureBornePowerResult` carrying the per-band injected ``power_level`` ``L_Ws``, the plate ``velocity_level`` ``Lv``, the ``loss_factor`` ``eta``, the plate ``mass_per_area`` ``m`` and ``area`` ``S``. diff --git a/src/phonometry/_report/iso10052.py b/src/phonometry/_report/iso10052.py index f2eec6ef1..cbd4e1737 100644 --- a/src/phonometry/_report/iso10052.py +++ b/src/phonometry/_report/iso10052.py @@ -2,17 +2,17 @@ """ISO 10052 survey-method field sound-insulation fiches (reportlab renderer). Renders the survey (control) method results of -:mod:`phonometry.building.survey_insulation` (ISO 10052:2021, identical in the +:mod:`phonometry.building.measurement.survey_insulation` (ISO 10052:2021, identical in the harmonized EN ISO 10052:2004+A1:2010) to one-page field test reports: -* :class:`~phonometry.building.survey_insulation.SurveyAirborneResult` to a +* :class:`~phonometry.building.measurement.survey_insulation.SurveyAirborneResult` to a field airborne report of the standardized level difference ``DnT`` (Clause 3.4) with the ISO 717-1 single number ``DnT,w (C; Ctr)``, or the apparent sound reduction index ``R'`` (Clause 3.6) with ``R'w (C; Ctr)``; -* :class:`~phonometry.building.survey_insulation.SurveyImpactResult` to a field +* :class:`~phonometry.building.measurement.survey_insulation.SurveyImpactResult` to a field impact report of the standardized impact level ``L'nT`` (Clause 3.8) with the ISO 717-2 single number ``L'nT,w (CI)``; -* :class:`~phonometry.building.survey_insulation.SurveyFacadeResult` to a field +* :class:`~phonometry.building.measurement.survey_insulation.SurveyFacadeResult` to a field facade report of the standardized facade level difference ``D2m,nT`` (Clause 3.14) with ``D2m,nT,w (C; Ctr)``. @@ -40,8 +40,11 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.insulation import ImpactRatingResult, WeightedRatingResult - from ..building.survey_insulation import ( + from ..building.measurement.insulation import ( + ImpactRatingResult, + WeightedRatingResult, + ) + from ..building.measurement.survey_insulation import ( SurveyAirborneResult, SurveyFacadeResult, SurveyImpactResult, @@ -177,7 +180,7 @@ def render_survey_airborne_report( """Render a survey-method airborne fiche (ISO 10052) to a PDF. :param result: The - :class:`~phonometry.building.survey_insulation.SurveyAirborneResult`. + :class:`~phonometry.building.measurement.survey_insulation.SurveyAirborneResult`. :param rating: The ISO 717-1 rating of the reported quantity (the result's ``rating`` for ``DnT`` or ``r_prime_rating`` for ``R'``); its ``plot`` draws the fiche curve. @@ -212,7 +215,7 @@ def render_survey_impact_report( """Render a survey-method impact fiche ``L'nT`` (ISO 10052) to a PDF. :param result: The - :class:`~phonometry.building.survey_insulation.SurveyImpactResult`. + :class:`~phonometry.building.measurement.survey_insulation.SurveyImpactResult`. :param rating: The ISO 717-2 rating of ``L'nT`` (the result's ``rating``); its ``plot`` draws the fiche curve. :param path: Destination path of the PDF file. @@ -243,7 +246,7 @@ def render_survey_facade_report( """Render a survey-method facade fiche ``D2m,nT`` (ISO 10052) to a PDF. :param result: The - :class:`~phonometry.building.survey_insulation.SurveyFacadeResult`. + :class:`~phonometry.building.measurement.survey_insulation.SurveyFacadeResult`. :param rating: The ISO 717-1 rating of ``D2m,nT`` (the result's ``rating``); its ``plot`` draws the fiche curve. :param path: Destination path of the PDF file. diff --git a/src/phonometry/_report/iso10140.py b/src/phonometry/_report/iso10140.py index 8fd7bafdd..efb42f5cc 100644 --- a/src/phonometry/_report/iso10140.py +++ b/src/phonometry/_report/iso10140.py @@ -2,9 +2,9 @@ """ISO 10140 laboratory sound-insulation test report (reportlab renderer). Renders a -:class:`~phonometry.building.lab_insulation.LabAirborneInsulationResult` +:class:`~phonometry.building.measurement.lab_insulation.LabAirborneInsulationResult` (laboratory airborne, ISO 10140-2:2010) or -:class:`~phonometry.building.lab_insulation.LabImpactInsulationResult` +:class:`~phonometry.building.measurement.lab_insulation.LabImpactInsulationResult` (laboratory impact, ISO 10140-3:2010) to the one-page laboratory test report each standard's Clause 9 prescribes, laid out like the accredited laboratory reports rated per ISO 717. The shared two-panel skeleton (title and basis @@ -33,8 +33,11 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.insulation import ImpactRatingResult, WeightedRatingResult - from ..building.lab_insulation import ( + from ..building.measurement.insulation import ( + ImpactRatingResult, + WeightedRatingResult, + ) + from ..building.measurement.lab_insulation import ( LabAirborneInsulationResult, LabImpactInsulationResult, ) @@ -89,9 +92,9 @@ def render_iso10140_report( """Render an ISO 10140 laboratory sound-insulation test report to a PDF. :param result: The laboratory result - (:class:`~phonometry.building.lab_insulation.LabAirborneInsulationResult` + (:class:`~phonometry.building.measurement.lab_insulation.LabAirborneInsulationResult` or - :class:`~phonometry.building.lab_insulation.LabImpactInsulationResult`) + :class:`~phonometry.building.measurement.lab_insulation.LabImpactInsulationResult`) carrying the per-band quantity and the equivalent absorption area. :param rating: The ISO 717 rating of the reported quantity (the result's own ``rating``); its ``plot`` draws the fiche curve. diff --git a/src/phonometry/_report/iso10848.py b/src/phonometry/_report/iso10848.py index 608765d97..f5e9ea4b8 100644 --- a/src/phonometry/_report/iso10848.py +++ b/src/phonometry/_report/iso10848.py @@ -2,21 +2,21 @@ """ISO 10848 laboratory flanking-transmission fiches (reportlab renderer). Renders the three results of the laboratory flanking-transmission measurement -(:mod:`phonometry.building.flanking_transmission`, ISO 10848-1/-2:2006 and +(:mod:`phonometry.building.measurement.flanking_transmission`, ISO 10848-1/-2:2006 and ISO 10848-4:2010) to one-page PDF fiches: -* :class:`~phonometry.building.flanking_transmission.VibrationReductionResult` +* :class:`~phonometry.building.measurement.flanking_transmission.VibrationReductionResult` to a **junction characterization** report of the vibration reduction index ``Kij`` (ISO 10848-1:2006): the per-band ``Kij`` beside the ``Kij(f)`` curve, the single-number arithmetic-mean ``Kij`` over the Annex A band range and the bands bracketed for poor modal overlap (ISO 10848-4:2010 Clause 9), excluded from that mean. This report has its own compact layout (a dB junction index with a mean, not a shifted-reference insulation curve). -* :class:`~phonometry.building.flanking_transmission.FlankingLevelDifferenceResult` +* :class:`~phonometry.building.measurement.flanking_transmission.FlankingLevelDifferenceResult` to a **measurement** report of the normalized flanking level difference ``Dn,f`` (airborne, ISO 10848-1:2006 Formula (4)), with the ISO 717-1 single number ``Dn,f,w (C; Ctr)``. -* :class:`~phonometry.building.flanking_transmission.FlankingImpactLevelResult` +* :class:`~phonometry.building.measurement.flanking_transmission.FlankingImpactLevelResult` to a **measurement** report of the normalized flanking impact level ``Ln,f`` (tapping machine, ISO 10848-1:2006 Formula (5)), with the ISO 717-2 single number ``Ln,f,w (CI)``. @@ -65,12 +65,15 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.flanking_transmission import ( + from ..building.measurement.flanking_transmission import ( FlankingImpactLevelResult, FlankingLevelDifferenceResult, VibrationReductionResult, ) - from ..building.insulation import ImpactRatingResult, WeightedRatingResult + from ..building.measurement.insulation import ( + ImpactRatingResult, + WeightedRatingResult, + ) #: Designation of each applicable ISO 10848 part. The overall flanking #: descriptors ``Dn,f`` / ``Ln,f`` are defined in the Part 1 frame document @@ -174,7 +177,7 @@ def render_flanking_level_difference_report( """Render a normalized flanking level difference ``Dn,f`` fiche (ISO 10848). :param result: The - :class:`~phonometry.building.flanking_transmission.FlankingLevelDifferenceResult`; + :class:`~phonometry.building.measurement.flanking_transmission.FlankingLevelDifferenceResult`; its ``rating`` (ISO 717-1) carries the per-band data the fiche draws. :param path: Destination path of the PDF file. :param metadata: Optional :class:`ReportMetadata`; ``None`` produces a @@ -218,7 +221,7 @@ def render_flanking_impact_level_report( """Render a normalized flanking impact level ``Ln,f`` fiche (ISO 10848). :param result: The - :class:`~phonometry.building.flanking_transmission.FlankingImpactLevelResult`; + :class:`~phonometry.building.measurement.flanking_transmission.FlankingImpactLevelResult`; its ``rating`` (ISO 717-2) carries the per-band data the fiche draws. :param path: Destination path of the PDF file. :param metadata: Optional :class:`ReportMetadata`; ``None`` produces a @@ -393,7 +396,7 @@ def render_vibration_reduction_report( """Render a vibration reduction index ``Kij`` junction fiche (ISO 10848-1). :param result: The - :class:`~phonometry.building.flanking_transmission.VibrationReductionResult`; + :class:`~phonometry.building.measurement.flanking_transmission.VibrationReductionResult`; it must carry the band centre frequencies (``result.frequencies``) that label the table and drive the single-number band range. :param path: Destination path of the PDF file. diff --git a/src/phonometry/_report/iso12354.py b/src/phonometry/_report/iso12354.py index 3f08949e0..657c7c58b 100644 --- a/src/phonometry/_report/iso12354.py +++ b/src/phonometry/_report/iso12354.py @@ -2,13 +2,13 @@ """EN/ISO 12354-1/-2/-3 predicted building sound-insulation fiche (reportlab). Renders a -:class:`~phonometry.building.building_prediction.AirbornePredictionResult` +:class:`~phonometry.building.prediction.global_model.AirbornePredictionResult` (predicted apparent sound reduction index ``R'`` between rooms, EN/ISO 12354-1), an -:class:`~phonometry.building.building_prediction.ImpactPredictionResult` +:class:`~phonometry.building.prediction.global_model.ImpactPredictionResult` (predicted apparent normalized impact sound pressure level ``L'n``, EN/ISO 12354-2) or a -:class:`~phonometry.building.facade_prediction.FacadePredictionResult` +:class:`~phonometry.building.prediction.facade.FacadePredictionResult` (predicted standardized level difference of a facade ``D2m,nT``, EN/ISO 12354-3) to a one-page **prediction** report. Unlike the measurement fiches (:mod:`.iso10140`, :mod:`.iso16283`, :mod:`.iso15186`), the reported result is @@ -61,15 +61,15 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.building_prediction import ( - AirbornePredictionResult, - ImpactPredictionResult, - ) - from ..building.detailed_prediction import ( + from ..building.prediction.detailed_model import ( DetailedAirborneResult, DetailedImpactResult, ) - from ..building.facade_prediction import FacadePredictionResult + from ..building.prediction.facade import FacadePredictionResult + from ..building.prediction.global_model import ( + AirbornePredictionResult, + ImpactPredictionResult, + ) #: Model standard deviation of the simplified single-number prediction, stated #: for reference in the method statement (EN 12354-1:2000 Clause 5, EN 12354-2 @@ -254,7 +254,7 @@ def render_iso12354_airborne_report( """Render a predicted apparent airborne insulation fiche (EN/ISO 12354-1). :param result: The - :class:`~phonometry.building.building_prediction.AirbornePredictionResult` + :class:`~phonometry.building.prediction.global_model.AirbornePredictionResult` carrying the predicted apparent weighted index ``R'w``, the direct-path index ``RDd,w`` and the per-path contributions. :param path: Destination path of the PDF file. @@ -316,7 +316,7 @@ def render_iso12354_impact_report( """Render a predicted apparent impact insulation fiche (EN/ISO 12354-2). :param result: The - :class:`~phonometry.building.building_prediction.ImpactPredictionResult` + :class:`~phonometry.building.prediction.global_model.ImpactPredictionResult` carrying the predicted apparent weighted level ``L'n,w`` and the Formula (21) terms (the bare-floor equivalent level ``Ln,w,eq``, the covering improvement ``ΔLw`` and the flanking correction ``K``). @@ -424,7 +424,7 @@ def render_iso12354_detailed_airborne_report( """Render a detailed per-band airborne prediction fiche (EN/ISO 12354-1). :param result: The - :class:`~phonometry.building.detailed_prediction.DetailedAirborneResult` + :class:`~phonometry.building.prediction.detailed_model.DetailedAirborneResult` carrying the per-band ``R'``, the per-band path contributions and the ISO 717-1 rating. :param path: Destination path of the PDF file. @@ -472,7 +472,7 @@ def render_iso12354_detailed_impact_report( """Render a detailed per-band impact prediction fiche (EN/ISO 12354-2). :param result: The - :class:`~phonometry.building.detailed_prediction.DetailedImpactResult` + :class:`~phonometry.building.prediction.detailed_model.DetailedImpactResult` carrying the per-band ``L'n``, the per-band path contributions and the ISO 717-2 rating. :param path: Destination path of the PDF file. @@ -539,7 +539,7 @@ def render_iso12354_facade_report( """Render a predicted facade sound insulation fiche (EN/ISO 12354-3). :param result: The - :class:`~phonometry.building.facade_prediction.FacadePredictionResult` + :class:`~phonometry.building.prediction.facade.FacadePredictionResult` carrying the predicted standardized level difference ``D2m,nT``, its single number ``D2m,nT,w`` (with ``R'tr,s,w`` and ``Ctr``) and the per-element partial indices ``Rp``. @@ -563,7 +563,7 @@ def render_iso12354_facade_report( "bands (pass matching per-band element data and 'bands' to " "facade_sound_reduction)." ) - from ..building.insulation import weighted_rating + from ..building.measurement.insulation import weighted_rating shares = _facade_energy_shares(result) if verbose else {} metric_rows: list[tuple[str, str]] = [] diff --git a/src/phonometry/_report/iso15186.py b/src/phonometry/_report/iso15186.py index 847a5b474..e5e0e22ea 100644 --- a/src/phonometry/_report/iso15186.py +++ b/src/phonometry/_report/iso15186.py @@ -2,16 +2,16 @@ """ISO 15186-1 intensity sound-insulation test reports (reportlab renderer). Renders the two ISO 15186-1:2000 sound-intensity insulation quantities of -:mod:`phonometry.building.intensity_insulation` to the one-page laboratory +:mod:`phonometry.building.measurement.intensity_insulation` to the one-page laboratory test report of the standard's Clause 8, laid out like the accredited laboratory reports rated per ISO 717-1: -* :class:`~phonometry.building.intensity_insulation.IntensityReductionResult` +* :class:`~phonometry.building.measurement.intensity_insulation.IntensityReductionResult` to the intensity sound reduction index ``RI`` (Clause 3.8, Formula (7)); its single-number rating ``RI,w`` is the ordinary ISO 717-1 airborne rating evaluated on the intensity spectrum. The verbose table annexes the Kc-modified index ``RI,M`` (Clause 3.10, Formula (9)) beside ``RI``. -* :class:`~phonometry.building.intensity_insulation.IntensityElementNormalizedResult` +* :class:`~phonometry.building.measurement.intensity_insulation.IntensityElementNormalizedResult` to the element-normalized level difference ``DI,n,e`` for small building elements (Clause 3.9, Formula (8)), rated ``DI,n,e,w`` by the same ISO 717-1 airborne machinery; its verbose table shows the ISO 717 evaluation per band. @@ -52,8 +52,8 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.insulation import WeightedRatingResult - from ..building.intensity_insulation import ( + from ..building.measurement.insulation import WeightedRatingResult + from ..building.measurement.intensity_insulation import ( IntensityElementNormalizedResult, IntensityReductionResult, ) @@ -168,7 +168,7 @@ def render_iso15186_report( """Render an ISO 15186-1 intensity sound-insulation test report to a PDF. :param result: The intensity result - (:class:`~phonometry.building.intensity_insulation.IntensityReductionResult`) + (:class:`~phonometry.building.measurement.intensity_insulation.IntensityReductionResult`) carrying the per-band intensity sound reduction index ``RI`` and, optionally, the Kc-modified index ``RI,M``. :param rating: The ISO 717-1 rating of the reported ``RI`` (the result's @@ -311,7 +311,7 @@ def render_iso15186_element_report( """Render an ISO 15186-1 element-normalized insulation report to a PDF. :param result: The element result - (:class:`~phonometry.building.intensity_insulation.IntensityElementNormalizedResult`) + (:class:`~phonometry.building.measurement.intensity_insulation.IntensityElementNormalizedResult`) carrying the per-band element-normalized level difference ``DI,n,e``. :param rating: The ISO 717-1 rating of the reported ``DI,n,e`` (the result's own ``rating``); its ``plot`` draws the fiche curve. diff --git a/src/phonometry/_report/iso16251.py b/src/phonometry/_report/iso16251.py index 4577f9fb6..73f143fb6 100644 --- a/src/phonometry/_report/iso16251.py +++ b/src/phonometry/_report/iso16251.py @@ -2,7 +2,7 @@ """ISO 16251-1 floor-covering impact-sound-improvement fiche. Renders a -:class:`~phonometry.building.floor_covering_improvement.FloorCoveringImprovementResult` +:class:`~phonometry.building.measurement.floor_covering_improvement.FloorCoveringImprovementResult` to a one-page PDF laid out like an accredited impact-improvement test report (BS EN ISO 16251-1:2014, the small-mock-up laboratory method for the reduction of transmitted impact sound by soft, locally-reacting floor coverings): @@ -65,7 +65,9 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.floor_covering_improvement import FloorCoveringImprovementResult + from ..building.measurement.floor_covering_improvement import ( + FloorCoveringImprovementResult, + ) def _metadata_pairs( @@ -131,8 +133,8 @@ def _reference_floor_with_covering( those bands. Uses a lazy domain import (the report layer keeps its building imports deferred). """ - from ..building.floor_covering_improvement import _RATING_FREQS - from ..building.insulation import _IMPACT_REFERENCE_FLOOR + from ..building.measurement.floor_covering_improvement import _RATING_FREQS + from ..building.measurement.insulation import _IMPACT_REFERENCE_FLOOR freqs = np.asarray(result.frequencies, dtype=np.float64) rating = np.asarray(_RATING_FREQS, dtype=np.float64) @@ -312,7 +314,7 @@ def render_iso16251_report( """Render an ISO 16251-1 floor-covering impact-improvement fiche to a PDF. :param result: A - :class:`~phonometry.building.floor_covering_improvement.FloorCoveringImprovementResult` + :class:`~phonometry.building.measurement.floor_covering_improvement.FloorCoveringImprovementResult` carrying the ``frequencies``, the improvement ``improvement`` (``delta-L``), the ``limited`` mask and the weighted ``delta_lw`` / ``ci_delta``. diff --git a/src/phonometry/_report/iso16283.py b/src/phonometry/_report/iso16283.py index 820173c98..37db79859 100644 --- a/src/phonometry/_report/iso16283.py +++ b/src/phonometry/_report/iso16283.py @@ -1,11 +1,11 @@ # Copyright (c) 2026. Jose Manuel Requena Plens """ISO 16283 field sound-insulation test report (reportlab renderer). -Renders a :class:`~phonometry.building.insulation.AirborneInsulationResult` +Renders a :class:`~phonometry.building.measurement.insulation.AirborneInsulationResult` (field airborne, ISO 16283-1:2014), -:class:`~phonometry.building.insulation.ImpactInsulationResult` (field +:class:`~phonometry.building.measurement.insulation.ImpactInsulationResult` (field impact, ISO 16283-2:2020) or -:class:`~phonometry.building.insulation.FacadeInsulationResult` (field +:class:`~phonometry.building.measurement.insulation.FacadeInsulationResult` (field facade, ISO 16283-3:2016) to the one-page field test report of each standard's Clause 14, laid out like the recommended results form (ISO 16283-1 Annex B / ISO 16283-2 Annex C) and the accredited field reports @@ -57,7 +57,7 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.insulation import ( + from ..building.measurement.insulation import ( AirborneInsulationResult, FacadeInsulationResult, ImpactInsulationResult, @@ -150,13 +150,13 @@ def render_iso16283_report( """Render an ISO 16283 field sound-insulation test report to a PDF. :param result: The field result - (:class:`~phonometry.building.insulation.AirborneInsulationResult` - or :class:`~phonometry.building.insulation.ImpactInsulationResult`) + (:class:`~phonometry.building.measurement.insulation.AirborneInsulationResult` + or :class:`~phonometry.building.measurement.insulation.ImpactInsulationResult`) carrying the per-band quantities and, when built by the measurement functions, the per-band chain (levels and reverberation times). :param rating: The ISO 717 rating of the reported 16-band quantity, already evaluated by the caller - (:meth:`~phonometry.building.insulation.AirborneInsulationResult.report` + (:meth:`~phonometry.building.measurement.insulation.AirborneInsulationResult.report` validates and computes it); its ``plot`` draws the fiche curve. :param path: Destination path of the PDF file. :param quantity: ``"dnt"``, ``"r_prime"``, ``"l_n_t"`` or ``"l_n"`` @@ -299,7 +299,7 @@ def render_iso16283_facade_report( """Render an ISO 16283-3 field facade sound-insulation report to a PDF. :param result: The field facade result - (:class:`~phonometry.building.insulation.FacadeInsulationResult`) + (:class:`~phonometry.building.measurement.insulation.FacadeInsulationResult`) carrying the per-band facade quantities. :param rating: The ISO 717-1 rating of the reported facade quantity, already evaluated by the caller; its ``plot`` draws the fiche curve. diff --git a/src/phonometry/_report/iso717.py b/src/phonometry/_report/iso717.py index 27b0e1319..bfdcd3893 100644 --- a/src/phonometry/_report/iso717.py +++ b/src/phonometry/_report/iso717.py @@ -1,9 +1,9 @@ # Copyright (c) 2026. Jose Manuel Requena Plens """ISO 717 sound-insulation rating fiche (reportlab renderer). -Renders a :class:`~phonometry.building.insulation.WeightedRatingResult` +Renders a :class:`~phonometry.building.measurement.insulation.WeightedRatingResult` (airborne, ISO 717-1) or -:class:`~phonometry.building.insulation.ImpactRatingResult` (impact, +:class:`~phonometry.building.measurement.insulation.ImpactRatingResult` (impact, ISO 717-2) to a one-page PDF laid out like an accredited-laboratory test report (modelled on ISO 10140-2 / ISO 16283 lab reports rated per ISO 717): @@ -59,7 +59,10 @@ from .metadata import ReportMetadata if TYPE_CHECKING: - from ..building.insulation import ImpactRatingResult, WeightedRatingResult + from ..building.measurement.insulation import ( + ImpactRatingResult, + WeightedRatingResult, + ) #: Threshold below which an unfavourable deviation is shown as an em dash. _DEVIATION_EPS = 0.05 @@ -389,9 +392,9 @@ def render_iso717_report( """Render an ISO 717 accredited-laboratory rating fiche to a PDF at ``path``. :param result: A - :class:`~phonometry.building.insulation.WeightedRatingResult` + :class:`~phonometry.building.measurement.insulation.WeightedRatingResult` (airborne, ISO 717-1) or - :class:`~phonometry.building.insulation.ImpactRatingResult` (impact, + :class:`~phonometry.building.measurement.insulation.ImpactRatingResult` (impact, ISO 717-2) carrying the per-band ``band_centers``, ``measured`` and ``shifted_reference`` curves. :param path: Destination path of the PDF file. diff --git a/src/phonometry/building/__init__.py b/src/phonometry/building/__init__.py index 8df2396de..eb01a1207 100644 --- a/src/phonometry/building/__init__.py +++ b/src/phonometry/building/__init__.py @@ -1,89 +1,203 @@ # Copyright (c) 2026. Jose Manuel Requena Plens -"""building domain of phonometry (see module docstrings).""" +"""building domain of phonometry (see module docstrings). + +Three subgroups since 4.0, by what the acoustician is doing: measuring a +building that exists (:mod:`~phonometry.building.measurement`, the ISO 16283, +10140, 10052, 15186 and 10848 methods with their ISO 717 ratings and ISO 12999 +uncertainty), predicting one that does not yet +(:mod:`~phonometry.building.prediction`, EN 12354 and the panel theory behind +it) and checking either against a national code +(:mod:`~phonometry.building.regulation`). Every public name is still exported +here, so ``from phonometry import building`` reads as it did. +""" from __future__ import annotations +from .._compat import _namespace_dir, _namespace_shim from .._plot.geometry import ( plot_aperture_geometry, plot_double_wall_geometry, plot_facade_elements, plot_junction_geometry, ) -from .aperture_transmission import ( - ApertureTransmissionResult, - circular_aperture_transmission_coefficient, - composite_transmission_loss, - slit_resonance_frequencies, - slit_transmission_coefficient, - transmission_loss_from_coefficient, -) -from .building_prediction import ( - AirbornePredictionResult, - FlankingPath, - ImpactPredictionResult, - PathContribution, - combine_linings, - equivalent_impact_level, - flanking_element, - flanking_path, - impact_flanking_correction, - junction_min_vibration_reduction, - junction_vibration_reduction, - predicted_airborne_insulation, - predicted_impact_insulation, - standardized_impact_level, - standardized_level_difference, -) -from .building_uncertainty import ( +from .measurement import ( COVERAGE_FACTORS, + HEAVY_IMPACT_A_WEIGHTING, + HEAVY_IMPACT_OCTAVE_BANDS, + HEAVY_IMPACT_SOURCES, + AirborneInsulationResult, + AWeightedMaximumImpactResult, BandUncertainty, + ExtendedImpactRatingResult, + ExtendedWeightedRatingResult, + FacadeInsulationResult, + FlankingImpactLevelResult, + FlankingLevelDifferenceResult, + FloorCoveringImprovementResult, + HeavyImpactSourceCheck, + HeavyImpactSourceSpec, + ImpactInsulationResult, + ImpactRatingResult, + IntensityElementNormalizedResult, + IntensityReductionResult, + LabAirborneInsulationResult, + LabImpactInsulationResult, + LabInsulationWarning, + StandardizedMaximumImpactResult, + StructureBornePowerResult, + SurveyAirborneResult, + SurveyFacadeResult, + SurveyImpactResult, + SurveyServiceEquipmentResult, UncertainValue, + VibrationReductionResult, + WeightedRatingResult, + a_weighted_maximum_impact_level, + acceleration_level, + adaptation_term_kc, + airborne_insulation, + background_corrected_level, + background_correction, + band_mode_count, band_uncertainty, + characteristic_reception_plate_power, + check_heavy_impact_source, + combine_subareas, combine_uncertainties, coverage_factor, + critical_frequency, + direction_averaged_level_difference, + energy_average_level, + equivalent_absorption_length, + equivalent_blocked_force_level, + equivalent_free_velocity_level, + estimate_reverberation_index, expanded_uncertainty, + facade_insulation, + fast_reverberation_correction, + heavy_impact_octave_levels, + heavy_impact_source_limits, + heavy_impact_source_specification, + impact_force_exposure_level, + impact_improvement, + impact_improvement_adaptation_term, + impact_insulation, + improvement_octave_bands, insulation_coverage_factor, insulation_expanded_uncertainty, + intensity_element_normalized_difference, + intensity_sound_reduction, + lab_airborne_insulation, + lab_impact_insulation, maximum_repeatability_standard_deviation, + mean_free_velocity_level, + modal_density, + modal_overlap_factor, + normalized_flanking_impact_level, + normalized_flanking_level_difference, + plate_loss_factor, prediction_input_uncertainty, + reception_plate_power, reduce_by_independent_measurements, + reverberation_index, satisfies_lower_requirement, satisfies_upper_requirement, single_number_uncertainty, single_number_uncertainty_uncorrelated, + source_mobility_from_levels, + spatial_mean_velocity_level, + standardized_maximum_impact_level, + strong_coupling_satisfied, + structure_borne_power_level, + surface_pressure_intensity_indicator, + survey_airborne_insulation, + survey_facade_insulation, + survey_impact_insulation, + survey_service_equipment_level, + total_loss_factor, uncertain_value, + velocity_level_difference, + vibration_reduction_index, + vibration_reduction_index_from_flanking, + weighted_impact_improvement, + weighted_impact_rating, + weighted_impact_rating_extended, + weighted_rating, + weighted_rating_extended, ) -from .ceiling_plenum import ( +from .prediction import ( CEILING_ATTENUATION_CONTOUR, - CeilingAttenuationResult, - PlenumFlankingResult, - ceiling_attenuation_class, - normalized_ceiling_attenuation, - partition_referenced_reduction_index, - plenum_flanking_reduction_index, -) -from .detailed_prediction import ( + PLATEAU_MATERIALS, + REFERENCE_AREA, + TAPPING_DROP_HEIGHT, + TAPPING_HAMMER_MASS, + TAPPING_HAMMER_RADIUS, + TAPPING_IMPACT_RATE, + WALL_TIE_STIFFNESS, + AirbornePredictionResult, + ApertureTransmissionResult, BandPath, + CeilingAttenuationResult, + CoveringImprovementResult, DetailedAirborneResult, DetailedImpactResult, + FacadeElement, + FacadePredictionResult, + FlankingPath, + FloatingFloorImprovementResult, HomogeneousElement, + ImpactPredictionResult, InSituElementResult, + InstalledSourceResult, + LiningImprovementResult, + PathContribution, + PlenumFlankingResult, + RadiatedPowerResult, + SoundReductionResult, + TappingForceResult, + WallTieCouplingResult, airborne_flanking_path, bare_floor_impact_level, bending_radiation_factor, calculated_sound_reduction_index, + ceiling_attenuation_class, + circular_aperture_transmission_coefficient, + combine_linings, + combined_dynamic_stiffness, + composite_transmission_loss, + corrugated_plate_mass_factor, + corrugated_plate_stiffness, + coupling_term, + coupling_term_force_source, + coupling_term_velocity_source, + covering_contact_stiffness, + covering_improvement, detailed_airborne_prediction, detailed_impact_prediction, direct_impact_level, direct_reduction_index, + double_floating_floor_resonances, + double_wall_transmission_loss, + equivalent_impact_level, + facade_shape_level_difference, + facade_sound_reduction, + field_incidence_correction, + flanking_element, flanking_impact_level, flanking_impact_level_from_flanking_level, flanking_impact_level_from_normalized_difference, + flanking_path, flanking_reduction_index, flanking_reduction_index_from_flanking_level, flanking_reduction_index_from_normalized_difference, floating_floor_improvement, + floating_floor_improvement_spectrum, + floating_floor_resonance_frequency, + force_pulse, forced_radiation_factor, + hammer_impact_velocity, + hammer_limiting_frequency, + impact_flanking_correction, impact_flanking_path, in_situ_element, in_situ_equivalent_absorption_length, @@ -91,164 +205,53 @@ in_situ_reduction_index, in_situ_total_loss_factor, in_situ_velocity_level_difference, - laboratory_total_loss_factor, - perimeter_absorption_coefficient, - reciprocity_impact_level, - resonant_sound_reduction_index, - structural_reverberation_time, -) -from .facade_prediction import ( - FacadeElement, - FacadePredictionResult, - RadiatedPowerResult, - facade_shape_level_difference, - facade_sound_reduction, - outdoor_attenuation, - outdoor_level, - radiated_sound_power, -) -from .flanking_transmission import ( - FlankingImpactLevelResult, - FlankingLevelDifferenceResult, - VibrationReductionResult, - band_mode_count, - critical_frequency, - direction_averaged_level_difference, - equivalent_absorption_length, - modal_density, - modal_overlap_factor, - normalized_flanking_impact_level, - normalized_flanking_level_difference, - strong_coupling_satisfied, - total_loss_factor, - velocity_level_difference, - vibration_reduction_index, - vibration_reduction_index_from_flanking, -) -from .floor_covering_improvement import ( - FloorCoveringImprovementResult, - acceleration_level, - background_corrected_level, - impact_improvement, - improvement_octave_bands, -) -from .heavy_impact import ( - HEAVY_IMPACT_A_WEIGHTING, - HEAVY_IMPACT_OCTAVE_BANDS, - HEAVY_IMPACT_SOURCES, - AWeightedMaximumImpactResult, - HeavyImpactSourceCheck, - HeavyImpactSourceSpec, - StandardizedMaximumImpactResult, - a_weighted_maximum_impact_level, - check_heavy_impact_source, - fast_reverberation_correction, - heavy_impact_octave_levels, - heavy_impact_source_limits, - heavy_impact_source_specification, - impact_force_exposure_level, - standardized_maximum_impact_level, -) -from .installed_structure_borne import ( - REFERENCE_AREA, - InstalledSourceResult, - coupling_term, - coupling_term_force_source, - coupling_term_velocity_source, installed_power_from_reception_plate, installed_source_prediction, installed_structure_borne_power_level, - structure_borne_pressure_level_path, - total_structure_borne_pressure_level, -) -from .insulation import ( - AirborneInsulationResult, - ExtendedImpactRatingResult, - ExtendedWeightedRatingResult, - FacadeInsulationResult, - ImpactInsulationResult, - ImpactRatingResult, - WeightedRatingResult, - airborne_insulation, - energy_average_level, - facade_insulation, - impact_improvement_adaptation_term, - impact_insulation, - weighted_impact_improvement, - weighted_impact_rating, - weighted_impact_rating_extended, - weighted_rating, - weighted_rating_extended, -) -from .intensity_insulation import ( - IntensityElementNormalizedResult, - IntensityReductionResult, - adaptation_term_kc, - combine_subareas, - intensity_element_normalized_difference, - intensity_sound_reduction, - surface_pressure_intensity_indicator, -) -from .lab_insulation import ( - LabAirborneInsulationResult, - LabImpactInsulationResult, - LabInsulationWarning, - background_correction, - lab_airborne_insulation, - lab_impact_insulation, -) -from .masonry_cavity_wall import ( - WALL_TIE_STIFFNESS, - WallTieCouplingResult, - wall_tie_coupling_loss_factor, - wall_tie_stiffness, - wall_tie_stiffness_per_area, -) -from .panel_transmission import ( - PLATEAU_MATERIALS, - SoundReductionResult, - corrugated_plate_mass_factor, - corrugated_plate_stiffness, - double_wall_transmission_loss, - field_incidence_correction, + junction_min_vibration_reduction, + junction_vibration_reduction, + laboratory_total_loss_factor, + lining_improvement, + lining_improvement_in_situ, + lining_resonance_frequency, mass_law_transmission_loss, mass_spring_mass_resonance, + normalized_ceiling_attenuation, orthotropic_critical_frequencies, orthotropic_plate_resonance, orthotropic_transmission_loss, - plateau_transmission_loss, - single_panel_transmission_loss, -) -from .resilient_layers import ( - TAPPING_DROP_HEIGHT, - TAPPING_HAMMER_MASS, - TAPPING_HAMMER_RADIUS, - TAPPING_IMPACT_RATE, - CoveringImprovementResult, - FloatingFloorImprovementResult, - LiningImprovementResult, - TappingForceResult, - combined_dynamic_stiffness, - covering_contact_stiffness, - covering_improvement, - double_floating_floor_resonances, - floating_floor_improvement_spectrum, - floating_floor_resonance_frequency, - force_pulse, - hammer_impact_velocity, - hammer_limiting_frequency, - lining_improvement, - lining_improvement_in_situ, - lining_resonance_frequency, + outdoor_attenuation, + outdoor_level, + partition_referenced_reduction_index, + perimeter_absorption_coefficient, plate_contact_stiffness, + plateau_transmission_loss, + plenum_flanking_reduction_index, + predicted_airborne_insulation, + predicted_impact_insulation, + radiated_sound_power, + reciprocity_impact_level, resilient_mount_improvement, + resonant_sound_reduction_index, short_pulse_mean_square_force, + single_panel_transmission_loss, + slit_resonance_frequencies, + slit_transmission_coefficient, + standardized_impact_level, + standardized_level_difference, + structural_reverberation_time, + structure_borne_pressure_level_path, tapping_cut_off_frequency, tapping_force_spectrum, + total_structure_borne_pressure_level, + transmission_loss_from_coefficient, + wall_tie_coupling_loss_factor, + wall_tie_stiffness, + wall_tie_stiffness_per_area, weighted_floating_floor_improvement, weighted_lining_improvement, ) -from .spanish_building_code import ( +from .regulation import ( DB_HR_FREQUENCIES, DB_HR_NORMALISED_SPECTRA, DbHrAssessment, @@ -270,30 +273,6 @@ ra_tr, window_size_correction, ) -from .structure_borne_power import ( - StructureBornePowerResult, - characteristic_reception_plate_power, - equivalent_blocked_force_level, - equivalent_free_velocity_level, - mean_free_velocity_level, - plate_loss_factor, - reception_plate_power, - source_mobility_from_levels, - spatial_mean_velocity_level, - structure_borne_power_level, -) -from .survey_insulation import ( - SurveyAirborneResult, - SurveyFacadeResult, - SurveyImpactResult, - SurveyServiceEquipmentResult, - estimate_reverberation_index, - reverberation_index, - survey_airborne_insulation, - survey_facade_insulation, - survey_impact_insulation, - survey_service_equipment_level, -) __all__ = [ "CEILING_ATTENUATION_CONTOUR", @@ -548,3 +527,9 @@ "weighted_rating_extended", "window_size_correction", ] + +#: No public name left this namespace in 4.0, but the modules did, so +#: ``building.insulation`` has to keep resolving to its alias module until +#: 5.0: the import registers it, the attribute read needs this. +__getattr__ = _namespace_shim(__name__) +__dir__ = _namespace_dir(__name__, __all__) diff --git a/src/phonometry/building/measurement/__init__.py b/src/phonometry/building/measurement/__init__.py new file mode 100644 index 000000000..360d850ca --- /dev/null +++ b/src/phonometry/building/measurement/__init__.py @@ -0,0 +1,232 @@ +# Copyright (c) 2026. Jose Manuel Requena Plens +"""building.measurement subdomain of phonometry: field and laboratory measurement of sound insulation.""" + +from __future__ import annotations + +from .flanking_transmission import ( + FlankingImpactLevelResult, + FlankingLevelDifferenceResult, + VibrationReductionResult, + band_mode_count, + critical_frequency, + direction_averaged_level_difference, + equivalent_absorption_length, + modal_density, + modal_overlap_factor, + normalized_flanking_impact_level, + normalized_flanking_level_difference, + strong_coupling_satisfied, + total_loss_factor, + velocity_level_difference, + vibration_reduction_index, + vibration_reduction_index_from_flanking, +) +from .floor_covering_improvement import ( + FloorCoveringImprovementResult, + acceleration_level, + background_corrected_level, + impact_improvement, + improvement_octave_bands, +) +from .heavy_impact import ( + HEAVY_IMPACT_A_WEIGHTING, + HEAVY_IMPACT_OCTAVE_BANDS, + HEAVY_IMPACT_SOURCES, + AWeightedMaximumImpactResult, + HeavyImpactSourceCheck, + HeavyImpactSourceSpec, + StandardizedMaximumImpactResult, + a_weighted_maximum_impact_level, + check_heavy_impact_source, + fast_reverberation_correction, + heavy_impact_octave_levels, + heavy_impact_source_limits, + heavy_impact_source_specification, + impact_force_exposure_level, + standardized_maximum_impact_level, +) +from .insulation import ( + AirborneInsulationResult, + ExtendedImpactRatingResult, + ExtendedWeightedRatingResult, + FacadeInsulationResult, + ImpactInsulationResult, + ImpactRatingResult, + WeightedRatingResult, + airborne_insulation, + energy_average_level, + facade_insulation, + impact_improvement_adaptation_term, + impact_insulation, + weighted_impact_improvement, + weighted_impact_rating, + weighted_impact_rating_extended, + weighted_rating, + weighted_rating_extended, +) +from .intensity_insulation import ( + IntensityElementNormalizedResult, + IntensityReductionResult, + adaptation_term_kc, + combine_subareas, + intensity_element_normalized_difference, + intensity_sound_reduction, + surface_pressure_intensity_indicator, +) +from .lab_insulation import ( + LabAirborneInsulationResult, + LabImpactInsulationResult, + LabInsulationWarning, + background_correction, + lab_airborne_insulation, + lab_impact_insulation, +) +from .structure_borne_power import ( + StructureBornePowerResult, + characteristic_reception_plate_power, + equivalent_blocked_force_level, + equivalent_free_velocity_level, + mean_free_velocity_level, + plate_loss_factor, + reception_plate_power, + source_mobility_from_levels, + spatial_mean_velocity_level, + structure_borne_power_level, +) +from .survey_insulation import ( + SurveyAirborneResult, + SurveyFacadeResult, + SurveyImpactResult, + SurveyServiceEquipmentResult, + estimate_reverberation_index, + reverberation_index, + survey_airborne_insulation, + survey_facade_insulation, + survey_impact_insulation, + survey_service_equipment_level, +) +from .uncertainty import ( + COVERAGE_FACTORS, + BandUncertainty, + UncertainValue, + band_uncertainty, + combine_uncertainties, + coverage_factor, + expanded_uncertainty, + insulation_coverage_factor, + insulation_expanded_uncertainty, + maximum_repeatability_standard_deviation, + prediction_input_uncertainty, + reduce_by_independent_measurements, + satisfies_lower_requirement, + satisfies_upper_requirement, + single_number_uncertainty, + single_number_uncertainty_uncorrelated, + uncertain_value, +) + +__all__ = [ + "COVERAGE_FACTORS", + "HEAVY_IMPACT_A_WEIGHTING", + "HEAVY_IMPACT_OCTAVE_BANDS", + "HEAVY_IMPACT_SOURCES", + "AWeightedMaximumImpactResult", + "AirborneInsulationResult", + "BandUncertainty", + "ExtendedImpactRatingResult", + "ExtendedWeightedRatingResult", + "FacadeInsulationResult", + "FlankingImpactLevelResult", + "FlankingLevelDifferenceResult", + "FloorCoveringImprovementResult", + "HeavyImpactSourceCheck", + "HeavyImpactSourceSpec", + "ImpactInsulationResult", + "ImpactRatingResult", + "IntensityElementNormalizedResult", + "IntensityReductionResult", + "LabAirborneInsulationResult", + "LabImpactInsulationResult", + "LabInsulationWarning", + "StandardizedMaximumImpactResult", + "StructureBornePowerResult", + "SurveyAirborneResult", + "SurveyFacadeResult", + "SurveyImpactResult", + "SurveyServiceEquipmentResult", + "UncertainValue", + "VibrationReductionResult", + "WeightedRatingResult", + "a_weighted_maximum_impact_level", + "acceleration_level", + "adaptation_term_kc", + "airborne_insulation", + "background_corrected_level", + "background_correction", + "band_mode_count", + "band_uncertainty", + "characteristic_reception_plate_power", + "check_heavy_impact_source", + "combine_subareas", + "combine_uncertainties", + "coverage_factor", + "critical_frequency", + "direction_averaged_level_difference", + "energy_average_level", + "equivalent_absorption_length", + "equivalent_blocked_force_level", + "equivalent_free_velocity_level", + "estimate_reverberation_index", + "expanded_uncertainty", + "facade_insulation", + "fast_reverberation_correction", + "heavy_impact_octave_levels", + "heavy_impact_source_limits", + "heavy_impact_source_specification", + "impact_force_exposure_level", + "impact_improvement", + "impact_improvement_adaptation_term", + "impact_insulation", + "improvement_octave_bands", + "insulation_coverage_factor", + "insulation_expanded_uncertainty", + "intensity_element_normalized_difference", + "intensity_sound_reduction", + "lab_airborne_insulation", + "lab_impact_insulation", + "maximum_repeatability_standard_deviation", + "mean_free_velocity_level", + "modal_density", + "modal_overlap_factor", + "normalized_flanking_impact_level", + "normalized_flanking_level_difference", + "plate_loss_factor", + "prediction_input_uncertainty", + "reception_plate_power", + "reduce_by_independent_measurements", + "reverberation_index", + "satisfies_lower_requirement", + "satisfies_upper_requirement", + "single_number_uncertainty", + "single_number_uncertainty_uncorrelated", + "source_mobility_from_levels", + "spatial_mean_velocity_level", + "standardized_maximum_impact_level", + "strong_coupling_satisfied", + "structure_borne_power_level", + "surface_pressure_intensity_indicator", + "survey_airborne_insulation", + "survey_facade_insulation", + "survey_impact_insulation", + "survey_service_equipment_level", + "total_loss_factor", + "uncertain_value", + "velocity_level_difference", + "vibration_reduction_index", + "vibration_reduction_index_from_flanking", + "weighted_impact_improvement", + "weighted_impact_rating", + "weighted_impact_rating_extended", + "weighted_rating", + "weighted_rating_extended", +] diff --git a/src/phonometry/building/flanking_transmission.py b/src/phonometry/building/measurement/flanking_transmission.py similarity index 98% rename from src/phonometry/building/flanking_transmission.py rename to src/phonometry/building/measurement/flanking_transmission.py index f3ac1a115..6e7b1995a 100644 --- a/src/phonometry/building/flanking_transmission.py +++ b/src/phonometry/building/measurement/flanking_transmission.py @@ -3,7 +3,7 @@ Laboratory measurement of flanking sound transmission (ISO 10848:2006/2010). This is the **measurement** counterpart of the flanking-transmission -*prediction* in :mod:`phonometry.building.building_prediction`. EN 12354-1 predicts the +*prediction* in :mod:`phonometry.building.prediction.global_model`. EN 12354-1 predicts the apparent in-situ performance from, among other inputs, the **vibration reduction index** ``Kij`` of each junction; ISO 10848 is the standard that *measures* that ``Kij`` (and the overall flanking descriptors ``Dn,f`` / @@ -90,7 +90,7 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata def _validate_report_request(engine: str, language: str) -> None: @@ -100,7 +100,7 @@ def _validate_report_request(engine: str, language: str) -> None: ``"reportlab"`` engine is supported, and the language must be one the renderers translate. """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -365,8 +365,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_vibration_reduction + from ..._i18n import check_language + from ..._plot.building import plot_vibration_reduction check_language(language) return plot_vibration_reduction(self, ax=ax, language=language, **kwargs) @@ -406,7 +406,7 @@ def report( the embedded figure (``pip install phonometry[plot]``). """ _validate_report_request(engine, language) - from .._report.iso10848 import render_vibration_reduction_report + from ..._report.iso10848 import render_vibration_reduction_report return render_vibration_reduction_report( self, path, metadata=metadata, verbose=verbose, language=language @@ -703,7 +703,7 @@ def report( "The Dn,f report needs the ISO 717-1 single-number rating; " "supply 16 one-third-octave or 5 octave bands." ) - from .._report.iso10848 import render_flanking_level_difference_report + from ..._report.iso10848 import render_flanking_level_difference_report return render_flanking_level_difference_report( self, path, metadata=metadata, verbose=verbose, language=language, @@ -779,7 +779,7 @@ def report( "The Ln,f report needs the ISO 717-2 single-number rating; " "supply 16 one-third-octave or 5 octave bands." ) - from .._report.iso10848 import render_flanking_impact_level_report + from ..._report.iso10848 import render_flanking_impact_level_report return render_flanking_impact_level_report( self, path, metadata=metadata, verbose=verbose, language=language, diff --git a/src/phonometry/building/floor_covering_improvement.py b/src/phonometry/building/measurement/floor_covering_improvement.py similarity index 98% rename from src/phonometry/building/floor_covering_improvement.py rename to src/phonometry/building/measurement/floor_covering_improvement.py index 9c6adda1b..0ea91737f 100644 --- a/src/phonometry/building/floor_covering_improvement.py +++ b/src/phonometry/building/measurement/floor_covering_improvement.py @@ -67,7 +67,7 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata __all__ = [ "FloorCoveringImprovementResult", @@ -190,8 +190,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_floor_covering_improvement + from ..._i18n import check_language + from ..._plot.building import plot_floor_covering_improvement check_language(language) return plot_floor_covering_improvement(self, ax=ax, language=language, **kwargs) @@ -245,14 +245,14 @@ def report( (``pip install phonometry[report]``), or matplotlib is missing for the embedded figure (``pip install phonometry[plot]``). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": raise ValueError( f"Unknown report engine {engine!r}; only 'reportlab' is supported." ) - from .._report.iso16251 import render_iso16251_report + from ..._report.iso16251 import render_iso16251_report return render_iso16251_report( self, path, metadata=metadata, verbose=verbose, language=language diff --git a/src/phonometry/building/heavy_impact.py b/src/phonometry/building/measurement/heavy_impact.py similarity index 98% rename from src/phonometry/building/heavy_impact.py rename to src/phonometry/building/measurement/heavy_impact.py index 640b6bbc2..cf1a0cbcd 100644 --- a/src/phonometry/building/heavy_impact.py +++ b/src/phonometry/building/measurement/heavy_impact.py @@ -105,7 +105,7 @@ import numpy as np from numpy.typing import ArrayLike -from .._internal.validation import ( +from ..._internal.validation import ( require_choice, require_finite_array, require_positive, @@ -388,8 +388,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_heavy_impact_source + from ..._i18n import check_language + from ..._plot.building import plot_heavy_impact_source check_language(language) return plot_heavy_impact_source(self, ax=ax, language=language, **kwargs) @@ -517,8 +517,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_standardized_maximum_impact + from ..._i18n import check_language + from ..._plot.building import plot_standardized_maximum_impact check_language(language) return plot_standardized_maximum_impact(self, ax=ax, language=language, **kwargs) @@ -635,8 +635,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_a_weighted_maximum_impact + from ..._i18n import check_language + from ..._plot.building import plot_a_weighted_maximum_impact check_language(language) return plot_a_weighted_maximum_impact(self, ax=ax, language=language, **kwargs) diff --git a/src/phonometry/building/insulation.py b/src/phonometry/building/measurement/insulation.py similarity index 98% rename from src/phonometry/building/insulation.py rename to src/phonometry/building/measurement/insulation.py index 22f1c0f27..39d7074a7 100644 --- a/src/phonometry/building/insulation.py +++ b/src/phonometry/building/measurement/insulation.py @@ -114,13 +114,13 @@ import numpy as np -from .._internal.levels_math import energy_mean, energy_sum -from .._internal.types import as_float_or_array +from ..._internal.levels_math import energy_mean, energy_sum +from ..._internal.types import as_float_or_array if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata # --- ISO 717-1 Table 3 reference values ---------------------------------- @@ -285,8 +285,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_airborne_insulation + from ..._i18n import check_language + from ..._plot.building import plot_airborne_insulation check_language(language) return plot_airborne_insulation(self, ax=ax, language=language, **kwargs) @@ -385,8 +385,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_weighted_rating + from ..._i18n import check_language + from ..._plot.building import plot_weighted_rating check_language(language) return plot_weighted_rating(self, ax=ax, language=language, **kwargs) @@ -473,8 +473,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_impact_insulation + from ..._i18n import check_language + from ..._plot.building import plot_impact_insulation check_language(language) return plot_impact_insulation(self, ax=ax, language=language, **kwargs) @@ -571,8 +571,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_impact_rating + from ..._i18n import check_language + from ..._plot.building import plot_impact_rating check_language(language) return plot_impact_rating(self, ax=ax, language=language, **kwargs) @@ -672,8 +672,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_facade_insulation + from ..._i18n import check_language + from ..._plot.building import plot_facade_insulation check_language(language) return plot_facade_insulation(self, ax=ax, language=language, **kwargs) @@ -751,7 +751,7 @@ def _render_iso717( built without the per-band data, then calls the reportlab renderer (which raises a clear :class:`ImportError` when reportlab is absent). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -768,7 +768,7 @@ def _render_iso717( "'shifted_reference'); build the rating with weighted_rating() or " "weighted_impact_rating() so they are populated." ) - from .._report.iso717 import render_iso717_report + from ..._report.iso717 import render_iso717_report return render_iso717_report( result, path, metadata=metadata, verbose=verbose, language=language, @@ -804,7 +804,7 @@ def _render_iso16283( evaluates that rating, and calls the reportlab renderer (which raises a clear :class:`ImportError` when reportlab is absent). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -848,7 +848,7 @@ def _render_iso16283( else: rating = weighted_rating(curve) - from .._report.iso16283 import render_iso16283_report + from ..._report.iso16283 import render_iso16283_report return render_iso16283_report( result, rating, path, quantity=quantity, metadata=metadata, @@ -879,7 +879,7 @@ def _render_iso16283_facade( defined, evaluates that rating and calls the reportlab renderer (which raises a clear :class:`ImportError` when reportlab is absent). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -907,7 +907,7 @@ def _render_iso16283_facade( ) rating = weighted_rating(curve) - from .._report.iso16283 import render_iso16283_facade_report + from ..._report.iso16283 import render_iso16283_facade_report return render_iso16283_facade_report( result, rating, path, quantity=quantity, metadata=metadata, @@ -1684,8 +1684,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_extended_weighted_rating + from ..._i18n import check_language + from ..._plot.building import plot_extended_weighted_rating check_language(language) return plot_extended_weighted_rating(self, ax=ax, language=language, **kwargs) @@ -1731,8 +1731,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_extended_impact_rating + from ..._i18n import check_language + from ..._plot.building import plot_extended_impact_rating check_language(language) return plot_extended_impact_rating(self, ax=ax, language=language, **kwargs) diff --git a/src/phonometry/building/intensity_insulation.py b/src/phonometry/building/measurement/intensity_insulation.py similarity index 98% rename from src/phonometry/building/intensity_insulation.py rename to src/phonometry/building/measurement/intensity_insulation.py index fc4c38cc0..7fe877a65 100644 --- a/src/phonometry/building/intensity_insulation.py +++ b/src/phonometry/building/measurement/intensity_insulation.py @@ -3,7 +3,7 @@ Sound insulation measured with sound intensity (ISO 15186). This is the sound-**intensity** counterpart of the sound-pressure methods in -:mod:`phonometry.building.lab_insulation` (ISO 10140) and :mod:`phonometry.building.insulation` +:mod:`phonometry.building.measurement.lab_insulation` (ISO 10140) and :mod:`phonometry.building.measurement.insulation` (ISO 16283). Instead of an equivalent absorption area in the receiving room, the transmitted sound power is measured directly by scanning an intensity probe over a measurement surface enclosing the specimen. The main use is when @@ -87,7 +87,7 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata #: Reference equivalent absorption area for the element-normalized level #: difference (ISO 15186-1:2000, Clause 3.9): 10 m². @@ -127,7 +127,7 @@ def _validate_intensity_report( the single-number ``rating`` is absent, or the band count is neither 16 nor 5. """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -269,7 +269,7 @@ def report( label="intensity", ) - from .._report.iso15186 import render_iso15186_report + from ..._report.iso15186 import render_iso15186_report return render_iso15186_report( self, rating, path, metadata=metadata, @@ -391,7 +391,7 @@ def report( label="element-normalized", ) - from .._report.iso15186 import render_iso15186_element_report + from ..._report.iso15186 import render_iso15186_element_report return render_iso15186_element_report( self, rating, path, metadata=metadata, diff --git a/src/phonometry/building/lab_insulation.py b/src/phonometry/building/measurement/lab_insulation.py similarity index 98% rename from src/phonometry/building/lab_insulation.py rename to src/phonometry/building/measurement/lab_insulation.py index c1477af41..2b8ebc47e 100644 --- a/src/phonometry/building/lab_insulation.py +++ b/src/phonometry/building/measurement/lab_insulation.py @@ -3,7 +3,7 @@ Laboratory sound insulation of building elements (ISO 10140). This is the **laboratory** counterpart of the field ISO 16283 family in -:mod:`phonometry.building.insulation`. In a qualified test facility flanking +:mod:`phonometry.building.measurement.insulation`. In a qualified test facility flanking transmission is suppressed, so the *direct* airborne sound reduction index ``R`` (not the apparent ``R'``) is the primary quantity, and the receiving room's equivalent absorption area ``A`` is a property of the known facility. @@ -56,7 +56,7 @@ import numpy as np -from .._internal.warnings import PhonometryWarning +from ..._internal.warnings import PhonometryWarning from .insulation import ( ImpactRatingResult, WeightedRatingResult, @@ -68,7 +68,7 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata #: Reference equivalent absorption area A0 for the normalized impact level #: (ISO 10140-3:2010, Clause 3.2) and the element-normalized level difference @@ -273,7 +273,7 @@ def _render_iso10140( renderer (which raises a clear :class:`ImportError` when reportlab is absent). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -289,7 +289,7 @@ def _render_iso10140( "with that band count." ) - from .._report.iso10140 import render_iso10140_report + from ..._report.iso10140 import render_iso10140_report return render_iso10140_report( result, rating, path, quantity=quantity, metadata=metadata, diff --git a/src/phonometry/building/structure_borne_power.py b/src/phonometry/building/measurement/structure_borne_power.py similarity index 98% rename from src/phonometry/building/structure_borne_power.py rename to src/phonometry/building/measurement/structure_borne_power.py index 2aa8bc12e..c931410e0 100644 --- a/src/phonometry/building/structure_borne_power.py +++ b/src/phonometry/building/measurement/structure_borne_power.py @@ -58,7 +58,7 @@ - the **equivalent free velocity level** (Formula 18, dB re ``1e-9 m/s``) from the high-mobility plate, and the **source mobility** from both (Formula 19). ``L_Wsn`` plus the mobility corrections of EN 12354-5 - Annex I (see :mod:`phonometry.building.installed_structure_borne`) close + Annex I (see :mod:`phonometry.building.prediction.installed_structure_borne`) close the EN 15657 -> EN 12354-5 chain. The source-side free velocity of ISO 9611:1996 is the direct-measurement @@ -78,11 +78,11 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata from numpy.typing import ArrayLike -from .._internal.validation import require_positive +from ..._internal.validation import require_positive from .flanking_transmission import total_loss_factor #: EN 15657 vibratory velocity reference ``v0`` (= ISO 1683 10^-9 m/s), m/s. @@ -230,8 +230,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_structure_borne_power + from ..._i18n import check_language + from ..._plot.building import plot_structure_borne_power check_language(language) return plot_structure_borne_power(self, ax=ax, language=language, **kwargs) @@ -279,14 +279,14 @@ def report( :raises ImportError: If reportlab (or, for the figure, matplotlib) is not installed (``pip install phonometry[report]``). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": raise ValueError( f"Unknown report engine {engine!r}; only 'reportlab' is supported." ) - from .._report.en15657 import render_structure_borne_power_report + from ..._report.en15657 import render_structure_borne_power_report return render_structure_borne_power_report( self, path, metadata=metadata, verbose=verbose, language=language diff --git a/src/phonometry/building/survey_insulation.py b/src/phonometry/building/measurement/survey_insulation.py similarity index 99% rename from src/phonometry/building/survey_insulation.py rename to src/phonometry/building/measurement/survey_insulation.py index 065a4c26e..af87d7f76 100644 --- a/src/phonometry/building/survey_insulation.py +++ b/src/phonometry/building/measurement/survey_insulation.py @@ -5,7 +5,7 @@ This is the **survey (control) method**: a fast, octave-band field procedure for dwellings and rooms of comparable size (up to 150 m³). It trades the -resolution of the ISO 16283 engineering method (:mod:`phonometry.building.insulation`) +resolution of the ISO 16283 engineering method (:mod:`phonometry.building.measurement.insulation`) for speed: a single hand-held integrating sound level meter swept through the room. It measures airborne and impact sound insulation between rooms, façade sound insulation, and the sound pressure level from building service equipment. @@ -86,7 +86,7 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata def _validate_report_request(engine: str, language: str) -> None: @@ -95,7 +95,7 @@ def _validate_report_request(engine: str, language: str) -> None: Shared by the survey result ``report`` methods: only the ``"reportlab"`` engine is supported, and the language must be one the renderers translate. """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -404,7 +404,7 @@ def report( "rating; supply 5 octave or 16 one-third-octave bands " "(and, for R', the 'area' and 'volume' arguments)." ) - from .._report.iso10052 import render_survey_airborne_report + from ..._report.iso10052 import render_survey_airborne_report return render_survey_airborne_report( self, rating, path, quantity=quantity, metadata=metadata, @@ -481,7 +481,7 @@ def report( "The survey impact report needs the ISO 717-2 single-number " "rating; supply 5 octave or 16 one-third-octave bands." ) - from .._report.iso10052 import render_survey_impact_report + from ..._report.iso10052 import render_survey_impact_report return render_survey_impact_report( self, self.rating, path, metadata=metadata, verbose=verbose, @@ -559,7 +559,7 @@ def report( "The survey facade report needs the ISO 717-1 single-number " "rating; supply 5 octave or 16 one-third-octave bands." ) - from .._report.iso10052 import render_survey_facade_report + from ..._report.iso10052 import render_survey_facade_report return render_survey_facade_report( self, self.rating, path, metadata=metadata, verbose=verbose, diff --git a/src/phonometry/building/building_uncertainty.py b/src/phonometry/building/measurement/uncertainty.py similarity index 98% rename from src/phonometry/building/building_uncertainty.py rename to src/phonometry/building/measurement/uncertainty.py index 0642665e9..4396db6c1 100644 --- a/src/phonometry/building/building_uncertainty.py +++ b/src/phonometry/building/measurement/uncertainty.py @@ -4,8 +4,8 @@ This module supplies the **measurement uncertainty** of the sound-insulation quantities produced by the field/lab/prediction modules -(:mod:`phonometry.building.insulation`, :mod:`phonometry.building.lab_insulation`, -:mod:`phonometry.building.building_prediction`). ISO 12999-1 does not re-measure anything; +(:mod:`phonometry.building.measurement.insulation`, :mod:`phonometry.building.measurement.lab_insulation`, +:mod:`phonometry.building.prediction.global_model`). ISO 12999-1 does not re-measure anything; it tabulates *standard uncertainties* ``u`` derived from inter-laboratory tests (ISO 5725) and prescribes how to expand and combine them. @@ -225,8 +225,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_band_uncertainty + from ..._i18n import check_language + from ..._plot.building import plot_band_uncertainty check_language(language) return plot_band_uncertainty(self, ax=ax, language=language, **kwargs) diff --git a/src/phonometry/building/prediction/__init__.py b/src/phonometry/building/prediction/__init__.py new file mode 100644 index 000000000..2a31d2778 --- /dev/null +++ b/src/phonometry/building/prediction/__init__.py @@ -0,0 +1,274 @@ +# Copyright (c) 2026. Jose Manuel Requena Plens +"""building.prediction subdomain of phonometry: prediction of insulation from element data (EN 12354 and theory).""" + +from __future__ import annotations + +from .aperture_transmission import ( + ApertureTransmissionResult, + circular_aperture_transmission_coefficient, + composite_transmission_loss, + slit_resonance_frequencies, + slit_transmission_coefficient, + transmission_loss_from_coefficient, +) +from .ceiling_plenum import ( + CEILING_ATTENUATION_CONTOUR, + CeilingAttenuationResult, + PlenumFlankingResult, + ceiling_attenuation_class, + normalized_ceiling_attenuation, + partition_referenced_reduction_index, + plenum_flanking_reduction_index, +) +from .detailed_model import ( + BandPath, + DetailedAirborneResult, + DetailedImpactResult, + HomogeneousElement, + InSituElementResult, + airborne_flanking_path, + bare_floor_impact_level, + bending_radiation_factor, + calculated_sound_reduction_index, + detailed_airborne_prediction, + detailed_impact_prediction, + direct_impact_level, + direct_reduction_index, + flanking_impact_level, + flanking_impact_level_from_flanking_level, + flanking_impact_level_from_normalized_difference, + flanking_reduction_index, + flanking_reduction_index_from_flanking_level, + flanking_reduction_index_from_normalized_difference, + floating_floor_improvement, + forced_radiation_factor, + impact_flanking_path, + in_situ_element, + in_situ_equivalent_absorption_length, + in_situ_impact_level, + in_situ_reduction_index, + in_situ_total_loss_factor, + in_situ_velocity_level_difference, + laboratory_total_loss_factor, + perimeter_absorption_coefficient, + reciprocity_impact_level, + resonant_sound_reduction_index, + structural_reverberation_time, +) +from .facade import ( + FacadeElement, + FacadePredictionResult, + RadiatedPowerResult, + facade_shape_level_difference, + facade_sound_reduction, + outdoor_attenuation, + outdoor_level, + radiated_sound_power, +) +from .global_model import ( + AirbornePredictionResult, + FlankingPath, + ImpactPredictionResult, + PathContribution, + combine_linings, + equivalent_impact_level, + flanking_element, + flanking_path, + impact_flanking_correction, + junction_min_vibration_reduction, + junction_vibration_reduction, + predicted_airborne_insulation, + predicted_impact_insulation, + standardized_impact_level, + standardized_level_difference, +) +from .installed_structure_borne import ( + REFERENCE_AREA, + InstalledSourceResult, + coupling_term, + coupling_term_force_source, + coupling_term_velocity_source, + installed_power_from_reception_plate, + installed_source_prediction, + installed_structure_borne_power_level, + structure_borne_pressure_level_path, + total_structure_borne_pressure_level, +) +from .masonry_cavity_wall import ( + WALL_TIE_STIFFNESS, + WallTieCouplingResult, + wall_tie_coupling_loss_factor, + wall_tie_stiffness, + wall_tie_stiffness_per_area, +) +from .panel_transmission import ( + PLATEAU_MATERIALS, + SoundReductionResult, + corrugated_plate_mass_factor, + corrugated_plate_stiffness, + double_wall_transmission_loss, + field_incidence_correction, + mass_law_transmission_loss, + mass_spring_mass_resonance, + orthotropic_critical_frequencies, + orthotropic_plate_resonance, + orthotropic_transmission_loss, + plateau_transmission_loss, + single_panel_transmission_loss, +) +from .resilient_layers import ( + TAPPING_DROP_HEIGHT, + TAPPING_HAMMER_MASS, + TAPPING_HAMMER_RADIUS, + TAPPING_IMPACT_RATE, + CoveringImprovementResult, + FloatingFloorImprovementResult, + LiningImprovementResult, + TappingForceResult, + combined_dynamic_stiffness, + covering_contact_stiffness, + covering_improvement, + double_floating_floor_resonances, + floating_floor_improvement_spectrum, + floating_floor_resonance_frequency, + force_pulse, + hammer_impact_velocity, + hammer_limiting_frequency, + lining_improvement, + lining_improvement_in_situ, + lining_resonance_frequency, + plate_contact_stiffness, + resilient_mount_improvement, + short_pulse_mean_square_force, + tapping_cut_off_frequency, + tapping_force_spectrum, + weighted_floating_floor_improvement, + weighted_lining_improvement, +) + +__all__ = [ + "CEILING_ATTENUATION_CONTOUR", + "PLATEAU_MATERIALS", + "REFERENCE_AREA", + "TAPPING_DROP_HEIGHT", + "TAPPING_HAMMER_MASS", + "TAPPING_HAMMER_RADIUS", + "TAPPING_IMPACT_RATE", + "WALL_TIE_STIFFNESS", + "AirbornePredictionResult", + "ApertureTransmissionResult", + "BandPath", + "CeilingAttenuationResult", + "CoveringImprovementResult", + "DetailedAirborneResult", + "DetailedImpactResult", + "FacadeElement", + "FacadePredictionResult", + "FlankingPath", + "FloatingFloorImprovementResult", + "HomogeneousElement", + "ImpactPredictionResult", + "InSituElementResult", + "InstalledSourceResult", + "LiningImprovementResult", + "PathContribution", + "PlenumFlankingResult", + "RadiatedPowerResult", + "SoundReductionResult", + "TappingForceResult", + "WallTieCouplingResult", + "airborne_flanking_path", + "bare_floor_impact_level", + "bending_radiation_factor", + "calculated_sound_reduction_index", + "ceiling_attenuation_class", + "circular_aperture_transmission_coefficient", + "combine_linings", + "combined_dynamic_stiffness", + "composite_transmission_loss", + "corrugated_plate_mass_factor", + "corrugated_plate_stiffness", + "coupling_term", + "coupling_term_force_source", + "coupling_term_velocity_source", + "covering_contact_stiffness", + "covering_improvement", + "detailed_airborne_prediction", + "detailed_impact_prediction", + "direct_impact_level", + "direct_reduction_index", + "double_floating_floor_resonances", + "double_wall_transmission_loss", + "equivalent_impact_level", + "facade_shape_level_difference", + "facade_sound_reduction", + "field_incidence_correction", + "flanking_element", + "flanking_impact_level", + "flanking_impact_level_from_flanking_level", + "flanking_impact_level_from_normalized_difference", + "flanking_path", + "flanking_reduction_index", + "flanking_reduction_index_from_flanking_level", + "flanking_reduction_index_from_normalized_difference", + "floating_floor_improvement", + "floating_floor_improvement_spectrum", + "floating_floor_resonance_frequency", + "force_pulse", + "forced_radiation_factor", + "hammer_impact_velocity", + "hammer_limiting_frequency", + "impact_flanking_correction", + "impact_flanking_path", + "in_situ_element", + "in_situ_equivalent_absorption_length", + "in_situ_impact_level", + "in_situ_reduction_index", + "in_situ_total_loss_factor", + "in_situ_velocity_level_difference", + "installed_power_from_reception_plate", + "installed_source_prediction", + "installed_structure_borne_power_level", + "junction_min_vibration_reduction", + "junction_vibration_reduction", + "laboratory_total_loss_factor", + "lining_improvement", + "lining_improvement_in_situ", + "lining_resonance_frequency", + "mass_law_transmission_loss", + "mass_spring_mass_resonance", + "normalized_ceiling_attenuation", + "orthotropic_critical_frequencies", + "orthotropic_plate_resonance", + "orthotropic_transmission_loss", + "outdoor_attenuation", + "outdoor_level", + "partition_referenced_reduction_index", + "perimeter_absorption_coefficient", + "plate_contact_stiffness", + "plateau_transmission_loss", + "plenum_flanking_reduction_index", + "predicted_airborne_insulation", + "predicted_impact_insulation", + "radiated_sound_power", + "reciprocity_impact_level", + "resilient_mount_improvement", + "resonant_sound_reduction_index", + "short_pulse_mean_square_force", + "single_panel_transmission_loss", + "slit_resonance_frequencies", + "slit_transmission_coefficient", + "standardized_impact_level", + "standardized_level_difference", + "structural_reverberation_time", + "structure_borne_pressure_level_path", + "tapping_cut_off_frequency", + "tapping_force_spectrum", + "total_structure_borne_pressure_level", + "transmission_loss_from_coefficient", + "wall_tie_coupling_loss_factor", + "wall_tie_stiffness", + "wall_tie_stiffness_per_area", + "weighted_floating_floor_improvement", + "weighted_lining_improvement", +] diff --git a/src/phonometry/building/aperture_transmission.py b/src/phonometry/building/prediction/aperture_transmission.py similarity index 97% rename from src/phonometry/building/aperture_transmission.py rename to src/phonometry/building/prediction/aperture_transmission.py index 9f6581b33..52b699f83 100644 --- a/src/phonometry/building/aperture_transmission.py +++ b/src/phonometry/building/prediction/aperture_transmission.py @@ -49,7 +49,7 @@ so a bare opening (:math:`R = 0`, :math:`\tau = 1`) of relative area :math:`S_a/S` caps the composite at :math:`10 \log_{10}(S / S_a)`. This is the same energetic combination used by the EN 12354-3/-4 facade model of -:mod:`phonometry.building.facade_prediction`. +:mod:`phonometry.building.prediction.facade`. """ from __future__ import annotations @@ -61,7 +61,7 @@ from numpy.typing import ArrayLike from scipy.special import j1, struve -from .._internal.validation import require_choice, require_positive +from ..._internal.validation import require_choice, require_positive if TYPE_CHECKING: from matplotlib.axes import Axes @@ -135,8 +135,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_aperture_transmission + from ..._i18n import check_language + from ..._plot.building import plot_aperture_transmission check_language(language) return plot_aperture_transmission(self, ax=ax, language=language, **kwargs) @@ -151,8 +151,8 @@ def plot_geometry( :raises ValueError: If the result does not retain its geometry. """ - from .._i18n import check_language - from .._plot.geometry import plot_aperture_result_geometry + from ..._i18n import check_language + from ..._plot.geometry import plot_aperture_result_geometry check_language(language) return plot_aperture_result_geometry( diff --git a/src/phonometry/building/ceiling_plenum.py b/src/phonometry/building/prediction/ceiling_plenum.py similarity index 98% rename from src/phonometry/building/ceiling_plenum.py rename to src/phonometry/building/prediction/ceiling_plenum.py index 2ee5c53ad..e34ddd1d0 100644 --- a/src/phonometry/building/ceiling_plenum.py +++ b/src/phonometry/building/prediction/ceiling_plenum.py @@ -108,7 +108,7 @@ import numpy as np from numpy.typing import ArrayLike -from .._internal.validation import ( +from ..._internal.validation import ( require_choice, require_finite_array, require_positive, @@ -259,8 +259,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_ceiling_attenuation + from ..._i18n import check_language + from ..._plot.building import plot_ceiling_attenuation check_language(language) return plot_ceiling_attenuation(self, ax=ax, language=language, **kwargs) @@ -370,8 +370,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_plenum_flanking + from ..._i18n import check_language + from ..._plot.building import plot_plenum_flanking check_language(language) return plot_plenum_flanking(self, ax=ax, language=language, **kwargs) diff --git a/src/phonometry/building/detailed_prediction.py b/src/phonometry/building/prediction/detailed_model.py similarity index 98% rename from src/phonometry/building/detailed_prediction.py rename to src/phonometry/building/prediction/detailed_model.py index 33ecf7e19..914b2dacb 100644 --- a/src/phonometry/building/detailed_prediction.py +++ b/src/phonometry/building/prediction/detailed_model.py @@ -4,7 +4,7 @@ This is the **detailed model** of the building-prediction chain, the per-band counterpart of the simplified single-number model implemented in -:mod:`phonometry.building.building_prediction`. Where the simplified model +:mod:`phonometry.building.prediction.global_model`. Where the simplified model combines the weighted ratings of the elements (``Rw``, ``ΔRw``, ``Kij``) into a single ``R'w`` / ``L'n,w``, the detailed model carries every quantity through the one-third-octave (or octave) bands, converts the laboratory element data to @@ -102,7 +102,7 @@ import numpy as np from numpy.typing import ArrayLike -from .._internal.validation import ( +from ..._internal.validation import ( require_choice, require_positive, require_positive_array, @@ -111,8 +111,8 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata - from .insulation import ImpactRatingResult, WeightedRatingResult + from ..._report.metadata import ReportMetadata + from ..measurement.insulation import ImpactRatingResult, WeightedRatingResult #: Speed of sound in air ``co`` used throughout EN/ISO 12354 (Annex A): 340 m/s. SPEED_OF_SOUND: float = 340.0 @@ -226,7 +226,7 @@ def _rating_slice( def _check_report_request(engine: str, language: str) -> None: """Reject an unknown engine or language before a fiche is rendered.""" - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -767,7 +767,7 @@ def in_situ_equivalent_absorption_length( :raises ValueError: If an input is not positive/finite or the band counts disagree. """ - from .flanking_transmission import equivalent_absorption_length + from ..measurement.flanking_transmission import equivalent_absorption_length f = require_positive_array(frequencies, "frequencies") ts = _band_array( @@ -1329,8 +1329,8 @@ def plot( Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_in_situ_element + from ..._i18n import check_language + from ..._plot.building import plot_in_situ_element check_language(language) return plot_in_situ_element(self, ax=ax, language=language, **kwargs) @@ -1587,8 +1587,8 @@ def plot( Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_detailed_airborne_prediction + from ..._i18n import check_language + from ..._plot.building import plot_detailed_airborne_prediction check_language(language) return plot_detailed_airborne_prediction( @@ -1625,7 +1625,7 @@ def report( :raises ImportError: If reportlab or matplotlib is missing. """ _check_report_request(engine, language) - from .._report.iso12354 import render_iso12354_detailed_airborne_report + from ..._report.iso12354 import render_iso12354_detailed_airborne_report return render_iso12354_detailed_airborne_report( self, path, metadata=metadata, verbose=verbose, language=language @@ -1665,8 +1665,8 @@ def plot( Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_detailed_impact_prediction + from ..._i18n import check_language + from ..._plot.building import plot_detailed_impact_prediction check_language(language) return plot_detailed_impact_prediction( @@ -1701,7 +1701,7 @@ def report( :raises ImportError: If reportlab or matplotlib is missing. """ _check_report_request(engine, language) - from .._report.iso12354 import render_iso12354_detailed_impact_report + from ..._report.iso12354 import render_iso12354_detailed_impact_report return render_iso12354_detailed_impact_report( self, path, metadata=metadata, verbose=verbose, language=language @@ -1737,7 +1737,7 @@ def detailed_airborne_prediction( :return: The :class:`DetailedAirborneResult`. :raises ValueError: If a path does not match the band count. """ - from .insulation import weighted_rating + from ..measurement.insulation import weighted_rating f = require_positive_array(frequencies, "frequencies") direct = BandPath( @@ -1790,7 +1790,7 @@ def detailed_impact_prediction( :raises ValueError: If a path does not match the band count, or if neither a direct level nor any flanking path is given. """ - from .insulation import weighted_impact_rating + from ..measurement.insulation import weighted_impact_rating f = require_positive_array(frequencies, "frequencies") if direct_level is None and not flanking_paths: diff --git a/src/phonometry/building/facade_prediction.py b/src/phonometry/building/prediction/facade.py similarity index 97% rename from src/phonometry/building/facade_prediction.py rename to src/phonometry/building/prediction/facade.py index 0a53aab78..231771f76 100644 --- a/src/phonometry/building/facade_prediction.py +++ b/src/phonometry/building/prediction/facade.py @@ -75,7 +75,7 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata #: Reference absorption area ``A₀`` (Formulas 8, 14), in m². _A0 = 10.0 @@ -197,8 +197,8 @@ class FacadePredictionResult: def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) -> Axes: """Plot the per-element partial indices and the façade ``R'`` / ``D2m,nT``.""" - from .._i18n import check_language - from .._plot.building import plot_facade_prediction + from ..._i18n import check_language + from ..._plot.building import plot_facade_prediction check_language(language) return plot_facade_prediction(self, ax=ax, language=language, **kwargs) @@ -213,8 +213,8 @@ def plot_geometry( :raises ValueError: If the result does not retain its geometry. """ - from .._i18n import check_language - from .._plot.geometry import plot_facade_result_geometry + from ..._i18n import check_language + from ..._plot.geometry import plot_facade_result_geometry check_language(language) return plot_facade_result_geometry(self, ax=ax, language=language, **kwargs) @@ -266,7 +266,7 @@ def report( (``pip install phonometry[report]``), or matplotlib is missing for the embedded figure (``pip install phonometry[plot]``). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -274,7 +274,7 @@ def report( f"Unknown report engine {engine!r}; only 'reportlab' is " "supported." ) - from .._report.iso12354 import render_iso12354_facade_report + from ..._report.iso12354 import render_iso12354_facade_report return render_iso12354_facade_report( self, path, metadata=metadata, verbose=verbose, language=language @@ -302,8 +302,8 @@ class RadiatedPowerResult: def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) -> Axes: """Plot the radiated sound power level ``LW`` per band.""" - from .._i18n import check_language - from .._plot.building import plot_radiated_power + from ..._i18n import check_language + from ..._plot.building import plot_radiated_power check_language(language) return plot_radiated_power(self, ax=ax, language=language, **kwargs) @@ -342,7 +342,7 @@ def _apparent_reduction(elements: Sequence[FacadeElement], total_area: float) -> def _single_number(values: np.ndarray, bands: str | None) -> tuple[int, int] | None: """(rating, Ctr) via ISO 717-1 for 5 octave or 16 third-octave bands.""" - from .insulation import weighted_rating + from ..measurement.insulation import weighted_rating if values.size not in (5, 16): return None diff --git a/src/phonometry/building/building_prediction.py b/src/phonometry/building/prediction/global_model.py similarity index 98% rename from src/phonometry/building/building_prediction.py rename to src/phonometry/building/prediction/global_model.py index eda8d4281..5b4aac476 100644 --- a/src/phonometry/building/building_prediction.py +++ b/src/phonometry/building/prediction/global_model.py @@ -3,8 +3,8 @@ Building acoustic performance prediction (EN 12354-1/-2:2000). This is the **prediction** counterpart of the measurement modules -(:mod:`phonometry.building.lab_insulation` for laboratory ``R``/``Ln`` and -:mod:`phonometry.building.insulation` for field ``R'``/``L'n``). EN 12354 estimates the +(:mod:`phonometry.building.measurement.lab_insulation` for laboratory ``R``/``Ln`` and +:mod:`phonometry.building.measurement.insulation` for field ``R'``/``L'n``). EN 12354 estimates the *in-situ* apparent performance of a building from the laboratory performance of its elements, adding the flanking transmission that a field measurement would capture but a laboratory measurement suppresses. @@ -65,7 +65,7 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata #: Reference coupling length ``l0`` in Formula (28a), in metres (Clause 4.4.1). _L0 = 1.0 @@ -193,8 +193,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_airborne_prediction + from ..._i18n import check_language + from ..._plot.building import plot_airborne_prediction check_language(language) return plot_airborne_prediction(self, ax=ax, language=language, **kwargs) @@ -245,7 +245,7 @@ def report( (``pip install phonometry[report]``), or matplotlib is missing for the embedded figure (``pip install phonometry[plot]``). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -253,7 +253,7 @@ def report( f"Unknown report engine {engine!r}; only 'reportlab' is " "supported." ) - from .._report.iso12354 import render_iso12354_airborne_report + from ..._report.iso12354 import render_iso12354_airborne_report return render_iso12354_airborne_report( self, path, metadata=metadata, verbose=verbose, language=language @@ -282,8 +282,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_impact_prediction + from ..._i18n import check_language + from ..._plot.building import plot_impact_prediction check_language(language) return plot_impact_prediction(self, ax=ax, language=language, **kwargs) @@ -336,7 +336,7 @@ def report( (``pip install phonometry[report]``), or matplotlib is missing for the embedded figure (``pip install phonometry[plot]``). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": @@ -344,7 +344,7 @@ def report( f"Unknown report engine {engine!r}; only 'reportlab' is " "supported." ) - from .._report.iso12354 import render_iso12354_impact_report + from ..._report.iso12354 import render_iso12354_impact_report return render_iso12354_impact_report( self, path, metadata=metadata, verbose=verbose, language=language diff --git a/src/phonometry/building/installed_structure_borne.py b/src/phonometry/building/prediction/installed_structure_borne.py similarity index 97% rename from src/phonometry/building/installed_structure_borne.py rename to src/phonometry/building/prediction/installed_structure_borne.py index 794d5144c..b8a0cf4ef 100644 --- a/src/phonometry/building/installed_structure_borne.py +++ b/src/phonometry/building/prediction/installed_structure_borne.py @@ -10,7 +10,7 @@ ``L_Ws,c``. It is **not** the raw reception-plate power of EN 15657 Formula (14): that plate-injected level must first be converted to the plate-independent ``L_Ws,n`` (EN 15657 Formulae (15)/(17); see - :mod:`phonometry.building.structure_borne_power`) and then referred to the + :mod:`phonometry.building.measurement.structure_borne_power`) and then referred to the actual receiver with the Annex I mobility correction (:func:`installed_power_from_reception_plate`), :math:`L_{Ws,inst,i} = L_{Ws,n} + 10 \log_{10}( Y_{\infty,i} / Y_{\infty,rec} )` @@ -58,11 +58,11 @@ if TYPE_CHECKING: from matplotlib.axes import Axes - from .._report.metadata import ReportMetadata + from ..._report.metadata import ReportMetadata from numpy.typing import ArrayLike -from .._internal.validation import require_positive +from ..._internal.validation import require_positive #: Reference area ``S0 = A0`` of EN 12354-5 (Formula 18a), m^2. REFERENCE_AREA: float = 10.0 @@ -327,8 +327,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_installed_structure_borne + from ..._i18n import check_language + from ..._plot.building import plot_installed_structure_borne check_language(language) return plot_installed_structure_borne(self, ax=ax, language=language, **kwargs) @@ -375,14 +375,14 @@ def report( :raises ImportError: If reportlab (or, for the figure, matplotlib) is not installed (``pip install phonometry[report]``). """ - from .._i18n import check_language + from ..._i18n import check_language check_language(language) if engine != "reportlab": raise ValueError( f"Unknown report engine {engine!r}; only 'reportlab' is supported." ) - from .._report.en12354_5 import render_installed_structure_borne_report + from ..._report.en12354_5 import render_installed_structure_borne_report return render_installed_structure_borne_report( self, path, metadata=metadata, verbose=verbose, language=language diff --git a/src/phonometry/building/masonry_cavity_wall.py b/src/phonometry/building/prediction/masonry_cavity_wall.py similarity index 97% rename from src/phonometry/building/masonry_cavity_wall.py rename to src/phonometry/building/prediction/masonry_cavity_wall.py index 09af5c0b2..df504077c 100644 --- a/src/phonometry/building/masonry_cavity_wall.py +++ b/src/phonometry/building/prediction/masonry_cavity_wall.py @@ -84,8 +84,8 @@ import numpy as np from numpy.typing import ArrayLike -from .._internal.validation import require_finite_array, require_positive -from ..vibration.structural.point_mobility import infinite_plate_mobility +from ..._internal.validation import require_finite_array, require_positive +from ...vibration.structural.point_mobility import infinite_plate_mobility if TYPE_CHECKING: from matplotlib.axes import Axes @@ -196,8 +196,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_wall_tie_coupling + from ..._i18n import check_language + from ..._plot.building import plot_wall_tie_coupling check_language(language) return plot_wall_tie_coupling(self, ax=ax, language=language, **kwargs) diff --git a/src/phonometry/building/panel_transmission.py b/src/phonometry/building/prediction/panel_transmission.py similarity index 98% rename from src/phonometry/building/panel_transmission.py rename to src/phonometry/building/prediction/panel_transmission.py index 187937302..34b16cde1 100644 --- a/src/phonometry/building/panel_transmission.py +++ b/src/phonometry/building/prediction/panel_transmission.py @@ -3,7 +3,7 @@ Predicted airborne sound reduction index of panels (Bies, Hansen & Howard 2017, Engineering Noise Control 5e, Section 7.2; Sharp 1973). -Where EN 12354-1 (:mod:`phonometry.building.building_prediction`) takes the +Where EN 12354-1 (:mod:`phonometry.building.prediction.global_model`) takes the element sound reduction index ``R`` as a *measured* input, this module **predicts** ``R(f)`` from the physical properties of the construction: the mass per unit area, bending stiffness (through the coincidence frequency) and loss @@ -95,18 +95,18 @@ from scipy.integrate import quad from scipy.special import ellipe -from .._internal.validation import ( +from ..._internal.validation import ( require_choice, require_non_negative, require_positive, ) -from ..vibration.structural.radiation_efficiency import coincidence_frequency +from ...vibration.structural.radiation_efficiency import coincidence_frequency if TYPE_CHECKING: from matplotlib.axes import Axes - from ..materials.porous_absorber import PorousMediumResult - from .insulation import WeightedRatingResult + from ...materials.porous_absorber import PorousMediumResult + from ..measurement.insulation import WeightedRatingResult #: Default speed of sound in air ``c0``, m/s (20 degC). _SPEED_OF_SOUND: float = 343.0 @@ -286,9 +286,9 @@ def rating(self, bands: str | None = None) -> WeightedRatingResult: 3150 Hz) or the 5 octave bands (125 Hz to 2000 Hz). :param bands: Band set forwarded to :func:`phonometry.weighted_rating`. - :return: The :class:`~phonometry.building.insulation.WeightedRatingResult`. + :return: The :class:`~phonometry.building.measurement.insulation.WeightedRatingResult`. """ - from .insulation import weighted_rating + from ..measurement.insulation import weighted_rating return weighted_rating(self.transmission_loss, bands) @@ -296,14 +296,14 @@ def report(self, path: str, **kwargs: Any) -> str: """Render the ISO 717-1 Annex C rating fiche of ``R(f)`` to a PDF. Convenience wrapper delegating to - :meth:`~phonometry.building.insulation.WeightedRatingResult.report` + :meth:`~phonometry.building.measurement.insulation.WeightedRatingResult.report` on :meth:`rating`; requires the predicted spectrum to be on the 16 one-third-octave bands (100 Hz to 3150 Hz) or the 5 octave bands (125 Hz to 2000 Hz). :param path: Destination path of the PDF file. :param kwargs: Forwarded to - :meth:`~phonometry.building.insulation.WeightedRatingResult.report` + :meth:`~phonometry.building.measurement.insulation.WeightedRatingResult.report` (e.g. ``engine``). :return: The written ``path`` as a :class:`str`. """ @@ -315,8 +315,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_sound_reduction + from ..._i18n import check_language + from ..._plot.building import plot_sound_reduction check_language(language) return plot_sound_reduction(self, ax=ax, language=language, **kwargs) @@ -331,8 +331,8 @@ def plot_geometry( :raises ValueError: If the result does not retain its geometry. """ - from .._i18n import check_language - from .._plot.geometry import plot_double_wall_result_geometry + from ..._i18n import check_language + from ..._plot.geometry import plot_double_wall_result_geometry check_language(language) return plot_double_wall_result_geometry(self, ax=ax, language=language, **kwargs) diff --git a/src/phonometry/building/resilient_layers.py b/src/phonometry/building/prediction/resilient_layers.py similarity index 99% rename from src/phonometry/building/resilient_layers.py rename to src/phonometry/building/prediction/resilient_layers.py index 997d4d811..5164c3f6d 100644 --- a/src/phonometry/building/resilient_layers.py +++ b/src/phonometry/building/prediction/resilient_layers.py @@ -3,7 +3,7 @@ Prediction of resilient-layer performance: tapping force, coverings, floors, linings. The measurement modules of this domain report what a resilient layer *achieved* -(:mod:`phonometry.building.floor_covering_improvement` for the ISO 16251-1 +(:mod:`phonometry.building.measurement.floor_covering_improvement` for the ISO 16251-1 mock-up, :mod:`phonometry.materials.dynamic_stiffness` for the EN 29052-1 dynamic stiffness). This module is their **prediction** counterpart: it walks the physical chain from the material data to the improvement spectrum, so a @@ -85,7 +85,7 @@ import numpy as np from numpy.typing import ArrayLike -from .._internal.validation import ( +from ..._internal.validation import ( require_choice, require_positive, require_positive_array, @@ -562,8 +562,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_tapping_force + from ..._i18n import check_language + from ..._plot.building import plot_tapping_force check_language(language) return plot_tapping_force(self, ax=ax, language=language, **kwargs) @@ -700,8 +700,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_covering_improvement + from ..._i18n import check_language + from ..._plot.building import plot_covering_improvement check_language(language) return plot_covering_improvement(self, ax=ax, language=language, **kwargs) @@ -973,8 +973,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_floating_floor_improvement + from ..._i18n import check_language + from ..._plot.building import plot_floating_floor_improvement check_language(language) return plot_floating_floor_improvement(self, ax=ax, language=language, **kwargs) @@ -1321,8 +1321,8 @@ def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) - Requires matplotlib (``pip install phonometry[plot]``); returns the :class:`~matplotlib.axes.Axes`. """ - from .._i18n import check_language - from .._plot.building import plot_lining_improvement + from ..._i18n import check_language + from ..._plot.building import plot_lining_improvement check_language(language) return plot_lining_improvement(self, ax=ax, language=language, **kwargs) diff --git a/src/phonometry/building/regulation/__init__.py b/src/phonometry/building/regulation/__init__.py new file mode 100644 index 000000000..70f6ff21f --- /dev/null +++ b/src/phonometry/building/regulation/__init__.py @@ -0,0 +1,50 @@ +# Copyright (c) 2026. Jose Manuel Requena Plens +"""building.regulation subdomain of phonometry: national building codes.""" + +from __future__ import annotations + +from .spain import ( + DB_HR_FREQUENCIES, + DB_HR_NORMALISED_SPECTRA, + DbHrAssessment, + DbHrCheck, + DbHrGlobalIndexResult, + DbHrRequirement, + assess_db_hr, + check_db_hr_requirement, + d2m_nt_a, + d2m_nt_atr, + db_hr_airborne_requirement, + db_hr_facade_requirement, + db_hr_global_index, + db_hr_impact_requirement, + db_hr_party_wall_requirement, + db_hr_reverberation_requirement, + dnt_a, + ra, + ra_tr, + window_size_correction, +) + +__all__ = [ + "DB_HR_FREQUENCIES", + "DB_HR_NORMALISED_SPECTRA", + "DbHrAssessment", + "DbHrCheck", + "DbHrGlobalIndexResult", + "DbHrRequirement", + "assess_db_hr", + "check_db_hr_requirement", + "d2m_nt_a", + "d2m_nt_atr", + "db_hr_airborne_requirement", + "db_hr_facade_requirement", + "db_hr_global_index", + "db_hr_impact_requirement", + "db_hr_party_wall_requirement", + "db_hr_reverberation_requirement", + "dnt_a", + "ra", + "ra_tr", + "window_size_correction", +] diff --git a/src/phonometry/building/spanish_building_code.py b/src/phonometry/building/regulation/spain.py similarity index 99% rename from src/phonometry/building/spanish_building_code.py rename to src/phonometry/building/regulation/spain.py index 0855160bc..8219e3293 100644 --- a/src/phonometry/building/spanish_building_code.py +++ b/src/phonometry/building/regulation/spain.py @@ -49,7 +49,7 @@ (Aviles Lopez & Perera Martin, note to expressions [7.15] and [7.16]). The library keeps both routes: this module implements the direct Formula (A.5)-(A.7) route, which is the normative one for DB-HR, and -:func:`~phonometry.building.insulation.weighted_rating_extended` supplies the +:func:`~phonometry.building.measurement.insulation.weighted_rating_extended` supplies the ISO 717-1 route with the enlarged-range adaptation terms. **Rounding.** DB-HR 3.1.3.1 point 4 requires the final values of the @@ -284,8 +284,8 @@ class DbHrGlobalIndexResult: def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) -> Axes: """Plot the band insulation with the weighted per-band contributions.""" - from .._i18n import check_language - from .._plot.building import plot_db_hr_global_index + from ..._i18n import check_language + from ..._plot.building import plot_db_hr_global_index return plot_db_hr_global_index( self, ax=ax, language=check_language(language), **kwargs @@ -606,8 +606,8 @@ def complies(self) -> bool: def plot(self, ax: Axes | None = None, *, language: str = "en", **kwargs: Any) -> Axes: """Plot the achieved values against their DB-HR limits.""" - from .._i18n import check_language - from .._plot.building import plot_db_hr_assessment + from ..._i18n import check_language + from ..._plot.building import plot_db_hr_assessment return plot_db_hr_assessment( self, ax=ax, language=check_language(language), **kwargs diff --git a/src/phonometry/materials/absorption_uncertainty.py b/src/phonometry/materials/absorption_uncertainty.py index ebcf30605..8246dbc86 100644 --- a/src/phonometry/materials/absorption_uncertainty.py +++ b/src/phonometry/materials/absorption_uncertainty.py @@ -2,7 +2,7 @@ r""" Measurement uncertainty for sound absorption (ISO 12999-2:2020). -Companion of the sound-insulation uncertainty of :mod:`phonometry.building.building_uncertainty` +Companion of the sound-insulation uncertainty of :mod:`phonometry.building.measurement.uncertainty` (ISO 12999-1). This part gives the standard uncertainty ``u`` of the quantities produced by a reverberation-room absorption measurement and its ratings: diff --git a/src/phonometry/materials/dynamic_stiffness.py b/src/phonometry/materials/dynamic_stiffness.py index c4f0e3ac3..9c1be6306 100644 --- a/src/phonometry/materials/dynamic_stiffness.py +++ b/src/phonometry/materials/dynamic_stiffness.py @@ -58,8 +58,8 @@ This module is the resilient-layer characterisation feeding the floating-floor term of the EN 12354-2 impact model -(:mod:`phonometry.building.building_prediction`). It does **not** feed -ISO 16251-1 (:mod:`phonometry.building.floor_covering_improvement`), whose +(:mod:`phonometry.building.prediction.global_model`). It does **not** feed +ISO 16251-1 (:mod:`phonometry.building.measurement.floor_covering_improvement`), whose scope is limited to soft, locally-reacting floor coverings; floating floors are explicitly excluded there. """ diff --git a/src/phonometry/noise_control/room_to_room.py b/src/phonometry/noise_control/room_to_room.py index 65590bca6..37d6ce570 100644 --- a/src/phonometry/noise_control/room_to_room.py +++ b/src/phonometry/noise_control/room_to_room.py @@ -10,7 +10,7 @@ the library: the reverberant level the machine builds up in the source room (:func:`phonometry.room.steady_state_spl` over the room constant of :func:`phonometry.room.room_constant`), the transmission loss of the partition -(measured, or predicted by :mod:`phonometry.building.panel_transmission`), the +(measured, or predicted by :mod:`phonometry.building.prediction.panel_transmission`), the absorption of the receiving room (:func:`phonometry.room.equivalent_absorption_area`) and the rating of what arrives (:func:`phonometry.room.noise_criterion`). What this module adds is the @@ -332,7 +332,7 @@ def room_to_room_transmission( :param frequencies: Octave-band centre frequencies, Hz (1-D array). :param transmission_loss: Transmission loss of the partition ``TL``, dB; a scalar or one value per band. Measured, tabulated, or predicted by - :mod:`phonometry.building.panel_transmission`. + :mod:`phonometry.building.prediction.panel_transmission`. :param partition_area: Area of the partition between the rooms ``S_w``, m2. :param receiving_absorption: Equivalent absorption area of the receiving room ``S_2 alpha_2`` per band, m2; e.g. from diff --git a/src/phonometry/vibration/structural/experimental_sea.py b/src/phonometry/vibration/structural/experimental_sea.py index 738118622..749ff8b43 100644 --- a/src/phonometry/vibration/structural/experimental_sea.py +++ b/src/phonometry/vibration/structural/experimental_sea.py @@ -67,7 +67,7 @@ Eqs. 6.23-6.29. The flat-plate expression :math:`n(f) = S \sqrt{12} / (2 c_L t)` is the same quantity as EN 12354-4's :math:`n = \pi S f_c / c_0^2` -(:func:`~phonometry.building.flanking_transmission.modal_density`), only +(:func:`~phonometry.building.measurement.flanking_transmission.modal_density`), only parametrised by the plate itself rather than by its critical frequency; the two agree identically and a regression test pins that. """ diff --git a/src/phonometry/vibration/structural/radiation_efficiency.py b/src/phonometry/vibration/structural/radiation_efficiency.py index e059023e7..f4f1e8e9a 100644 --- a/src/phonometry/vibration/structural/radiation_efficiency.py +++ b/src/phonometry/vibration/structural/radiation_efficiency.py @@ -17,7 +17,7 @@ coincidence (critical) frequency, closing the ISO 7849 chain without a power measurement, and it supplies the *resonant* transmission path of the single- and double-leaf sound-reduction-index predictions in -:mod:`phonometry.building.panel_transmission`. +:mod:`phonometry.building.prediction.panel_transmission`. **Coincidence (critical) frequency (Hopkins Eq. 2.201).** Below it the free bending wavelength is shorter than the acoustic wavelength, so the plate diff --git a/tests/building/test_building_uncertainty.py b/tests/building/measurement/test_building_uncertainty.py similarity index 98% rename from tests/building/test_building_uncertainty.py rename to tests/building/measurement/test_building_uncertainty.py index 58ccbaf98..abb4f81f9 100644 --- a/tests/building/test_building_uncertainty.py +++ b/tests/building/measurement/test_building_uncertainty.py @@ -13,7 +13,7 @@ import numpy as np import pytest -from phonometry.building.building_uncertainty import ( +from phonometry.building.measurement.uncertainty import ( UncertainValue, band_uncertainty, combine_uncertainties, @@ -259,7 +259,7 @@ def test_coverage_factor_unknown_confidence(): def test_coverage_factors_table_is_public(): import phonometry - from phonometry.building.building_uncertainty import COVERAGE_FACTORS + from phonometry.building.measurement.uncertainty import COVERAGE_FACTORS assert phonometry.COVERAGE_FACTORS is COVERAGE_FACTORS # Keyed by (confidence, one_sided); matches the functional lookup. @@ -268,7 +268,7 @@ def test_coverage_factors_table_is_public(): def test_coverage_factors_table_is_read_only(): - from phonometry.building.building_uncertainty import COVERAGE_FACTORS + from phonometry.building.measurement.uncertainty import COVERAGE_FACTORS with pytest.raises(TypeError): COVERAGE_FACTORS[(0.95, False)] = 9.9 # type: ignore[index] @@ -418,7 +418,7 @@ def test_prediction_input_rejects_bad_n(): def test_deprecated_bare_names_warn_and_delegate(): # The bare names shadowed the GUM pair at the package root; they now warn # and delegate to the insulation_* canonical functions. - import phonometry.building.building_uncertainty as bu + import phonometry.building.measurement.uncertainty as bu with pytest.warns(DeprecationWarning, match="insulation_coverage_factor"): assert bu.coverage_factor(0.95) == insulation_coverage_factor(0.95) @@ -435,7 +435,7 @@ def test_annex_b_uncorrelated_single_number_uncertainties() -> None: and u(Rw+Ctr,50-5000) = 0,8 dB.""" import reference_data as ref - from phonometry.building.insulation import ( + from phonometry.building.measurement.insulation import ( _SPECTRUM1_50_5000, _SPECTRUM2_50_5000, ) @@ -476,7 +476,7 @@ def test_annex_b_correlated_adaptation_sum_uncertainties() -> None: u(Rw+Ctr,50-5000) = 2,6 dB (unrounded 2,05 / 2,63).""" import reference_data as ref - from phonometry.building.insulation import ( + from phonometry.building.measurement.insulation import ( _SPECTRUM1_50_5000, _SPECTRUM2_50_5000, ) diff --git a/tests/building/test_facade_field_report.py b/tests/building/measurement/test_facade_field_report.py similarity index 100% rename from tests/building/test_facade_field_report.py rename to tests/building/measurement/test_facade_field_report.py diff --git a/tests/building/test_facade_insulation.py b/tests/building/measurement/test_facade_insulation.py similarity index 100% rename from tests/building/test_facade_insulation.py rename to tests/building/measurement/test_facade_insulation.py diff --git a/tests/building/test_flanking_transmission.py b/tests/building/measurement/test_flanking_transmission.py similarity index 100% rename from tests/building/test_flanking_transmission.py rename to tests/building/measurement/test_flanking_transmission.py diff --git a/tests/building/test_flanking_transmission_report.py b/tests/building/measurement/test_flanking_transmission_report.py similarity index 100% rename from tests/building/test_flanking_transmission_report.py rename to tests/building/measurement/test_flanking_transmission_report.py diff --git a/tests/building/test_floor_covering_improvement.py b/tests/building/measurement/test_floor_covering_improvement.py similarity index 100% rename from tests/building/test_floor_covering_improvement.py rename to tests/building/measurement/test_floor_covering_improvement.py diff --git a/tests/building/test_heavy_impact.py b/tests/building/measurement/test_heavy_impact.py similarity index 99% rename from tests/building/test_heavy_impact.py rename to tests/building/measurement/test_heavy_impact.py index 6ef05f3d2..c1df8ef5a 100644 --- a/tests/building/test_heavy_impact.py +++ b/tests/building/measurement/test_heavy_impact.py @@ -440,7 +440,7 @@ def test_annex_d_rounding_is_half_up(value: float, expected: int) -> None: formula's own note warns that a rounding slip here costs a whole decibel in the reported single number. """ - from phonometry.building.heavy_impact import _round_half_up + from phonometry.building.measurement.heavy_impact import _round_half_up assert _round_half_up(value) == expected diff --git a/tests/building/test_insulation.py b/tests/building/measurement/test_insulation.py similarity index 100% rename from tests/building/test_insulation.py rename to tests/building/measurement/test_insulation.py diff --git a/tests/building/test_intensity_insulation.py b/tests/building/measurement/test_intensity_insulation.py similarity index 100% rename from tests/building/test_intensity_insulation.py rename to tests/building/measurement/test_intensity_insulation.py diff --git a/tests/building/test_iso10140_report.py b/tests/building/measurement/test_iso10140_report.py similarity index 100% rename from tests/building/test_iso10140_report.py rename to tests/building/measurement/test_iso10140_report.py diff --git a/tests/building/test_iso15186_element_report.py b/tests/building/measurement/test_iso15186_element_report.py similarity index 99% rename from tests/building/test_iso15186_element_report.py rename to tests/building/measurement/test_iso15186_element_report.py index bd6c3a52a..550147013 100644 --- a/tests/building/test_iso15186_element_report.py +++ b/tests/building/measurement/test_iso15186_element_report.py @@ -27,7 +27,7 @@ ReportMetadata, intensity_element_normalized_difference, ) -from phonometry.building.intensity_insulation import ( +from phonometry.building.measurement.intensity_insulation import ( IntensityElementNormalizedResult, ) diff --git a/tests/building/test_iso15186_report.py b/tests/building/measurement/test_iso15186_report.py similarity index 99% rename from tests/building/test_iso15186_report.py rename to tests/building/measurement/test_iso15186_report.py index ae1e9710e..788de3b5f 100644 --- a/tests/building/test_iso15186_report.py +++ b/tests/building/measurement/test_iso15186_report.py @@ -28,7 +28,7 @@ adaptation_term_kc, intensity_sound_reduction, ) -from phonometry.building.intensity_insulation import ( +from phonometry.building.measurement.intensity_insulation import ( IntensityReductionResult, ) diff --git a/tests/building/test_iso16251_report.py b/tests/building/measurement/test_iso16251_report.py similarity index 99% rename from tests/building/test_iso16251_report.py rename to tests/building/measurement/test_iso16251_report.py index c5f825d3f..ed79c50ec 100644 --- a/tests/building/test_iso16251_report.py +++ b/tests/building/measurement/test_iso16251_report.py @@ -188,7 +188,7 @@ def test_unlimited_result_not_qualified_as_lower_bound(tmp_path) -> None: def test_manual_result_without_ci_delta_omits_adaptation_term(tmp_path) -> None: """A hand-built result lacking CI,delta must not print a fabricated (+0).""" - from phonometry.building.floor_covering_improvement import ( + from phonometry.building.measurement.floor_covering_improvement import ( FloorCoveringImprovementResult, ) diff --git a/tests/building/test_iso16283_report.py b/tests/building/measurement/test_iso16283_report.py similarity index 100% rename from tests/building/test_iso16283_report.py rename to tests/building/measurement/test_iso16283_report.py diff --git a/tests/building/test_iso717_report.py b/tests/building/measurement/test_iso717_report.py similarity index 100% rename from tests/building/test_iso717_report.py rename to tests/building/measurement/test_iso717_report.py diff --git a/tests/building/test_lab_insulation.py b/tests/building/measurement/test_lab_insulation.py similarity index 99% rename from tests/building/test_lab_insulation.py rename to tests/building/measurement/test_lab_insulation.py index 612b0cdef..6b326dbde 100644 --- a/tests/building/test_lab_insulation.py +++ b/tests/building/measurement/test_lab_insulation.py @@ -32,7 +32,7 @@ weighted_impact_rating, weighted_rating, ) -from phonometry.building.lab_insulation import LabInsulationWarning +from phonometry.building.measurement.lab_insulation import LabInsulationWarning # ISO 717-1 Table 3 airborne reference (100-3150 Hz, 16 bands). _REF_AIRBORNE = np.array( diff --git a/tests/building/test_structure_borne_power.py b/tests/building/measurement/test_structure_borne_power.py similarity index 99% rename from tests/building/test_structure_borne_power.py rename to tests/building/measurement/test_structure_borne_power.py index fa979b80f..ef77258e7 100644 --- a/tests/building/test_structure_borne_power.py +++ b/tests/building/measurement/test_structure_borne_power.py @@ -270,7 +270,7 @@ def test_iso9611_mean_free_velocity_level() -> None: import reference_data as ref from phonometry import mean_free_velocity_level - from phonometry.building.structure_borne_power import ( + from phonometry.building.measurement.structure_borne_power import ( FREE_VELOCITY_REFERENCE, ) diff --git a/tests/building/test_structure_borne_power_report.py b/tests/building/measurement/test_structure_borne_power_report.py similarity index 100% rename from tests/building/test_structure_borne_power_report.py rename to tests/building/measurement/test_structure_borne_power_report.py diff --git a/tests/building/test_survey_insulation.py b/tests/building/measurement/test_survey_insulation.py similarity index 100% rename from tests/building/test_survey_insulation.py rename to tests/building/measurement/test_survey_insulation.py diff --git a/tests/building/test_survey_insulation_report.py b/tests/building/measurement/test_survey_insulation_report.py similarity index 100% rename from tests/building/test_survey_insulation_report.py rename to tests/building/measurement/test_survey_insulation_report.py diff --git a/tests/building/test_aperture_transmission.py b/tests/building/prediction/test_aperture_transmission.py similarity index 100% rename from tests/building/test_aperture_transmission.py rename to tests/building/prediction/test_aperture_transmission.py diff --git a/tests/building/test_ceiling_plenum.py b/tests/building/prediction/test_ceiling_plenum.py similarity index 100% rename from tests/building/test_ceiling_plenum.py rename to tests/building/prediction/test_ceiling_plenum.py diff --git a/tests/building/test_detailed_prediction.py b/tests/building/prediction/test_detailed_model.py similarity index 99% rename from tests/building/test_detailed_prediction.py rename to tests/building/prediction/test_detailed_model.py index 81cba832a..54a8779be 100644 --- a/tests/building/test_detailed_prediction.py +++ b/tests/building/prediction/test_detailed_model.py @@ -440,7 +440,7 @@ def test_table_l11_lightweight_flanking_paths_and_total() -> None: assert ff == pytest.approx(ref.ISO12354_TABLE_L11_R_FF, abs=TOL) assert df == pytest.approx(ref.ISO12354_TABLE_L11_R_DF, abs=TOL) - from phonometry.building.detailed_prediction import BandPath + from phonometry.building.prediction.detailed_model import BandPath result = detailed_airborne_prediction( BANDS, @@ -504,7 +504,7 @@ def test_impact_prediction_without_a_direct_path_sums_the_flanking_paths() -> No flanking paths add exactly 10 lg 2 = 3,010 3 dB and each carries half the energy. The result must contain no direct path at all, not a placeholder. """ - from phonometry.building.detailed_prediction import BandPath + from phonometry.building.prediction.detailed_model import BandPath values = np.full(BANDS.size, 50.0) result = detailed_impact_prediction( @@ -554,7 +554,7 @@ def test_table_g11_lightweight_impact_paths_and_total() -> None: assert direct == pytest.approx(ref.ISO12354_TABLE_G11_LN_DD, abs=TOL) assert flanking == pytest.approx(ref.ISO12354_TABLE_G11_LN_DF, abs=TOL) - from phonometry.building.detailed_prediction import BandPath + from phonometry.building.prediction.detailed_model import BandPath result = detailed_impact_prediction( BANDS, direct_level=direct, diff --git a/tests/building/test_detailed_prediction_report.py b/tests/building/prediction/test_detailed_model_report.py similarity index 100% rename from tests/building/test_detailed_prediction_report.py rename to tests/building/prediction/test_detailed_model_report.py diff --git a/tests/building/test_facade_prediction.py b/tests/building/prediction/test_facade.py similarity index 99% rename from tests/building/test_facade_prediction.py rename to tests/building/prediction/test_facade.py index c6ade03b7..fc6efe540 100644 --- a/tests/building/test_facade_prediction.py +++ b/tests/building/prediction/test_facade.py @@ -1,7 +1,7 @@ # Copyright (c) 2026. Jose Manuel Requena Plens """ Tests for the EN 12354-3/-4:2000 façade prediction module -(:mod:`phonometry.building.facade_prediction`). +(:mod:`phonometry.building.prediction.facade`). The primary oracles are the two worked examples of the standard: Annex F of Part 3 (façade airborne insulation) and Annex G of Part 4 (sound radiated to diff --git a/tests/building/test_building_prediction.py b/tests/building/prediction/test_global_model.py similarity index 100% rename from tests/building/test_building_prediction.py rename to tests/building/prediction/test_global_model.py diff --git a/tests/building/test_building_prediction_report.py b/tests/building/prediction/test_global_model_report.py similarity index 99% rename from tests/building/test_building_prediction_report.py rename to tests/building/prediction/test_global_model_report.py index 43069fca0..a9c9571bb 100644 --- a/tests/building/test_building_prediction_report.py +++ b/tests/building/prediction/test_global_model_report.py @@ -29,13 +29,13 @@ predicted_airborne_insulation, predicted_impact_insulation, ) -from phonometry.building.building_prediction import ( +from phonometry.building.prediction.facade import ( + FacadePredictionResult, +) +from phonometry.building.prediction.global_model import ( AirbornePredictionResult, ImpactPredictionResult, ) -from phonometry.building.facade_prediction import ( - FacadePredictionResult, -) _PDF_MAGIC = b"%PDF" diff --git a/tests/building/test_installed_structure_borne.py b/tests/building/prediction/test_installed_structure_borne.py similarity index 100% rename from tests/building/test_installed_structure_borne.py rename to tests/building/prediction/test_installed_structure_borne.py diff --git a/tests/building/test_installed_structure_borne_report.py b/tests/building/prediction/test_installed_structure_borne_report.py similarity index 100% rename from tests/building/test_installed_structure_borne_report.py rename to tests/building/prediction/test_installed_structure_borne_report.py diff --git a/tests/building/test_masonry_cavity_wall.py b/tests/building/prediction/test_masonry_cavity_wall.py similarity index 100% rename from tests/building/test_masonry_cavity_wall.py rename to tests/building/prediction/test_masonry_cavity_wall.py diff --git a/tests/building/test_orthotropic_panels.py b/tests/building/prediction/test_orthotropic_panels.py similarity index 100% rename from tests/building/test_orthotropic_panels.py rename to tests/building/prediction/test_orthotropic_panels.py diff --git a/tests/building/test_panel_transmission.py b/tests/building/prediction/test_panel_transmission.py similarity index 100% rename from tests/building/test_panel_transmission.py rename to tests/building/prediction/test_panel_transmission.py diff --git a/tests/building/test_resilient_layers.py b/tests/building/prediction/test_resilient_layers.py similarity index 99% rename from tests/building/test_resilient_layers.py rename to tests/building/prediction/test_resilient_layers.py index b645c1745..c098ef671 100644 --- a/tests/building/test_resilient_layers.py +++ b/tests/building/prediction/test_resilient_layers.py @@ -51,7 +51,7 @@ weighted_floating_floor_improvement, weighted_lining_improvement, ) -from phonometry.building.resilient_layers import ( +from phonometry.building.prediction.resilient_layers import ( _THIRD_OCTAVE_CENTRES, _THIRD_OCTAVE_FIRST_INDEX, ) diff --git a/tests/building/test_spanish_building_code.py b/tests/building/regulation/test_spanish_building_code.py similarity index 99% rename from tests/building/test_spanish_building_code.py rename to tests/building/regulation/test_spanish_building_code.py index 98b692153..e65146e44 100644 --- a/tests/building/test_spanish_building_code.py +++ b/tests/building/regulation/test_spanish_building_code.py @@ -1,5 +1,5 @@ # Copyright (c) 2026. Jose Manuel Requena Plens -"""Tests for :mod:`phonometry.building.spanish_building_code` (CTE DB-HR). +"""Tests for :mod:`phonometry.building.regulation.spain` (CTE DB-HR). Two independent oracle families anchor this module. @@ -31,8 +31,8 @@ import numpy as np import pytest -from phonometry.building import spanish_building_code as hr -from phonometry.building.insulation import weighted_rating_extended +from phonometry.building.measurement.insulation import weighted_rating_extended +from phonometry.building.regulation import spain as hr #: Manual Ejemplo 7.2, printed page 394: the apparent sound reduction index #: R' of a real field test, 100 Hz to 5 kHz. diff --git a/tests/conftest.py b/tests/conftest.py index 5bcfe3ee1..1fe9ecf58 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -35,7 +35,7 @@ def pytest_configure(config): "tests/test_generate_reports.py", "tests/simulation/test_elastic_fluid_solid.py", "tests/test_impact_insulation.py", - "tests/building/test_insulation.py", + "tests/building/measurement/test_insulation.py", "tests/psychoacoustics/test_tonality_ecma.py", "tests/psychoacoustics/test_loudness_ecma.py", "tests/psychoacoustics/test_fluctuation_strength_ecma.py", diff --git a/tests/iso12354_building.py b/tests/iso12354_building.py index 59a668517..b8ebba96f 100644 --- a/tests/iso12354_building.py +++ b/tests/iso12354_building.py @@ -19,7 +19,7 @@ * the external walls' internal loss factor is 0,012 5 (the element specification and Annex B Table B.3), not the 0,013 of the input block. -Both ``tests/building/test_detailed_prediction.py`` and +Both ``tests/building/prediction/test_detailed_model.py`` and ``scripts/conformance_report.py`` import these helpers, so the per-band tables the tests assert and the conformance rows the report prints can never be built two different ways. diff --git a/tests/reference_data.py b/tests/reference_data.py index c9a41a5fb..945bed4a8 100644 --- a/tests/reference_data.py +++ b/tests/reference_data.py @@ -388,7 +388,7 @@ # (S = 10 m2, A = 0,16 * 50 / 0,8 = 10 m2), so R = L1 - L2 = the reference. The # 32 dB unfavourable-deviation allowance then permits a 2 dB upward shift of the # reference (32 dB / 16 bands), giving Rw = curve@500 Hz (52) + 2 = 54 dB - the -# analytic +2-shift anchor (mirrors tests/building/test_lab_insulation.py). +# analytic +2-shift anchor (mirrors tests/building/measurement/test_lab_insulation.py). # --------------------------------------------------------------------------- ISO10140_2_REF_AIRBORNE_R: list[float] = [ 33, 36, 39, 42, 45, 48, 51, 52, 53, 54, 55, 56, 56, 56, 56, 56, @@ -401,7 +401,7 @@ # contributes an Ff/Fd/Df triplet (12 flanking paths), which with the direct # Dd path make 13 transmission paths. Energy summation (Formula (26)) gives # R'w = 52,2 dB -> 52 dB. Row = (label, Rw_flanking, KFf, KFd=KDf, coupling -# length lf). Mirrors tests/building/test_building_prediction.py (_annex_h_paths). +# length lf). Mirrors tests/building/prediction/test_global_model.py (_annex_h_paths). # --------------------------------------------------------------------------- EN12354_1_ANNEX_H3_R_DIRECT = 57.0 EN12354_1_ANNEX_H3_SEPARATING_AREA = 11.5 diff --git a/tests/simulation/test_elastic_fdtd.py b/tests/simulation/test_elastic_fdtd.py index 5d8fb3679..c2613adc4 100644 --- a/tests/simulation/test_elastic_fdtd.py +++ b/tests/simulation/test_elastic_fdtd.py @@ -10,7 +10,7 @@ Eq. 3.196b), the normal-incidence fluid-solid reflection and transmission coefficients from the characteristic impedances, the normal-incidence mass law of a thin immersed steel plate -(:func:`~phonometry.building.panel_transmission.mass_law_transmission_loss`), +(:func:`~phonometry.building.prediction.panel_transmission.mass_law_transmission_loss`), and the exact (bit-for-bit) reduction to the acoustic solver when ``c_s = 0`` everywhere. """ @@ -25,7 +25,7 @@ import pytest from scipy.optimize import brentq -from phonometry.building.panel_transmission import mass_law_transmission_loss +from phonometry.building.prediction.panel_transmission import mass_law_transmission_loss from phonometry.simulation.elastic_fdtd import ( ElasticFDTD2D, ElasticFDTDResult, diff --git a/tests/simulation/test_elastic_fluid_solid.py b/tests/simulation/test_elastic_fluid_solid.py index 4229579df..8beba2ee9 100644 --- a/tests/simulation/test_elastic_fluid_solid.py +++ b/tests/simulation/test_elastic_fluid_solid.py @@ -17,7 +17,7 @@ incidence, Eq. 4.2.27) with its half-wave thickness resonances ``f_n = n c_P / (2 h)`` (Eq. 2.4.19), cross-checked in its thin-plate band against - :func:`~phonometry.building.panel_transmission.mass_law_transmission_loss`. + :func:`~phonometry.building.prediction.panel_transmission.mass_law_transmission_loss`. The Scholte time-of-flight case runs the fluid-solid benchmark configuration of van Vossen, Robertsson & Chapman, "Finite-difference @@ -40,7 +40,7 @@ import pytest from scipy.signal import hilbert -from phonometry.building.panel_transmission import mass_law_transmission_loss +from phonometry.building.prediction.panel_transmission import mass_law_transmission_loss from phonometry.simulation import ( AIR, ALUMINIUM, diff --git a/tests/test_deprecated_aliases.py b/tests/test_deprecated_aliases.py index 95cc6ac3c..c55a1a98b 100644 --- a/tests/test_deprecated_aliases.py +++ b/tests/test_deprecated_aliases.py @@ -445,6 +445,25 @@ def test_pre_move_module_path_still_imports(path: str) -> None: "phonometry.environmental.rating", "phonometry.environmental.spanish_regulation", "phonometry.environmental.wind_turbine_noise", + "phonometry.building.aperture_transmission", + "phonometry.building.building_prediction", + "phonometry.building.building_uncertainty", + "phonometry.building.ceiling_plenum", + "phonometry.building.detailed_prediction", + "phonometry.building.facade_prediction", + "phonometry.building.flanking_transmission", + "phonometry.building.floor_covering_improvement", + "phonometry.building.heavy_impact", + "phonometry.building.installed_structure_borne", + "phonometry.building.insulation", + "phonometry.building.intensity_insulation", + "phonometry.building.lab_insulation", + "phonometry.building.masonry_cavity_wall", + "phonometry.building.panel_transmission", + "phonometry.building.resilient_layers", + "phonometry.building.spanish_building_code", + "phonometry.building.structure_borne_power", + "phonometry.building.survey_insulation", ] diff --git a/tests/test_package_architecture.py b/tests/test_package_architecture.py index 0464a530d..0699244fb 100644 --- a/tests/test_package_architecture.py +++ b/tests/test_package_architecture.py @@ -164,3 +164,19 @@ def test_subpackage_reexports_cover_facade_imports() -> None: if not hasattr(pkg, alias.name): missing.append(f"phonometry.{parts[0]}.{alias.name}") assert not missing, "facade imports not re-exported by their subpackage:\n" + "\n".join(missing) + +def test_test_module_basenames_are_unique() -> None: + """Two test files with the same name break collection of the whole tree. + + The suite has no ``__init__.py``, so pytest imports every test module by + its basename: a second ``test_spain.py`` anywhere is an import mismatch, + and it only shows up when the whole tree is collected at once. The + taxonomy work renames test files to follow their modules, which is exactly + how the collision gets introduced. + """ + import collections + + tests = Path(__file__).resolve().parent + counts = collections.Counter(p.name for p in tests.rglob("test_*.py")) + duplicates = {name: count for name, count in counts.items() if count > 1} + assert not duplicates, f"duplicate test module basenames: {duplicates}" diff --git a/tests/vibration/structural/test_experimental_sea.py b/tests/vibration/structural/test_experimental_sea.py index f9a2abbd9..c063a6ad3 100644 --- a/tests/vibration/structural/test_experimental_sea.py +++ b/tests/vibration/structural/test_experimental_sea.py @@ -52,7 +52,9 @@ import numpy as np import pytest -from phonometry.building.flanking_transmission import modal_density as en12354_n +from phonometry.building.measurement.flanking_transmission import ( + modal_density as en12354_n, +) from phonometry.vibration.structural.experimental_sea import ( bar_modal_density, beam_modal_density, From 8f5cb1716b542cba938358dd9d8b09d7f2708e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=2E=20Requena=20Plens?= Date: Sun, 2 Aug 2026 22:04:36 +0200 Subject: [PATCH 2/4] Answer the review of the building split The curated deprecation table lost its left column to a global rename, for the third time on that file: every row said a path resolves to itself, and four of the five rows had nothing to do with this change. It is restored, and it now has a test that reads each row against the alias tables, so a rename that rewrites the deprecated path fails rather than ships. The mutation that caused it fails that test. `dir()` on a package with the compatibility hook replaced the default listing instead of extending it, so the three subgroups this change introduces, and every dunder, disappeared from the very namespace the documentation tells the reader to explore. It extends now, which also fixes the same hole in metrology, hearing and vibration. The duplicate-basename guard was checking basenames in `tests`, which is both too narrow and too broad: pytest also collects from `src`, and a file inside a package imports under its dotted name rather than its basename. It models that rule now, so `phonometry.signals.test_signals` is correctly not a collision while a real one still fails it. Also: the errata page linked to `facade.py` while printing `facade_prediction.py`, `llms-full.txt` had been swept rather than regenerated, and the release note called the two EN 12354 routes editions when they are the single-number and per-band forms of the same calculation. --- CHANGELOG.md | 3 +- docs/ERRATA.md | 2 +- docs/api-reference.md | 11 +- llms-full.txt | 13 +- site/src/content/docs/es/reference/errata.md | 2 +- site/src/content/docs/reference/errata.md | 2 +- src/phonometry/_compat.py | 7 +- .../building/prediction/global_model.py | 217 +++++++++++------- src/phonometry/building/regulation/spain.py | 56 +++-- tests/test_deprecated_aliases.py | 32 +++ tests/test_package_architecture.py | 45 +++- 11 files changed, 261 insertions(+), 129 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 510ed9bb9..479037ebd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1025,7 +1025,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/). Five modules lose a word their subgroup now says: `building_prediction` is `prediction.global_model` and `detailed_prediction` is - `prediction.detailed_model`, which is what the two EN 12354 editions are; + `prediction.detailed_model`, the single-number and per-band routes the + standard offers for the same calculation; `facade_prediction` is `prediction.facade`, `building_uncertainty` is `measurement.uncertainty` and `spanish_building_code` is `regulation.spain`. diff --git a/docs/ERRATA.md b/docs/ERRATA.md index 0be30c6e5..e61cfac0b 100644 --- a/docs/ERRATA.md +++ b/docs/ERRATA.md @@ -261,7 +261,7 @@ which is the check that enforces the rule; see (the 2017 Formulae (4) and (5)). - **Library behaviour:** unaffected. No code path implements the reduced form: the façade model computes $D_{2m,nT}$ from Formula (13) - ([`facade_prediction.py`](../src/phonometry/building/prediction/facade.py)), + ([`facade.py`](../src/phonometry/building/prediction/facade.py)), and the survey method converts with the unreduced $D_{2m,n} = D_{2m} + k + 10\log_{10}[A_0 T_0/(0{,}16 V)]$ of ISO 10052 Clause 3.15 ([`survey_insulation.py`](../src/phonometry/building/measurement/survey_insulation.py)). diff --git a/docs/api-reference.md b/docs/api-reference.md index 4a459d743..1bd774f80 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -52,11 +52,12 @@ warns and delegates as well. | Deprecated path | Resolves to | Removed in | | :--- | :--- | :--- | -| `phonometry.building.measurement.insulation` | `phonometry.building.measurement.insulation` | 4.0 | -| `phonometry.signals.levels` | `phonometry.signals.levels` | 5.0 | -| `phonometry.speech.sti` | `phonometry.speech.sti` | 5.0 | -| `phonometry.vibration.human.exposure` | `phonometry.vibration.human.exposure` | 5.0 | -| `phonometry.environment` | `phonometry.environment` | 5.0 | +| `phonometry.insulation` | `phonometry.building.measurement.insulation` | 4.0 | +| `phonometry.metrology.levels` | `phonometry.signals.levels` | 5.0 | +| `phonometry.hearing.sti` | `phonometry.speech.sti` | 5.0 | +| `phonometry.vibration.human_vibration` | `phonometry.vibration.human.exposure` | 5.0 | +| `phonometry.building.spanish_building_code` | `phonometry.building.regulation.spain` | 5.0 | +| `phonometry.environmental` | `phonometry.environment` | 5.0 | | Name | Type | Description (Inputs) | Usage Snippet (Outputs) | | :--- | :--- | :--- | :--- | diff --git a/llms-full.txt b/llms-full.txt index 406f2e586..e82236a6d 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -2246,7 +2246,7 @@ contour = aircraft.noise_contour(path, powers, distances, sel, lmax, x=gx, y=gy) | `phonometry.emission` | Sound power (ISO 3740 family), sound intensity, vibration-based power | | `phonometry.room` | Room acoustics (ISO 3382), impulse responses, open-plan, room-noise criteria, reverberation prediction, EN 12354-6 | | `phonometry.materials` | Absorption (ISO 354/11654), impedance tube, airflow resistance, scattering/diffusion, road absorption, dynamic stiffness | -| `phonometry.building` | Sound insulation measurement and prediction (EN 12354, ISO 717/16283/10140/15186/10052/10848), structure-borne sound | +| `phonometry.building` | Three subgroups: `measurement` (field, laboratory, survey and intensity methods with their ISO 717 ratings and ISO 12999 uncertainty), `prediction` (EN 12354 global and detailed models, facades, panels, apertures, plenums and resilient layers) and `regulation` (national codes) | | `phonometry.vibration` | Three families: `structural` (mobility ISO 7626, plate junctions, radiation, experimental SEA, transfer stiffness ISO 10846), `human` (ISO 2631/5349/8041 exposure and multiple shocks) and `machinery` (fault frequencies and condition monitoring) | | `phonometry.environment` | Three subgroups: `sources` (CNOSSOS road and rail emission, wind-turbine apparent sound power), `propagation` (ISO 9613-1/-2, ground effect and barriers, refraction by ray tracing and the parabolic equation) and `assessment` (ISO 1996-1/-2 rating and measurement, impulsive prominence, RD 1367/2007) | | `phonometry.aircraft` | EPNL (ICAO Annex 16), SAE ARP 5534 absorption, airport contours (ECAC Doc 29), rotorcraft (ECAC Doc 32) | @@ -2265,11 +2265,12 @@ warns and delegates as well. | Deprecated path | Resolves to | Removed in | | :--- | :--- | :--- | -| `phonometry.building.measurement.insulation` | `phonometry.building.measurement.insulation` | 4.0 | -| `phonometry.signals.levels` | `phonometry.signals.levels` | 5.0 | -| `phonometry.speech.sti` | `phonometry.speech.sti` | 5.0 | -| `phonometry.vibration.human.exposure` | `phonometry.vibration.human.exposure` | 5.0 | -| `phonometry.environment` | `phonometry.environment` | 5.0 | +| `phonometry.insulation` | `phonometry.building.measurement.insulation` | 4.0 | +| `phonometry.metrology.levels` | `phonometry.signals.levels` | 5.0 | +| `phonometry.hearing.sti` | `phonometry.speech.sti` | 5.0 | +| `phonometry.vibration.human_vibration` | `phonometry.vibration.human.exposure` | 5.0 | +| `phonometry.building.spanish_building_code` | `phonometry.building.regulation.spain` | 5.0 | +| `phonometry.environmental` | `phonometry.environment` | 5.0 | | Name | Type | Description (Inputs) | Usage Snippet (Outputs) | | :--- | :--- | :--- | :--- | diff --git a/site/src/content/docs/es/reference/errata.md b/site/src/content/docs/es/reference/errata.md index 1aead2339..9369fadba 100644 --- a/site/src/content/docs/es/reference/errata.md +++ b/site/src/content/docs/es/reference/errata.md @@ -296,7 +296,7 @@ which is the check that enforces the rule; see (the 2017 Formulae (4) and (5)). - **Library behaviour:** unaffected. No code path implements the reduced form: the façade model computes $D_{2m,nT}$ from Formula (13) - ([`facade_prediction.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/prediction/facade.py)), + ([`facade.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/prediction/facade.py)), and the survey method converts with the unreduced $D_{2m,n} = D_{2m} + k + 10\log_{10}[A_0 T_0/(0{,}16 V)]$ of ISO 10052 Clause 3.15 ([`survey_insulation.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/measurement/survey_insulation.py)). diff --git a/site/src/content/docs/reference/errata.md b/site/src/content/docs/reference/errata.md index 506194b54..14f31cf3c 100644 --- a/site/src/content/docs/reference/errata.md +++ b/site/src/content/docs/reference/errata.md @@ -287,7 +287,7 @@ which is the check that enforces the rule; see (the 2017 Formulae (4) and (5)). - **Library behaviour:** unaffected. No code path implements the reduced form: the façade model computes $D_{2m,nT}$ from Formula (13) - ([`facade_prediction.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/prediction/facade.py)), + ([`facade.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/prediction/facade.py)), and the survey method converts with the unreduced $D_{2m,n} = D_{2m} + k + 10\log_{10}[A_0 T_0/(0{,}16 V)]$ of ISO 10052 Clause 3.15 ([`survey_insulation.py`](https://github.com/jmrplens/phonometry/blob/main/src/phonometry/building/measurement/survey_insulation.py)). diff --git a/src/phonometry/_compat.py b/src/phonometry/_compat.py index 0a162d30f..281a77eb3 100644 --- a/src/phonometry/_compat.py +++ b/src/phonometry/_compat.py @@ -407,7 +407,12 @@ def _namespace_dir( """ def __dir__() -> list[str]: - names = set(own) | set(_alias_modules(package)) + # Extend the default listing rather than replace it: a package's own + # dir() carries its dunders and the subpackages it imported, and the + # subgroups a split introduces are exactly what a reader is looking + # for there. + names = set(vars(import_module(package))) | set(own) + names |= set(_alias_modules(package)) for target in targets: names |= set(getattr(import_module(target), "__all__", ())) return sorted(names) diff --git a/src/phonometry/building/prediction/global_model.py b/src/phonometry/building/prediction/global_model.py index 5b4aac476..46491acc5 100644 --- a/src/phonometry/building/prediction/global_model.py +++ b/src/phonometry/building/prediction/global_model.py @@ -57,7 +57,7 @@ from __future__ import annotations import warnings -from collections.abc import Sequence +from collections.abc import Callable, Sequence from dataclasses import dataclass from math import isfinite, log10 from typing import TYPE_CHECKING, Any, Literal @@ -359,6 +359,128 @@ def _check_finite(value: float, name: str) -> float: return v +@dataclass(frozen=True) +class _KijTerms: + """The terms every Annex E branch is written in. + + :ivar m: :math:`M = \\log_{10}` of the mass ratio (Formula E.2). + :ivar ratio: The mass ratio itself, which the E.7 validity test reads. + :ivar lg_f_fk: :math:`\\log_{10}(f/f_k)` of the double-leaf branches. + :ivar delta1: The E.4/E.5 frequency term, zero below ``f1``. + """ + + m: float + ratio: float + lg_f_fk: float + delta1: float + + +def _kij_rigid_cross(path: PathKind, t: _KijTerms) -> float | None: + """Rigid cross junction (E.3): K13 through, K12 corner.""" + if path == "through": + return 8.7 + 17.1 * t.m + 5.7 * t.m * t.m + if path == "corner": + return 8.7 + 5.7 * t.m * t.m + return None + + +def _kij_rigid_t(path: PathKind, t: _KijTerms) -> float | None: + """Rigid T junction (E.4): K13 through, K12 corner.""" + if path == "through": + return 5.7 + 14.1 * t.m + 5.7 * t.m * t.m + if path == "corner": + return 5.7 + 5.7 * t.m * t.m + return None + + +def _kij_flexible_t(path: PathKind, t: _KijTerms) -> float: + """Flexible T junction (E.5), the only one with all three paths.""" + if path == "through": + return 5.7 + 14.1 * t.m + 5.7 * t.m * t.m + 2.0 * t.delta1 + if path == "corner": + return 5.7 + 5.7 * t.m * t.m + t.delta1 + # (E.5) K24, clamped to -4..0 dB (the print's "0 <= K24 <= -4 dB" read + # with the bounds in ascending order). + return min(max(3.7 + 14.1 * t.m + 5.7 * t.m * t.m, -4.0), 0.0) + + +def _kij_lightweight_facade(path: PathKind, t: _KijTerms) -> float | None: + """Lightweight facade junction (E.6).""" + if path == "through": + return max(5.0 + 10.0 * t.m, 5.0) + if path == "corner": + return 10.0 + 10.0 * abs(t.m) + return None + + +def _kij_lightweight_double_homogeneous(path: PathKind, t: _KijTerms) -> float: + """Lightweight double leaf on a homogeneous element (E.7).""" + if path == "through": + return max(10.0 + 20.0 * t.m - 3.3 * t.lg_f_fk, 10.0) + if path == "corner": + return 10.0 + 10.0 * abs(t.m) + 3.3 * t.lg_f_fk + # (E.7) K24 is given only where the homogeneous elements carrying + # the 2-4 path are more than three times heavier than a leaf + # (m2/m1 > 3), i.e. for a per-path mass_ratio = m'\u22a5,i/m'i < 1/3. + if t.ratio >= 1.0 / 3.0: + raise ValueError( + "The E.7 double-leaf branch (K24) is given only for " + "mass_ratio = m'\u22a5,i/m'i < 1/3 (the homogeneous element " + "carries the 2-4 path, so the ratio is leaf mass over " + "homogeneous-element mass and the printed condition " + "m2/m1 > 3 reads mass_ratio < 1/3)." + ) + # Per-path form (ISO 12354-1:2017 E.3.5); the 2000 print recasts the + # same relation as 3,0 - 14,1 M + 5,7 M^2 in the Figure E.9 x-axis + # variable lg(m2/m1), against its own Annex E definition of M (see + # docs/ERRATA.md). + return 3.0 + 14.1 * t.m + 5.7 * t.m * t.m + + +def _kij_lightweight_double_coupled(path: PathKind, t: _KijTerms) -> float | None: + """Lightweight double leaf coupled to a double leaf (E.8).""" + if path == "through": + return max(10.0 + 20.0 * t.m - 3.3 * t.lg_f_fk, 10.0) + if path == "corner": + return 10.0 + 10.0 * abs(t.m) - 3.3 * t.lg_f_fk + return None + + +def _kij_corner(path: PathKind, t: _KijTerms) -> float: + """Corner junction (E.9): one path, K12 = K21.""" + if path == "corner": + return max(15.0 * abs(t.m) - 3.0, -2.0) + raise ValueError( + "A 'corner' junction has the single path K12 = K21; use " + "path='corner'." + ) + + +def _kij_thickness_change(path: PathKind, t: _KijTerms) -> float: + """Change of thickness in line (E.10): one path, K12 = K21.""" + if path == "through": + return 5.0 * t.m * t.m - 5.0 + raise ValueError( + "A 'thickness_change' junction has the single in-line path " + "K12 = K21; use path='through'." + ) + + +#: One branch of EN 12354-1 Annex E per junction type. A branch returns +#: ``None`` for a path the standard does not give it, which the caller turns +#: into the "no double_leaf branch" error. +_KIJ_BRANCHES: dict[str, Callable[[PathKind, _KijTerms], float | None]] = { + "rigid_cross": _kij_rigid_cross, + "rigid_t": _kij_rigid_t, + "flexible_t": _kij_flexible_t, + "lightweight_facade": _kij_lightweight_facade, + "lightweight_double_homogeneous": _kij_lightweight_double_homogeneous, + "lightweight_double_coupled": _kij_lightweight_double_coupled, + "corner": _kij_corner, + "thickness_change": _kij_thickness_change, +} + + def junction_vibration_reduction( junction_type: JunctionType, path: PathKind, @@ -452,89 +574,28 @@ def junction_vibration_reduction( raise ValueError("'f1' must be positive.") if path not in ("through", "corner", "double_leaf"): raise ValueError("'path' must be 'through', 'corner' or 'double_leaf'.") - - m = log10(ratio) - delta1 = 10.0 * log10(frequency / f1) if frequency > f1 else 0.0 - # Frequency term of the E.7/E.8 lightweight double-leaf junctions. - lg_f_fk = log10(frequency / _FK_DOUBLE_LEAF) - - if junction_type == "rigid_cross": - if path == "through": - return 8.7 + 17.1 * m + 5.7 * m * m - if path == "corner": - return 8.7 + 5.7 * m * m - if junction_type == "rigid_t": - if path == "through": - return 5.7 + 14.1 * m + 5.7 * m * m - if path == "corner": - return 5.7 + 5.7 * m * m - if junction_type == "flexible_t": - if path == "through": - return 5.7 + 14.1 * m + 5.7 * m * m + 2.0 * delta1 - if path == "corner": - return 5.7 + 5.7 * m * m + delta1 - # (E.5) K24, clamped to −4..0 dB (the print's "0 ≤ K24 ≤ −4 dB" read - # with the bounds in ascending order). - return min(max(3.7 + 14.1 * m + 5.7 * m * m, -4.0), 0.0) - if junction_type == "lightweight_facade": - if path == "through": - return max(5.0 + 10.0 * m, 5.0) - if path == "corner": - return 10.0 + 10.0 * abs(m) - if junction_type == "lightweight_double_homogeneous": - if path == "through": - return max(10.0 + 20.0 * m - 3.3 * lg_f_fk, 10.0) - if path == "corner": - return 10.0 + 10.0 * abs(m) + 3.3 * lg_f_fk - # (E.7) K24 is given only where the homogeneous elements carrying - # the 2-4 path are more than three times heavier than a leaf - # (m2/m1 > 3), i.e. for a per-path mass_ratio = m'⊥,i/m'i < 1/3. - if ratio >= 1.0 / 3.0: - raise ValueError( - "The E.7 double-leaf branch (K24) is given only for " - "mass_ratio = m'⊥,i/m'i < 1/3 (the homogeneous element " - "carries the 2-4 path, so the ratio is leaf mass over " - "homogeneous-element mass and the printed condition " - "m2/m1 > 3 reads mass_ratio < 1/3)." - ) - # Per-path form (ISO 12354-1:2017 E.3.5); the 2000 print recasts the - # same relation as 3,0 - 14,1 M + 5,7 M^2 in the Figure E.9 x-axis - # variable lg(m2/m1), against its own Annex E definition of M (see - # docs/ERRATA.md). - return 3.0 + 14.1 * m + 5.7 * m * m - if junction_type == "lightweight_double_coupled": - if path == "through": - return max(10.0 + 20.0 * m - 3.3 * lg_f_fk, 10.0) - if path == "corner": - return 10.0 + 10.0 * abs(m) - 3.3 * lg_f_fk - if junction_type == "corner": - if path == "corner": - return max(15.0 * abs(m) - 3.0, -2.0) - raise ValueError( - "A 'corner' junction has the single path K12 = K21; use " - "path='corner'." - ) - if junction_type == "thickness_change": - if path == "through": - return 5.0 * m * m - 5.0 + branch = _KIJ_BRANCHES.get(junction_type) + if branch is None: raise ValueError( - "A 'thickness_change' junction has the single in-line path " - "K12 = K21; use path='through'." + "'junction_type' must be one of 'rigid_cross', 'rigid_t', " + "'flexible_t', 'lightweight_facade', " + "'lightweight_double_homogeneous', 'lightweight_double_coupled', " + "'corner', 'thickness_change'." ) - if junction_type in ( - "rigid_cross", "rigid_t", "lightweight_facade", - "lightweight_double_coupled", - ): + terms = _KijTerms( + m=log10(ratio), + ratio=ratio, + # Frequency term of the E.7/E.8 lightweight double-leaf junctions. + lg_f_fk=log10(frequency / _FK_DOUBLE_LEAF), + delta1=10.0 * log10(frequency / f1) if frequency > f1 else 0.0, + ) + kij = branch(path, terms) + if kij is None: raise ValueError( f"Junction type {junction_type!r} has no 'double_leaf' (K24) " "branch in EN 12354-1 Annex E." ) - raise ValueError( - "'junction_type' must be one of 'rigid_cross', 'rigid_t', " - "'flexible_t', 'lightweight_facade', " - "'lightweight_double_homogeneous', 'lightweight_double_coupled', " - "'corner', 'thickness_change'." - ) + return kij def junction_min_vibration_reduction( diff --git a/src/phonometry/building/regulation/spain.py b/src/phonometry/building/regulation/spain.py index 8219e3293..d6655627a 100644 --- a/src/phonometry/building/regulation/spain.py +++ b/src/phonometry/building/regulation/spain.py @@ -260,7 +260,7 @@ class DbHrGlobalIndexResult: prescribes for intermediate quantities and for product specifications. :ivar reported: The index rounded to an integer, the form DB-HR requires for the quantities that define the requirements (3.1.3.1 point 4). - :ivar name: The index name, e.g. ``"RA"`` or ``"D2m,nT,Atr"``. + :ivar name: The index name, e.g. ``"RA"`` or ``_D2M_NT_ATR``. :ivar spectrum: Key of the normalised spectrum used. :ivar frequencies: Band centre frequencies, in Hz. :ivar band_values: The band insulation values ``X_i``, in dB. @@ -422,10 +422,10 @@ def dnt_a( :param level_difference: Band standardized level difference ``DnT``, in dB. :param frequencies: Band centre frequencies, in Hz (optional). - :return: A :class:`DbHrGlobalIndexResult` named ``"DnT,A"``. + :return: A :class:`DbHrGlobalIndexResult` named ``_DNT_A``. """ return db_hr_global_index( - level_difference, "pink", frequencies=frequencies, name="DnT,A" + level_difference, "pink", frequencies=frequencies, name=_DNT_A ) @@ -492,7 +492,7 @@ def d2m_nt_atr( :param frequencies: Band centre frequencies, in Hz (optional). :param spectrum: ``"traffic"`` (default, Table A.3) or ``"aircraft"`` (Table A.2), per the dominant outdoor noise. - :return: A :class:`DbHrGlobalIndexResult` named ``"D2m,nT,Atr"``. + :return: A :class:`DbHrGlobalIndexResult` named ``_D2M_NT_ATR``. :raises ValueError: For a spectrum Formula (A.6) does not cover. """ key = str(spectrum).strip().lower() @@ -504,7 +504,7 @@ def d2m_nt_atr( "through Formula (A.5): use d2m_nt_a()." ) return db_hr_global_index( - level_difference, key, frequencies=frequencies, name="D2m,nT,Atr" + level_difference, key, frequencies=frequencies, name=_D2M_NT_ATR ) @@ -536,7 +536,7 @@ class DbHrRequirement: """A single DB-HR performance requirement. :ivar quantity: The quantity the requirement is stated in, e.g. - ``"DnT,A"``, ``"L'nT,w"``, ``"RA"``, ``"T"`` or ``"A/V"``. + ``_DNT_A``, ``"L'nT,w"``, ``"RA"``, ``"T"`` or ``"A/V"``. :ivar limit: The limit value, in the quantity's own unit. :ivar direction: ``"min"`` when the quantity must be at least the limit, ``"max"`` when it must be at most the limit. @@ -684,7 +684,7 @@ def db_hr_facade_requirement( # Clause 3.1.3.4 point 1: a railway-dominant site is assessed in # D2m,nT,A (Formula (A.5)), road traffic and aircraft in D2m,nT,Atr # (Formula (A.6)). Table 2.1 supplies the same numeric limit either way. - quantity = "D2m,nT,A" if noise == "railway" else "D2m,nT,Atr" + quantity = "D2m,nT,A" if noise == "railway" else _D2M_NT_ATR return DbHrRequirement( quantity=quantity, limit=limit, @@ -699,6 +699,12 @@ def db_hr_facade_requirement( ) +#: Quantity symbols of DB-HR, spelled as the code spells them. +_DNT_A = "DnT,A" +_D2M_NT_ATR = "D2m,nT,Atr" +#: The clause that governs a habitable room against installations or activity. +_CLAUSE_HABITABLE_SERVICES = "CTE DB-HR 2.1.1 b) iii" + #: DB-HR 2.1.1 airborne requirements, keyed by (receiving room, source room). _AIRBORNE_ROWS: dict[tuple[str, str], tuple[str, float, str, str]] = { ("protected", "same_unit"): ( @@ -706,15 +712,15 @@ def db_hr_facade_requirement( "partition walls within a dwelling of a private residential building", ), ("protected", "other_unit"): ( - "DnT,A", 50.0, "CTE DB-HR 2.1.1 a) ii", + _DNT_A, 50.0, "CTE DB-HR 2.1.1 a) ii", "protected room against a room of another dwelling or use unit", ), ("protected", "installations"): ( - "DnT,A", 55.0, "CTE DB-HR 2.1.1 a) iii", + _DNT_A, 55.0, "CTE DB-HR 2.1.1 a) iii", "protected room against a services or activity room", ), ("protected", "activity"): ( - "DnT,A", 55.0, "CTE DB-HR 2.1.1 a) iii", + _DNT_A, 55.0, "CTE DB-HR 2.1.1 a) iii", "protected room against a services or activity room", ), ("habitable", "same_unit"): ( @@ -722,15 +728,15 @@ def db_hr_facade_requirement( "partition walls within a dwelling of a private residential building", ), ("habitable", "other_unit"): ( - "DnT,A", 45.0, "CTE DB-HR 2.1.1 b) ii", + _DNT_A, 45.0, "CTE DB-HR 2.1.1 b) ii", "habitable room against a room of another dwelling or use unit", ), ("habitable", "installations"): ( - "DnT,A", 45.0, "CTE DB-HR 2.1.1 b) iii", + _DNT_A, 45.0, _CLAUSE_HABITABLE_SERVICES, "habitable room against a services or activity room", ), ("habitable", "activity"): ( - "DnT,A", 45.0, "CTE DB-HR 2.1.1 b) iii", + _DNT_A, 45.0, _CLAUSE_HABITABLE_SERVICES, "habitable room against a services or activity room", ), } @@ -742,8 +748,8 @@ def db_hr_facade_requirement( ("habitable", "other_unit"): (20.0, 50.0, "CTE DB-HR 2.1.1 b) ii"), # 2.1.1 b) ii states the shared-opening variant only for residential # (public or private) and hospital buildings. - ("habitable", "installations"): (30.0, 50.0, "CTE DB-HR 2.1.1 b) iii"), - ("habitable", "activity"): (30.0, 50.0, "CTE DB-HR 2.1.1 b) iii"), + ("habitable", "installations"): (30.0, 50.0, _CLAUSE_HABITABLE_SERVICES), + ("habitable", "activity"): (30.0, 50.0, _CLAUSE_HABITABLE_SERVICES), } @@ -785,7 +791,7 @@ def db_hr_airborne_requirement( ) if not shared_opening: quantity, limit, reference, description = _AIRBORNE_ROWS[key] - return ( + requirements = [ DbHrRequirement( quantity=quantity, limit=limit, @@ -794,8 +800,9 @@ def db_hr_airborne_requirement( decimals=0, reference=reference, description=description, - ), - ) + ) + ] + return tuple(requirements) if key not in _SHARED_OPENING_ROWS: raise ValueError( "DB-HR 2.1.1 states no shared-opening variant for " @@ -810,7 +817,7 @@ def db_hr_airborne_requirement( "hospital building" ) ) - return ( + requirements = [ DbHrRequirement( quantity="RA", limit=opening_limit, @@ -829,14 +836,15 @@ def db_hr_airborne_requirement( reference=reference, description="enclosure surrounding the shared door or window", ), - ) + ] + return tuple(requirements) #: DB-HR 2.1.1 c): the two alternative routes for a party wall between two #: buildings, keyed by the quantity the designer chooses to demonstrate. _PARTY_WALL_ROUTES: dict[str, tuple[float, str]] = { - "D2m,nT,Atr": (40.0, "each of the two leaves of the party wall"), - "DnT,A": (50.0, "the two leaves of the party wall taken together"), + _D2M_NT_ATR: (40.0, "each of the two leaves of the party wall"), + _DNT_A: (50.0, "the two leaves of the party wall taken together"), } @@ -849,8 +857,8 @@ def db_hr_party_wall_requirement(quantity: str = "D2m,nT,Atr") -> DbHrRequiremen ``DnT,A`` of at least 50 dBA. They are alternatives, not cumulative requirements, so this function returns the one route asked for. - :param quantity: ``"D2m,nT,Atr"`` (default, the per-leaf route) or - ``"DnT,A"`` (the combined route). + :param quantity: ``_D2M_NT_ATR`` (default, the per-leaf route) or + ``_DNT_A`` (the combined route). :return: The :class:`DbHrRequirement` of the chosen route. :raises ValueError: For an unknown quantity. """ diff --git a/tests/test_deprecated_aliases.py b/tests/test_deprecated_aliases.py index c55a1a98b..cdf2e6f06 100644 --- a/tests/test_deprecated_aliases.py +++ b/tests/test_deprecated_aliases.py @@ -13,6 +13,7 @@ from __future__ import annotations +import pathlib import sys import numpy as np @@ -480,6 +481,37 @@ def test_pre_split_module_path_still_imports(path: str) -> None: assert public, f"{path} imports but exposes no public names" +def test_the_migration_table_names_real_aliases() -> None: + """Every row of the curated table must be a live row of the alias tables. + + A global rename over the documentation has rewritten this table's left + column three times, each time turning a deprecated path into the path it + resolves to, so the page ended up calling the current path deprecated. The + check is cheap and the failure is unmistakable. + """ + import importlib + import re + + from phonometry._compat import _MOVED_3X, _MOVED_4X + + table = ( + pathlib.Path(__file__).resolve().parent.parent + / "docs" / "api-reference.md" + ).read_text(encoding="utf-8") + rows = re.findall( + r"^\| `(phonometry[\w.]*)` \| `(phonometry[\w.]*)` \| (\d\.\d) \|$", + table, re.MULTILINE, + ) + assert rows, "the migration table is gone from docs/api-reference.md" + for old, new, removed_in in rows: + generation = _MOVED_3X if removed_in == "4.0" else _MOVED_4X + assert old in generation, f"{old} is not a deprecated path of {removed_in}" + assert generation[old] == new, ( + f"{old} resolves to {generation[old]}, not to {new}" + ) + importlib.import_module(new) + + def test_a_renamed_package_alias_is_not_a_package() -> None: """The alias must not hand out the real package's search path. diff --git a/tests/test_package_architecture.py b/tests/test_package_architecture.py index 0699244fb..2cf4e06d6 100644 --- a/tests/test_package_architecture.py +++ b/tests/test_package_architecture.py @@ -165,18 +165,41 @@ def test_subpackage_reexports_cover_facade_imports() -> None: missing.append(f"phonometry.{parts[0]}.{alias.name}") assert not missing, "facade imports not re-exported by their subpackage:\n" + "\n".join(missing) -def test_test_module_basenames_are_unique() -> None: - """Two test files with the same name break collection of the whole tree. - - The suite has no ``__init__.py``, so pytest imports every test module by - its basename: a second ``test_spain.py`` anywhere is an import mismatch, - and it only shows up when the whole tree is collected at once. The - taxonomy work renames test files to follow their modules, which is exactly - how the collision gets introduced. +def test_collected_test_modules_have_unique_import_names() -> None: + """Two test modules that import under one name break the whole collection. + + With the default import mode pytest names a module by walking up from the + file while ``__init__.py`` exists: a file inside a package keeps its dotted + path, and a file outside one is imported by its bare basename. The suite + has no ``__init__.py``, so every test file there competes for its basename, + and a second ``test_spain.py`` anywhere is an import mismatch that only + shows up when the whole tree is collected at once. Renaming test files to + follow their modules, which is what the taxonomy work does, is exactly how + the collision gets introduced. + + ``src`` is scanned too, because pytest collects from the repository root + and ``phonometry.signals.test_signals`` matches the default patterns. It + sits inside a package, so it imports under its dotted name and cannot + collide, and this check knows that rather than assuming it. """ import collections - tests = Path(__file__).resolve().parent - counts = collections.Counter(p.name for p in tests.rglob("test_*.py")) + root = Path(__file__).resolve().parent.parent + + def import_name(path: Path) -> str: + parts = [path.stem] + parent = path.parent + while (parent / "__init__.py").exists(): + parts.append(parent.name) + parent = parent.parent + return ".".join(reversed(parts)) + + collected = [ + path + for directory in ("tests", "src") + for pattern in ("test_*.py", "*_test.py") + for path in (root / directory).rglob(pattern) + ] + counts = collections.Counter(import_name(path) for path in collected) duplicates = {name: count for name, count in counts.items() if count > 1} - assert not duplicates, f"duplicate test module basenames: {duplicates}" + assert not duplicates, f"test modules sharing an import name: {duplicates}" From fa4b3865c6b902dd4cac5e82a07afed51cf3873f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=2E=20Requena=20Plens?= Date: Sun, 2 Aug 2026 22:45:42 +0200 Subject: [PATCH 3/4] Call the EN 12354 route what the standard calls it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The module implements what EN 12354 names the simplified single-number model, says so nine times in its own text, and was being called global_model. "Global" came from the CTE's índice global, where it is the right word and where regulation.spain keeps it. The pair now reads simplified and detailed, which is how the standard offers the two routes and how a reader asks for them. --- CHANGELOG.md | 9 ++--- docs/insulation-prediction.md | 2 +- llms-full.txt | 4 +-- llms.txt | 2 +- scripts/api_taxonomy.py | 2 +- scripts/generate_graphs.py | 2 +- site/public/llms/llms-insulation-design.txt | 2 +- .../docs/es/guides/insulation-prediction.mdx | 2 +- .../docs/guides/insulation-prediction.mdx | 2 +- .../reference/api/building/detailed-model.md | 2 +- .../api/building/flanking-transmission.md | 4 +-- .../api/building/panel-transmission.md | 2 +- .../api/building/resilient-layers.md | 2 +- .../{global-model.md => simplified-model.md} | 28 +++++++-------- .../docs/reference/api/building/spain.md | 10 +++--- .../reference/api/building/uncertainty.md | 2 +- site/src/content/docs/reference/api/index.md | 2 +- .../api/materials/dynamic-stiffness.md | 2 +- site/src/generated/api-sidebar.mjs | 2 +- src/phonometry/__init__.py | 34 +++++++++---------- src/phonometry/_compat.py | 4 +-- src/phonometry/_plot/building.py | 12 +++---- src/phonometry/_report/iso12354.py | 10 +++--- .../measurement/flanking_transmission.py | 2 +- .../building/measurement/uncertainty.py | 2 +- .../building/prediction/__init__.py | 34 +++++++++---------- .../building/prediction/detailed_model.py | 2 +- .../building/prediction/panel_transmission.py | 2 +- .../{global_model.py => simplified_model.py} | 0 src/phonometry/materials/dynamic_stiffness.py | 2 +- ...obal_model.py => test_simplified_model.py} | 0 ...ort.py => test_simplified_model_report.py} | 2 +- tests/reference_data.py | 2 +- 33 files changed, 96 insertions(+), 95 deletions(-) rename site/src/content/docs/reference/api/building/{global-model.md => simplified-model.md} (96%) rename src/phonometry/building/prediction/{global_model.py => simplified_model.py} (100%) rename tests/building/prediction/{test_global_model.py => test_simplified_model.py} (100%) rename tests/building/prediction/{test_global_model_report.py => test_simplified_model_report.py} (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 479037ebd..45268e90e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1023,10 +1023,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/). it has to satisfy, which is the Spanish CTE DB-HR today and the shape any other country takes tomorrow. - Five modules lose a word their subgroup now says: `building_prediction` is - `prediction.global_model` and `detailed_prediction` is - `prediction.detailed_model`, the single-number and per-band routes the - standard offers for the same calculation; + Five modules lose a word their subgroup now says: `building_prediction` and + `detailed_prediction` become `prediction.simplified_model` and + `prediction.detailed_model`, which is what EN 12354 calls the two routes it + offers for the same calculation, and what the module's own text has always + called them; `facade_prediction` is `prediction.facade`, `building_uncertainty` is `measurement.uncertainty` and `spanish_building_code` is `regulation.spain`. diff --git a/docs/insulation-prediction.md b/docs/insulation-prediction.md index 4f0def6e5..06261cdbb 100644 --- a/docs/insulation-prediction.md +++ b/docs/insulation-prediction.md @@ -360,4 +360,4 @@ member of the family is EN 12354-6. the absorption member of the same EN 12354 family. - [Dynamic stiffness of resilient materials (EN 29052-1)](dynamic-stiffness.md): the $s'$ input to the EN 12354-2 floating-floor term. -- API reference: [`building.prediction.global_model`](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) and [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/). +- API reference: [`building.prediction.simplified_model`](https://jmrplens.github.io/phonometry/reference/api/building/simplified-model/) and [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/). diff --git a/llms-full.txt b/llms-full.txt index e82236a6d..871bb7db3 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -264,7 +264,6 @@ The generated API reference, one page per module. Fetch these only when a specif - [building/facade](https://jmrplens.github.io/phonometry/reference/api/building/facade/) - [building/flanking-transmission](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) - [building/floor-covering-improvement](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/) -- [building/global-model](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) - [building/heavy-impact](https://jmrplens.github.io/phonometry/reference/api/building/heavy-impact/) - [building/installed-structure-borne](https://jmrplens.github.io/phonometry/reference/api/building/installed-structure-borne/) - [building/insulation](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) @@ -273,6 +272,7 @@ The generated API reference, one page per module. Fetch these only when a specif - [building/masonry-cavity-wall](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/) - [building/panel-transmission](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/) - [building/resilient-layers](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/) +- [building/simplified-model](https://jmrplens.github.io/phonometry/reference/api/building/simplified-model/) - [building/spain](https://jmrplens.github.io/phonometry/reference/api/building/spain/) - [building/structure-borne-power](https://jmrplens.github.io/phonometry/reference/api/building/structure-borne-power/) - [building/survey-insulation](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/) @@ -16903,7 +16903,7 @@ member of the family is EN 12354-6. the absorption member of the same EN 12354 family. - [Dynamic stiffness of resilient materials (EN 29052-1)](https://jmrplens.github.io/phonometry/guides/dynamic-stiffness/): the $s'$ input to the EN 12354-2 floating-floor term. -- API reference: [`building.prediction.global_model`](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) and [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/). +- API reference: [`building.prediction.simplified_model`](https://jmrplens.github.io/phonometry/reference/api/building/simplified-model/) and [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/). --- diff --git a/llms.txt b/llms.txt index b7ebbbf3f..b621ee757 100644 --- a/llms.txt +++ b/llms.txt @@ -264,7 +264,6 @@ The generated API reference, one page per module. Fetch these only when a specif - [building/facade](https://jmrplens.github.io/phonometry/reference/api/building/facade/) - [building/flanking-transmission](https://jmrplens.github.io/phonometry/reference/api/building/flanking-transmission/) - [building/floor-covering-improvement](https://jmrplens.github.io/phonometry/reference/api/building/floor-covering-improvement/) -- [building/global-model](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) - [building/heavy-impact](https://jmrplens.github.io/phonometry/reference/api/building/heavy-impact/) - [building/installed-structure-borne](https://jmrplens.github.io/phonometry/reference/api/building/installed-structure-borne/) - [building/insulation](https://jmrplens.github.io/phonometry/reference/api/building/insulation/) @@ -273,6 +272,7 @@ The generated API reference, one page per module. Fetch these only when a specif - [building/masonry-cavity-wall](https://jmrplens.github.io/phonometry/reference/api/building/masonry-cavity-wall/) - [building/panel-transmission](https://jmrplens.github.io/phonometry/reference/api/building/panel-transmission/) - [building/resilient-layers](https://jmrplens.github.io/phonometry/reference/api/building/resilient-layers/) +- [building/simplified-model](https://jmrplens.github.io/phonometry/reference/api/building/simplified-model/) - [building/spain](https://jmrplens.github.io/phonometry/reference/api/building/spain/) - [building/structure-borne-power](https://jmrplens.github.io/phonometry/reference/api/building/structure-borne-power/) - [building/survey-insulation](https://jmrplens.github.io/phonometry/reference/api/building/survey-insulation/) diff --git a/scripts/api_taxonomy.py b/scripts/api_taxonomy.py index 3cf20e20e..708e6f735 100644 --- a/scripts/api_taxonomy.py +++ b/scripts/api_taxonomy.py @@ -165,7 +165,7 @@ class Section: "phonometry.building.measurement.intensity_insulation", "phonometry.building.measurement.flanking_transmission", "phonometry.building.prediction.facade", - "phonometry.building.prediction.global_model", + "phonometry.building.prediction.simplified_model", "phonometry.building.prediction.detailed_model", "phonometry.building.measurement.uncertainty", "phonometry.building.measurement.floor_covering_improvement", diff --git a/scripts/generate_graphs.py b/scripts/generate_graphs.py index 099fdcc0f..d917bf23d 100644 --- a/scripts/generate_graphs.py +++ b/scripts/generate_graphs.py @@ -6971,7 +6971,7 @@ def generate_moore_glasberg_time_loudness(output_dir: str) -> None: def generate_prediction_flanking_demo(output_dir: str) -> None: """EN 12354-1 simplified flanking prediction (Annex H.3 worked example).""" print("Generating prediction_flanking_demo.png...") - from phonometry.building.prediction.global_model import ( + from phonometry.building.prediction.simplified_model import ( FlankingPath, flanking_element, predicted_airborne_insulation, diff --git a/site/public/llms/llms-insulation-design.txt b/site/public/llms/llms-insulation-design.txt index 861999f8a..00b44cf55 100644 --- a/site/public/llms/llms-insulation-design.txt +++ b/site/public/llms/llms-insulation-design.txt @@ -367,7 +367,7 @@ member of the family is EN 12354-6. the absorption member of the same EN 12354 family. - [Dynamic stiffness of resilient materials (EN 29052-1)](https://jmrplens.github.io/phonometry/guides/dynamic-stiffness/): the $s'$ input to the EN 12354-2 floating-floor term. -- API reference: [`building.prediction.global_model`](https://jmrplens.github.io/phonometry/reference/api/building/global-model/) and [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/). +- API reference: [`building.prediction.simplified_model`](https://jmrplens.github.io/phonometry/reference/api/building/simplified-model/) and [`building.prediction.facade`](https://jmrplens.github.io/phonometry/reference/api/building/facade/). --- diff --git a/site/src/content/docs/es/guides/insulation-prediction.mdx b/site/src/content/docs/es/guides/insulation-prediction.mdx index 52971dd16..34f873d8e 100644 --- a/site/src/content/docs/es/guides/insulation-prediction.mdx +++ b/site/src/content/docs/es/guides/insulation-prediction.mdx @@ -449,4 +449,4 @@ y el modelo de absorción de la EN 12354-6 en el miembro de absorción de la misma familia EN 12354. - [Rigidez dinámica de materiales resilientes (EN 29052-1)](/phonometry/es/guides/dynamic-stiffness/): la $s'$ que alimenta el término de suelo flotante de EN 12354-2. -- Referencia de la API: [`building.prediction.global_model`](/phonometry/es/reference/api/building/global-model/) y [`building.prediction.facade`](/phonometry/es/reference/api/building/facade/). +- Referencia de la API: [`building.prediction.simplified_model`](/phonometry/es/reference/api/building/simplified-model/) y [`building.prediction.facade`](/phonometry/es/reference/api/building/facade/). diff --git a/site/src/content/docs/guides/insulation-prediction.mdx b/site/src/content/docs/guides/insulation-prediction.mdx index 8638c1592..d1beb1c88 100644 --- a/site/src/content/docs/guides/insulation-prediction.mdx +++ b/site/src/content/docs/guides/insulation-prediction.mdx @@ -438,4 +438,4 @@ and EN 12354-6's absorption model in the absorption member of the same EN 12354 family. - [Dynamic stiffness of resilient materials (EN 29052-1)](/phonometry/guides/dynamic-stiffness/): the $s'$ input to the EN 12354-2 floating-floor term. -- API reference: [`building.prediction.global_model`](/phonometry/reference/api/building/global-model/) and [`building.prediction.facade`](/phonometry/reference/api/building/facade/). +- API reference: [`building.prediction.simplified_model`](/phonometry/reference/api/building/simplified-model/) and [`building.prediction.facade`](/phonometry/reference/api/building/facade/). diff --git a/site/src/content/docs/reference/api/building/detailed-model.md b/site/src/content/docs/reference/api/building/detailed-model.md index 3a2f41d94..e42751bfd 100644 --- a/site/src/content/docs/reference/api/building/detailed-model.md +++ b/site/src/content/docs/reference/api/building/detailed-model.md @@ -9,7 +9,7 @@ Detailed per-band building prediction (EN/ISO 12354-1/-2:2017). This is the **detailed model** of the building-prediction chain, the per-band counterpart of the simplified single-number model implemented in -[`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/). Where the simplified model +[`phonometry.building.prediction.simplified_model`](/phonometry/reference/api/building/simplified-model/). Where the simplified model combines the weighted ratings of the elements (`Rw`, `ΔRw`, `Kij`) into a single `R'w` / `L'n,w`, the detailed model carries every quantity through the one-third-octave (or octave) bands, converts the laboratory element data to diff --git a/site/src/content/docs/reference/api/building/flanking-transmission.md b/site/src/content/docs/reference/api/building/flanking-transmission.md index 72382b3df..d645d3d91 100644 --- a/site/src/content/docs/reference/api/building/flanking-transmission.md +++ b/site/src/content/docs/reference/api/building/flanking-transmission.md @@ -8,13 +8,13 @@ sidebar: Laboratory measurement of flanking sound transmission (ISO 10848:2006/2010). This is the **measurement** counterpart of the flanking-transmission -*prediction* in [`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/). EN 12354-1 predicts the +*prediction* in [`phonometry.building.prediction.simplified_model`](/phonometry/reference/api/building/simplified-model/). EN 12354-1 predicts the apparent in-situ performance from, among other inputs, the **vibration reduction index** `Kij` of each junction; ISO 10848 is the standard that *measures* that `Kij` (and the overall flanking descriptors `Dn,f` / `Ln,f`) in a qualified test facility. The measured `Kij` is a situation-invariant junction descriptor that feeds straight into the -[`phonometry.flanking_path`](/phonometry/reference/api/building/global-model/#flanking_path) model. +[`phonometry.flanking_path`](/phonometry/reference/api/building/simplified-model/#flanking_path) model. **Vibration reduction index (Part 1, Clause 3.9).** From the *direction averaged* velocity level difference diff --git a/site/src/content/docs/reference/api/building/panel-transmission.md b/site/src/content/docs/reference/api/building/panel-transmission.md index 57d72fa89..92360bc1b 100644 --- a/site/src/content/docs/reference/api/building/panel-transmission.md +++ b/site/src/content/docs/reference/api/building/panel-transmission.md @@ -8,7 +8,7 @@ sidebar: Predicted airborne sound reduction index of panels (Bies, Hansen & Howard 2017, Engineering Noise Control 5e, Section 7.2; Sharp 1973). -Where EN 12354-1 ([`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/)) takes the +Where EN 12354-1 ([`phonometry.building.prediction.simplified_model`](/phonometry/reference/api/building/simplified-model/)) takes the element sound reduction index `R` as a *measured* input, this module **predicts** `R(f)` from the physical properties of the construction: the mass per unit area, bending stiffness (through the coincidence frequency) and loss diff --git a/site/src/content/docs/reference/api/building/resilient-layers.md b/site/src/content/docs/reference/api/building/resilient-layers.md index e9313ffd4..58ff27281 100644 --- a/site/src/content/docs/reference/api/building/resilient-layers.md +++ b/site/src/content/docs/reference/api/building/resilient-layers.md @@ -1088,7 +1088,7 @@ weighted_floating_floor_improvement( Weighted improvement `ΔLw` of a floating floor (Formulae C.4/C.5). The single number that feeds the simplified prediction -([`phonometry.predicted_impact_insulation`](/phonometry/reference/api/building/global-model/#predicted_impact_insulation)), read directly from the +([`phonometry.predicted_impact_insulation`](/phonometry/reference/api/building/simplified-model/#predicted_impact_insulation)), read directly from the floating floor's mass per unit area and the resilient layer's dynamic stiffness. ISO 12354-2:2017 gives it as the two nomograms of Figures C.1 and C.2 and prints the fits: diff --git a/site/src/content/docs/reference/api/building/global-model.md b/site/src/content/docs/reference/api/building/simplified-model.md similarity index 96% rename from site/src/content/docs/reference/api/building/global-model.md rename to site/src/content/docs/reference/api/building/simplified-model.md index c779d158a..15e292a87 100644 --- a/site/src/content/docs/reference/api/building/global-model.md +++ b/site/src/content/docs/reference/api/building/simplified-model.md @@ -1,8 +1,8 @@ --- -title: "building.prediction.global_model" +title: "building.prediction.simplified_model" description: "Building acoustic performance prediction (EN 12354-1/-2:2000)." sidebar: - label: "global_model" + label: "simplified_model" --- Building acoustic performance prediction (EN 12354-1/-2:2000). @@ -233,7 +233,7 @@ flanking_element( Build the three flanking paths (Ff, Df, Fd) of one flanking element. -Convenience wrapper over [`flanking_path`](/phonometry/reference/api/building/global-model/#flanking_path) for the common case where a +Convenience wrapper over [`flanking_path`](/phonometry/reference/api/building/simplified-model/#flanking_path) for the common case where a flanking element is essentially the same on the source and receiving side (Clause 4.4.1). Returns the `Ff`, `Df` and `Fd` paths that this element contributes across its junction with the separating element. @@ -245,10 +245,10 @@ junction elements are the flanking element) and `KFd`/`KDf` to $10 \log_{10}[l_f l_0 (1/S_F + 1/S_s)]$ (flanking and separating element), via -[`junction_min_vibration_reduction`](/phonometry/reference/api/building/global-model/#junction_min_vibration_reduction). Without `flanking_area` the +[`junction_min_vibration_reduction`](/phonometry/reference/api/building/simplified-model/#junction_min_vibration_reduction). Without `flanking_area` the per-path floors cannot be formed from the available geometry, so the raw `k_ff`/`k_fd`/`k_df` are used unchanged; compute the floors -yourself (or call [`flanking_path`](/phonometry/reference/api/building/global-model/#flanking_path) with `kij_min`) in that case to +yourself (or call [`flanking_path`](/phonometry/reference/api/building/simplified-model/#flanking_path) with `kij_min`) in that case to stay within Clause 4.4.2. **Parameters** @@ -268,7 +268,7 @@ stay within Clause 4.4.2. | `delta_r_df` | Combined lining improvement for the Df path, in dB. | | `flanking_area` | Flanking-element area $S_F = S_f$, in m². Enables the automatic `Kij,min` clamp (Clause 4.4.2); `None` skips it. | -**Returns:** The `(Ff, Df, Fd)` [`FlankingPath`](/phonometry/reference/api/building/global-model/#flankingpath) triple. +**Returns:** The `(Ff, Df, Fd)` [`FlankingPath`](/phonometry/reference/api/building/simplified-model/#flankingpath) triple. **Raises** @@ -310,7 +310,7 @@ When `kij_min` is given, `k_ij` is clamped up to it (`max(k_ij, kij_min)`) before the path is formed, enforcing the floor $K_{ij} \ge K_{ij,\mathrm{min}}$ of Clause 4.4.2 (compute `kij_min` with -[`junction_min_vibration_reduction`](/phonometry/reference/api/building/global-model/#junction_min_vibration_reduction)). Left as `None` the raw `k_ij` +[`junction_min_vibration_reduction`](/phonometry/reference/api/building/simplified-model/#junction_min_vibration_reduction)). Left as `None` the raw `k_ij` is used unchanged. **Parameters** @@ -327,7 +327,7 @@ is used unchanged. | `delta_r` | Combined lining improvement `ΔRij,w` for this path, in dB. | | `kij_min` | Optional `Kij,min` floor (Clause 4.4.2); `k_ij` is raised to it when it lies below. `None` disables the clamp. | -**Returns:** The [`FlankingPath`](/phonometry/reference/api/building/global-model/#flankingpath). +**Returns:** The [`FlankingPath`](/phonometry/reference/api/building/simplified-model/#flankingpath). **Raises** @@ -646,10 +646,10 @@ the transmitted energy so the dominant path is visible. | Name | Description | | :--- | :--- | | `r_direct` | Weighted sound reduction index of the separating element `Rs,w`, in dB. | -| `flanking_paths` | Flanking paths (see [`flanking_element`](/phonometry/reference/api/building/global-model/#flanking_element)). May be empty for the direct-only case. | +| `flanking_paths` | Flanking paths (see [`flanking_element`](/phonometry/reference/api/building/simplified-model/#flanking_element)). May be empty for the direct-only case. | | `delta_r_direct` | Combined lining improvement `ΔRDd,w` on the separating element, in dB. | -**Returns:** The [`AirbornePredictionResult`](/phonometry/reference/api/building/global-model/#airbornepredictionresult). +**Returns:** The [`AirbornePredictionResult`](/phonometry/reference/api/building/simplified-model/#airbornepredictionresult). **Raises** @@ -672,8 +672,8 @@ Predict the apparent impact insulation `L'n,w` (EN 12354-2 Formula 21). $L'_{n,w} = L_{n,w,eq} - \Delta L_w + K$. The bare-floor equivalent level may come from -[`equivalent_impact_level`](/phonometry/reference/api/building/global-model/#equivalent_impact_level) and the flanking correction from -[`impact_flanking_correction`](/phonometry/reference/api/building/global-model/#impact_flanking_correction). +[`equivalent_impact_level`](/phonometry/reference/api/building/simplified-model/#equivalent_impact_level) and the flanking correction from +[`impact_flanking_correction`](/phonometry/reference/api/building/simplified-model/#impact_flanking_correction). **Parameters** @@ -683,7 +683,7 @@ level may come from | `delta_l_w` | Weighted covering improvement `ΔLw` (ISO 717-2), in dB. | | `k_correction` | Flanking correction `K` (Table 1), in dB. | -**Returns:** The [`ImpactPredictionResult`](/phonometry/reference/api/building/global-model/#impactpredictionresult). +**Returns:** The [`ImpactPredictionResult`](/phonometry/reference/api/building/simplified-model/#impactpredictionresult). **Raises** @@ -750,7 +750,7 @@ both round to the same $D_{nT,w} = 54$ dB. | Name | Description | | :--- | :--- | -| `r_prime_w` | Apparent weighted sound reduction index `R'w`, in dB (see [`predicted_airborne_insulation`](/phonometry/reference/api/building/global-model/#predicted_airborne_insulation)). | +| `r_prime_w` | Apparent weighted sound reduction index `R'w`, in dB (see [`predicted_airborne_insulation`](/phonometry/reference/api/building/simplified-model/#predicted_airborne_insulation)). | | `volume` | Receiving-room volume `V`, in m³ (must be positive). | | `separating_area` | Separating-element area `Ss`, in m² (must be positive). | diff --git a/site/src/content/docs/reference/api/building/spain.md b/site/src/content/docs/reference/api/building/spain.md index 70d40e0aa..9a4df0374 100644 --- a/site/src/content/docs/reference/api/building/spain.md +++ b/site/src/content/docs/reference/api/building/spain.md @@ -208,7 +208,7 @@ report are stated in is not the same. | `frequencies` | Band centre frequencies, in Hz (optional). | | `spectrum` | `"traffic"` (default, Table A.3) or `"aircraft"` (Table A.2), per the dominant outdoor noise. | -**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult) named `"D2m,nT,Atr"`. +**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult) named `_D2M_NT_ATR`. **Raises** @@ -401,7 +401,7 @@ requirements, so this function returns the one route asked for. | Name | Description | | :--- | :--- | -| `quantity` | `"D2m,nT,Atr"` (default, the per-leaf route) or `"DnT,A"` (the combined route). | +| `quantity` | `_D2M_NT_ATR` (default, the per-leaf route) or `_DNT_A` (the combined route). | **Returns:** The [`DbHrRequirement`](/phonometry/reference/api/building/spain/#dbhrrequirement) of the chosen route. @@ -527,7 +527,7 @@ A DB-HR A-weighted global insulation index. | `value` | The index, in dBA, unrounded. | | `intermediate` | The index rounded to one decimal, the form DB-HR prescribes for intermediate quantities and for product specifications. | | `reported` | The index rounded to an integer, the form DB-HR requires for the quantities that define the requirements (3.1.3.1 point 4). | -| `name` | The index name, e.g. `"RA"` or `"D2m,nT,Atr"`. | +| `name` | The index name, e.g. `"RA"` or `_D2M_NT_ATR`. | | `spectrum` | Key of the normalised spectrum used. | | `frequencies` | Band centre frequencies, in Hz. | | `band_values` | The band insulation values `X_i`, in dB. | @@ -568,7 +568,7 @@ A single DB-HR performance requirement. | Name | Description | | :--- | :--- | -| `quantity` | The quantity the requirement is stated in, e.g. `"DnT,A"`, `"L'nT,w"`, `"RA"`, `"T"` or `"A/V"`. | +| `quantity` | The quantity the requirement is stated in, e.g. `_DNT_A`, `"L'nT,w"`, `"RA"`, `"T"` or `"A/V"`. | | `limit` | The limit value, in the quantity's own unit. | | `direction` | `"min"` when the quantity must be at least the limit, `"max"` when it must be at most the limit. | | `unit` | The unit the limit is expressed in. | @@ -595,7 +595,7 @@ A-weighted standardized level difference `DnT,A` (Formula (A.7)). | `level_difference` | Band standardized level difference `DnT`, in dB. | | `frequencies` | Band centre frequencies, in Hz (optional). | -**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult) named `"DnT,A"`. +**Returns:** A [`DbHrGlobalIndexResult`](/phonometry/reference/api/building/spain/#dbhrglobalindexresult) named `_DNT_A`. ## ra diff --git a/site/src/content/docs/reference/api/building/uncertainty.md b/site/src/content/docs/reference/api/building/uncertainty.md index 6bede6c97..c77feb1a9 100644 --- a/site/src/content/docs/reference/api/building/uncertainty.md +++ b/site/src/content/docs/reference/api/building/uncertainty.md @@ -10,7 +10,7 @@ Measurement uncertainty in building acoustics (ISO 12999-1:2020). This module supplies the **measurement uncertainty** of the sound-insulation quantities produced by the field/lab/prediction modules ([`phonometry.building.measurement.insulation`](/phonometry/reference/api/building/insulation/), [`phonometry.building.measurement.lab_insulation`](/phonometry/reference/api/building/lab-insulation/), -[`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/)). ISO 12999-1 does not re-measure anything; +[`phonometry.building.prediction.simplified_model`](/phonometry/reference/api/building/simplified-model/)). ISO 12999-1 does not re-measure anything; it tabulates *standard uncertainties* `u` derived from inter-laboratory tests (ISO 5725) and prescribes how to expand and combine them. diff --git a/site/src/content/docs/reference/api/index.md b/site/src/content/docs/reference/api/index.md index f9a5673cf..de3f823de 100644 --- a/site/src/content/docs/reference/api/index.md +++ b/site/src/content/docs/reference/api/index.md @@ -122,7 +122,7 @@ La referencia de la API se genera a partir de los docstrings del código (en ing | [`building.measurement.intensity_insulation`](/phonometry/reference/api/building/intensity-insulation/) | Sound insulation measured with sound intensity (ISO 15186). | | [`building.measurement.flanking_transmission`](/phonometry/reference/api/building/flanking-transmission/) | Laboratory measurement of flanking sound transmission (ISO 10848:2006/2010). | | [`building.prediction.facade`](/phonometry/reference/api/building/facade/) | Façade sound insulation and outdoor radiation prediction (EN 12354-3/-4:2000). | -| [`building.prediction.global_model`](/phonometry/reference/api/building/global-model/) | Building acoustic performance prediction (EN 12354-1/-2:2000). | +| [`building.prediction.simplified_model`](/phonometry/reference/api/building/simplified-model/) | Building acoustic performance prediction (EN 12354-1/-2:2000). | | [`building.prediction.detailed_model`](/phonometry/reference/api/building/detailed-model/) | Detailed per-band building prediction (EN/ISO 12354-1/-2:2017). | | [`building.measurement.uncertainty`](/phonometry/reference/api/building/uncertainty/) | Measurement uncertainty in building acoustics (ISO 12999-1:2020). | | [`building.measurement.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/) | Impact-sound improvement of floor coverings on a small mock-up (ISO 16251-1:2014). | diff --git a/site/src/content/docs/reference/api/materials/dynamic-stiffness.md b/site/src/content/docs/reference/api/materials/dynamic-stiffness.md index a8f708f27..eace28f19 100644 --- a/site/src/content/docs/reference/api/materials/dynamic-stiffness.md +++ b/site/src/content/docs/reference/api/materials/dynamic-stiffness.md @@ -63,7 +63,7 @@ applies when $s'_t \gg s'_a$, otherwise `s'` cannot be resolved. This module is the resilient-layer characterisation feeding the floating-floor term of the EN 12354-2 impact model -([`phonometry.building.prediction.global_model`](/phonometry/reference/api/building/global-model/)). It does **not** feed +([`phonometry.building.prediction.simplified_model`](/phonometry/reference/api/building/simplified-model/)). It does **not** feed ISO 16251-1 ([`phonometry.building.measurement.floor_covering_improvement`](/phonometry/reference/api/building/floor-covering-improvement/)), whose scope is limited to soft, locally-reacting floor coverings; floating floors are explicitly excluded there. diff --git a/site/src/generated/api-sidebar.mjs b/site/src/generated/api-sidebar.mjs index ad63f225f..a24cc45c1 100644 --- a/site/src/generated/api-sidebar.mjs +++ b/site/src/generated/api-sidebar.mjs @@ -121,7 +121,7 @@ export const apiSidebar = { 'reference/api/building/intensity-insulation', 'reference/api/building/flanking-transmission', 'reference/api/building/facade', - 'reference/api/building/global-model', + 'reference/api/building/simplified-model', 'reference/api/building/detailed-model', 'reference/api/building/uncertainty', 'reference/api/building/floor-covering-improvement', diff --git a/src/phonometry/__init__.py b/src/phonometry/__init__.py index 4b197a6c5..d9e985623 100644 --- a/src/phonometry/__init__.py +++ b/src/phonometry/__init__.py @@ -288,23 +288,6 @@ outdoor_level, radiated_sound_power, ) -from .building.prediction.global_model import ( - AirbornePredictionResult, - FlankingPath, - ImpactPredictionResult, - PathContribution, - combine_linings, - equivalent_impact_level, - flanking_element, - flanking_path, - impact_flanking_correction, - junction_min_vibration_reduction, - junction_vibration_reduction, - predicted_airborne_insulation, - predicted_impact_insulation, - standardized_impact_level, - standardized_level_difference, -) from .building.prediction.installed_structure_borne import ( REFERENCE_AREA, InstalledSourceResult, @@ -368,6 +351,23 @@ weighted_floating_floor_improvement, weighted_lining_improvement, ) +from .building.prediction.simplified_model import ( + AirbornePredictionResult, + FlankingPath, + ImpactPredictionResult, + PathContribution, + combine_linings, + equivalent_impact_level, + flanking_element, + flanking_path, + impact_flanking_correction, + junction_min_vibration_reduction, + junction_vibration_reduction, + predicted_airborne_insulation, + predicted_impact_insulation, + standardized_impact_level, + standardized_level_difference, +) from .building.regulation.spain import ( DB_HR_FREQUENCIES, DB_HR_NORMALISED_SPECTRA, diff --git a/src/phonometry/_compat.py b/src/phonometry/_compat.py index 281a77eb3..e63f92e83 100644 --- a/src/phonometry/_compat.py +++ b/src/phonometry/_compat.py @@ -90,7 +90,7 @@ "phonometry.room_ir": "phonometry.room.room_ir", "phonometry.room_noise": "phonometry.room.room_noise", "phonometry.building_prediction": - "phonometry.building.prediction.global_model", + "phonometry.building.prediction.simplified_model", "phonometry.building_uncertainty": "phonometry.building.measurement.uncertainty", "phonometry.facade_prediction": @@ -247,7 +247,7 @@ "phonometry.building.building_uncertainty": "phonometry.building.measurement.uncertainty", "phonometry.building.building_prediction": - "phonometry.building.prediction.global_model", + "phonometry.building.prediction.simplified_model", "phonometry.building.detailed_prediction": "phonometry.building.prediction.detailed_model", "phonometry.building.facade_prediction": diff --git a/src/phonometry/_plot/building.py b/src/phonometry/_plot/building.py index 3ed8083ae..4dffef190 100644 --- a/src/phonometry/_plot/building.py +++ b/src/phonometry/_plot/building.py @@ -65,10 +65,6 @@ InSituElementResult, ) from ..building.prediction.facade import FacadePredictionResult, RadiatedPowerResult - from ..building.prediction.global_model import ( - AirbornePredictionResult, - ImpactPredictionResult, - ) from ..building.prediction.installed_structure_borne import InstalledSourceResult from ..building.prediction.masonry_cavity_wall import WallTieCouplingResult from ..building.prediction.panel_transmission import SoundReductionResult @@ -78,6 +74,10 @@ LiningImprovementResult, TappingForceResult, ) + from ..building.prediction.simplified_model import ( + AirbornePredictionResult, + ImpactPredictionResult, + ) from ..building.regulation.spain import ( DbHrAssessment, DbHrGlobalIndexResult, @@ -847,7 +847,7 @@ def plot_airborne_prediction( share of the total transmitted sound energy, largest first. :param result: An - :class:`~phonometry.building.prediction.global_model.AirbornePredictionResult`. + :class:`~phonometry.building.prediction.simplified_model.AirbornePredictionResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the path :meth:`~matplotlib.axes.Axes.bar`. @@ -888,7 +888,7 @@ def plot_impact_prediction( apparent level ``L'n,w = Ln,w,eq - DLw + K``. :param result: An - :class:`~phonometry.building.prediction.global_model.ImpactPredictionResult`. + :class:`~phonometry.building.prediction.simplified_model.ImpactPredictionResult`. :param ax: Existing axes, or ``None`` to create a figure. :param language: Label language, ``"en"`` (default) or ``"es"``. :param kwargs: Forwarded to the term :meth:`~matplotlib.axes.Axes.bar`. diff --git a/src/phonometry/_report/iso12354.py b/src/phonometry/_report/iso12354.py index 657c7c58b..d2aed3f69 100644 --- a/src/phonometry/_report/iso12354.py +++ b/src/phonometry/_report/iso12354.py @@ -2,10 +2,10 @@ """EN/ISO 12354-1/-2/-3 predicted building sound-insulation fiche (reportlab). Renders a -:class:`~phonometry.building.prediction.global_model.AirbornePredictionResult` +:class:`~phonometry.building.prediction.simplified_model.AirbornePredictionResult` (predicted apparent sound reduction index ``R'`` between rooms, EN/ISO 12354-1), an -:class:`~phonometry.building.prediction.global_model.ImpactPredictionResult` +:class:`~phonometry.building.prediction.simplified_model.ImpactPredictionResult` (predicted apparent normalized impact sound pressure level ``L'n``, EN/ISO 12354-2) or a :class:`~phonometry.building.prediction.facade.FacadePredictionResult` @@ -66,7 +66,7 @@ DetailedImpactResult, ) from ..building.prediction.facade import FacadePredictionResult - from ..building.prediction.global_model import ( + from ..building.prediction.simplified_model import ( AirbornePredictionResult, ImpactPredictionResult, ) @@ -254,7 +254,7 @@ def render_iso12354_airborne_report( """Render a predicted apparent airborne insulation fiche (EN/ISO 12354-1). :param result: The - :class:`~phonometry.building.prediction.global_model.AirbornePredictionResult` + :class:`~phonometry.building.prediction.simplified_model.AirbornePredictionResult` carrying the predicted apparent weighted index ``R'w``, the direct-path index ``RDd,w`` and the per-path contributions. :param path: Destination path of the PDF file. @@ -316,7 +316,7 @@ def render_iso12354_impact_report( """Render a predicted apparent impact insulation fiche (EN/ISO 12354-2). :param result: The - :class:`~phonometry.building.prediction.global_model.ImpactPredictionResult` + :class:`~phonometry.building.prediction.simplified_model.ImpactPredictionResult` carrying the predicted apparent weighted level ``L'n,w`` and the Formula (21) terms (the bare-floor equivalent level ``Ln,w,eq``, the covering improvement ``ΔLw`` and the flanking correction ``K``). diff --git a/src/phonometry/building/measurement/flanking_transmission.py b/src/phonometry/building/measurement/flanking_transmission.py index 6e7b1995a..83c7e3e1b 100644 --- a/src/phonometry/building/measurement/flanking_transmission.py +++ b/src/phonometry/building/measurement/flanking_transmission.py @@ -3,7 +3,7 @@ Laboratory measurement of flanking sound transmission (ISO 10848:2006/2010). This is the **measurement** counterpart of the flanking-transmission -*prediction* in :mod:`phonometry.building.prediction.global_model`. EN 12354-1 predicts the +*prediction* in :mod:`phonometry.building.prediction.simplified_model`. EN 12354-1 predicts the apparent in-situ performance from, among other inputs, the **vibration reduction index** ``Kij`` of each junction; ISO 10848 is the standard that *measures* that ``Kij`` (and the overall flanking descriptors ``Dn,f`` / diff --git a/src/phonometry/building/measurement/uncertainty.py b/src/phonometry/building/measurement/uncertainty.py index 4396db6c1..9ac5b6f42 100644 --- a/src/phonometry/building/measurement/uncertainty.py +++ b/src/phonometry/building/measurement/uncertainty.py @@ -5,7 +5,7 @@ This module supplies the **measurement uncertainty** of the sound-insulation quantities produced by the field/lab/prediction modules (:mod:`phonometry.building.measurement.insulation`, :mod:`phonometry.building.measurement.lab_insulation`, -:mod:`phonometry.building.prediction.global_model`). ISO 12999-1 does not re-measure anything; +:mod:`phonometry.building.prediction.simplified_model`). ISO 12999-1 does not re-measure anything; it tabulates *standard uncertainties* ``u`` derived from inter-laboratory tests (ISO 5725) and prescribes how to expand and combine them. diff --git a/src/phonometry/building/prediction/__init__.py b/src/phonometry/building/prediction/__init__.py index 2a31d2778..da05ac527 100644 --- a/src/phonometry/building/prediction/__init__.py +++ b/src/phonometry/building/prediction/__init__.py @@ -65,23 +65,6 @@ outdoor_level, radiated_sound_power, ) -from .global_model import ( - AirbornePredictionResult, - FlankingPath, - ImpactPredictionResult, - PathContribution, - combine_linings, - equivalent_impact_level, - flanking_element, - flanking_path, - impact_flanking_correction, - junction_min_vibration_reduction, - junction_vibration_reduction, - predicted_airborne_insulation, - predicted_impact_insulation, - standardized_impact_level, - standardized_level_difference, -) from .installed_structure_borne import ( REFERENCE_AREA, InstalledSourceResult, @@ -145,6 +128,23 @@ weighted_floating_floor_improvement, weighted_lining_improvement, ) +from .simplified_model import ( + AirbornePredictionResult, + FlankingPath, + ImpactPredictionResult, + PathContribution, + combine_linings, + equivalent_impact_level, + flanking_element, + flanking_path, + impact_flanking_correction, + junction_min_vibration_reduction, + junction_vibration_reduction, + predicted_airborne_insulation, + predicted_impact_insulation, + standardized_impact_level, + standardized_level_difference, +) __all__ = [ "CEILING_ATTENUATION_CONTOUR", diff --git a/src/phonometry/building/prediction/detailed_model.py b/src/phonometry/building/prediction/detailed_model.py index 914b2dacb..5e7d009ac 100644 --- a/src/phonometry/building/prediction/detailed_model.py +++ b/src/phonometry/building/prediction/detailed_model.py @@ -4,7 +4,7 @@ This is the **detailed model** of the building-prediction chain, the per-band counterpart of the simplified single-number model implemented in -:mod:`phonometry.building.prediction.global_model`. Where the simplified model +:mod:`phonometry.building.prediction.simplified_model`. Where the simplified model combines the weighted ratings of the elements (``Rw``, ``ΔRw``, ``Kij``) into a single ``R'w`` / ``L'n,w``, the detailed model carries every quantity through the one-third-octave (or octave) bands, converts the laboratory element data to diff --git a/src/phonometry/building/prediction/panel_transmission.py b/src/phonometry/building/prediction/panel_transmission.py index 34b16cde1..542d35198 100644 --- a/src/phonometry/building/prediction/panel_transmission.py +++ b/src/phonometry/building/prediction/panel_transmission.py @@ -3,7 +3,7 @@ Predicted airborne sound reduction index of panels (Bies, Hansen & Howard 2017, Engineering Noise Control 5e, Section 7.2; Sharp 1973). -Where EN 12354-1 (:mod:`phonometry.building.prediction.global_model`) takes the +Where EN 12354-1 (:mod:`phonometry.building.prediction.simplified_model`) takes the element sound reduction index ``R`` as a *measured* input, this module **predicts** ``R(f)`` from the physical properties of the construction: the mass per unit area, bending stiffness (through the coincidence frequency) and loss diff --git a/src/phonometry/building/prediction/global_model.py b/src/phonometry/building/prediction/simplified_model.py similarity index 100% rename from src/phonometry/building/prediction/global_model.py rename to src/phonometry/building/prediction/simplified_model.py diff --git a/src/phonometry/materials/dynamic_stiffness.py b/src/phonometry/materials/dynamic_stiffness.py index 9c1be6306..8cbf55b60 100644 --- a/src/phonometry/materials/dynamic_stiffness.py +++ b/src/phonometry/materials/dynamic_stiffness.py @@ -58,7 +58,7 @@ This module is the resilient-layer characterisation feeding the floating-floor term of the EN 12354-2 impact model -(:mod:`phonometry.building.prediction.global_model`). It does **not** feed +(:mod:`phonometry.building.prediction.simplified_model`). It does **not** feed ISO 16251-1 (:mod:`phonometry.building.measurement.floor_covering_improvement`), whose scope is limited to soft, locally-reacting floor coverings; floating floors are explicitly excluded there. diff --git a/tests/building/prediction/test_global_model.py b/tests/building/prediction/test_simplified_model.py similarity index 100% rename from tests/building/prediction/test_global_model.py rename to tests/building/prediction/test_simplified_model.py diff --git a/tests/building/prediction/test_global_model_report.py b/tests/building/prediction/test_simplified_model_report.py similarity index 99% rename from tests/building/prediction/test_global_model_report.py rename to tests/building/prediction/test_simplified_model_report.py index a9c9571bb..d3ab73d14 100644 --- a/tests/building/prediction/test_global_model_report.py +++ b/tests/building/prediction/test_simplified_model_report.py @@ -32,7 +32,7 @@ from phonometry.building.prediction.facade import ( FacadePredictionResult, ) -from phonometry.building.prediction.global_model import ( +from phonometry.building.prediction.simplified_model import ( AirbornePredictionResult, ImpactPredictionResult, ) diff --git a/tests/reference_data.py b/tests/reference_data.py index 945bed4a8..16a1e3bc9 100644 --- a/tests/reference_data.py +++ b/tests/reference_data.py @@ -401,7 +401,7 @@ # contributes an Ff/Fd/Df triplet (12 flanking paths), which with the direct # Dd path make 13 transmission paths. Energy summation (Formula (26)) gives # R'w = 52,2 dB -> 52 dB. Row = (label, Rw_flanking, KFf, KFd=KDf, coupling -# length lf). Mirrors tests/building/prediction/test_global_model.py (_annex_h_paths). +# length lf). Mirrors tests/building/prediction/test_simplified_model.py (_annex_h_paths). # --------------------------------------------------------------------------- EN12354_1_ANNEX_H3_R_DIRECT = 57.0 EN12354_1_ANNEX_H3_SEPARATING_AREA = 11.5 From 2ad164e72473b2f4776193caef85e1ecfaa9cac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=2E=20Requena=20Plens?= Date: Sun, 2 Aug 2026 23:08:09 +0200 Subject: [PATCH 4/4] Answer SonarCloud on the moved building tests Eleven exception tests built their subject inside the raises block, so the assertion covered the constructor as well as the call under test; the subject is bound first now. Two more asserted two things at once, which reports the wrong half on failure. --- .../prediction/test_detailed_model.py | 6 +- tests/building/prediction/test_facade.py | 59 ++++++++++--------- 2 files changed, 36 insertions(+), 29 deletions(-) diff --git a/tests/building/prediction/test_detailed_model.py b/tests/building/prediction/test_detailed_model.py index 54a8779be..d2151cf8e 100644 --- a/tests/building/prediction/test_detailed_model.py +++ b/tests/building/prediction/test_detailed_model.py @@ -775,7 +775,8 @@ def test_detailed_airborne_plot_draws_bars_and_the_total(airborne, language) -> ax = airborne.plot(language=language) assert ax.patches, "no stacked path bars drawn" twin = [other for other in ax.get_figure().axes if other is not ax] - assert twin and twin[0].lines, "the apparent index is not overlaid" + assert twin, "no twin axis for the apparent index" + assert twin[0].lines, "the apparent index is not overlaid" assert ax.get_legend() is not None plt.close(ax.get_figure()) @@ -787,7 +788,8 @@ def test_detailed_impact_plot_draws_bars_and_the_total(impact, language) -> None ax = impact.plot(language=language) assert ax.patches twin = [other for other in ax.get_figure().axes if other is not ax] - assert twin and twin[0].lines + assert twin + assert twin[0].lines plt.close(ax.get_figure()) diff --git a/tests/building/prediction/test_facade.py b/tests/building/prediction/test_facade.py index fc6efe540..baa00faf4 100644 --- a/tests/building/prediction/test_facade.py +++ b/tests/building/prediction/test_facade.py @@ -342,26 +342,27 @@ def test_far_field_point_source() -> None: def test_element_requires_exactly_one_quantity() -> None: + element = FacadeElement(name="x", area=1.0) with pytest.raises(ValueError, match="exactly one"): - FacadeElement(name="x", area=1.0).tau(10.0, 1) + element.tau(10.0, 1) + element = FacadeElement(name="x", area=1.0, r=[40.0], dn_e=[30.0]) with pytest.raises(ValueError, match="exactly one"): - FacadeElement(name="x", area=1.0, r=[40.0], dn_e=[30.0]).tau(10.0, 1) + element.tau(10.0, 1) def test_area_element_requires_positive_area() -> None: + element = FacadeElement(name="x", r=[40.0]) with pytest.raises(ValueError, match="area"): - FacadeElement(name="x", r=[40.0]).tau(10.0, 1) + element.tau(10.0, 1) def test_inconsistent_band_counts_raise() -> None: - with pytest.raises(ValueError, match="band count"): - facade_sound_reduction( - [ + elements = [ FacadeElement(name="a", area=5.0, r=[40.0, 41.0, 42.0]), FacadeElement(name="b", area=5.0, r=[30.0, 31.0]), - ], - area=10.0, volume=50.0, - ) + ] + with pytest.raises(ValueError, match="band count"): + facade_sound_reduction(elements, area=10.0, volume=50.0) def test_scalar_broadcasts_to_band_count() -> None: @@ -377,20 +378,19 @@ def test_scalar_broadcasts_to_band_count() -> None: def test_non_finite_input_rejected() -> None: + element = FacadeElement(name="x", area=1.0, r=[np.nan]) with pytest.raises(ValueError, match="finite"): - FacadeElement(name="x", area=1.0, r=[np.nan]).tau(10.0, 1) + element.tau(10.0, 1) def test_duplicate_element_names_raise() -> None: """Elements are keyed by name in the result, so names must be unique.""" - with pytest.raises(ValueError, match="unique"): - facade_sound_reduction( - [ + elements = [ FacadeElement(name="glass", area=5.0, r=[40.0]), FacadeElement(name="glass", area=5.0, r=[30.0]), - ], - area=10.0, volume=50.0, - ) + ] + with pytest.raises(ValueError, match="unique"): + facade_sound_reduction(elements, area=10.0, volume=50.0) def test_no_element_silently_dropped_when_names_unique() -> None: @@ -411,35 +411,40 @@ def test_no_element_silently_dropped_when_names_unique() -> None: def test_frequencies_length_must_match_bands() -> None: + elements = [FacadeElement(name="a", area=5.0, r=[40.0, 41.0, 42.0])] with pytest.raises(ValueError, match="frequencies"): facade_sound_reduction( - [FacadeElement(name="a", area=5.0, r=[40.0, 41.0, 42.0])], - area=10.0, volume=50.0, frequencies=[125.0, 250.0], + elements, + area=10.0, + volume=50.0, + frequencies=[125.0, 250.0], ) def test_octave_bands_length_must_match() -> None: + elements = [FacadeElement(name="w", area=10.0, r=[40.0, 41.0])] with pytest.raises(ValueError, match="octave_bands"): radiated_sound_power( - [FacadeElement(name="w", area=10.0, r=[40.0, 41.0])], - lp_in=[70.0, 71.0], area=10.0, octave_bands=[125], + elements, + lp_in=[70.0, 71.0], + area=10.0, + octave_bands=[125], ) def test_tau_rejects_non_positive_total_area() -> None: + element = FacadeElement(name="x", area=1.0, r=[40.0]) with pytest.raises(ValueError, match="total_area"): - FacadeElement(name="x", area=1.0, r=[40.0]).tau(0.0, 1) + element.tau(0.0, 1) def test_positive_area_and_volume_required() -> None: + elements = [FacadeElement(name="a", area=5.0, r=[40.0])] with pytest.raises(ValueError, match="volume"): - facade_sound_reduction( - [FacadeElement(name="a", area=5.0, r=[40.0])], area=10.0, volume=0.0 - ) + facade_sound_reduction(elements, area=10.0, volume=0.0) + elements = [FacadeElement(name="a", area=5.0, r=[40.0])] with pytest.raises(ValueError, match="area"): - facade_sound_reduction( - [FacadeElement(name="a", area=5.0, r=[40.0])], area=0.0, volume=50.0 - ) + facade_sound_reduction(elements, area=0.0, volume=50.0) # ---------------------------------------------------------------------------