phonometry 3.0.0__tar.gz → 3.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. phonometry-3.2.0/LICENSE +21 -0
  2. phonometry-3.2.0/PKG-INFO +160 -0
  3. phonometry-3.2.0/README.md +130 -0
  4. phonometry-3.2.0/VERSION +1 -0
  5. {phonometry-3.0.0 → phonometry-3.2.0}/pyproject.toml +1 -0
  6. phonometry-3.2.0/src/phonometry/__init__.py +1580 -0
  7. phonometry-3.2.0/src/phonometry/_compat.py +162 -0
  8. phonometry-3.2.0/src/phonometry/_internal/__init__.py +8 -0
  9. phonometry-3.2.0/src/phonometry/_internal/levels_math.py +101 -0
  10. phonometry-3.2.0/src/phonometry/_internal/types.py +26 -0
  11. phonometry-3.2.0/src/phonometry/_internal/validation.py +107 -0
  12. phonometry-3.2.0/src/phonometry/_internal/warnings.py +38 -0
  13. phonometry-3.2.0/src/phonometry/_plot/__init__.py +7 -0
  14. phonometry-3.2.0/src/phonometry/_plot/aircraft.py +190 -0
  15. phonometry-3.2.0/src/phonometry/_plot/building.py +506 -0
  16. phonometry-3.2.0/src/phonometry/_plot/common.py +752 -0
  17. phonometry-3.2.0/src/phonometry/_plot/electroacoustics.py +120 -0
  18. phonometry-3.2.0/src/phonometry/_plot/emission.py +164 -0
  19. phonometry-3.2.0/src/phonometry/_plot/environmental.py +182 -0
  20. phonometry-3.2.0/src/phonometry/_plot/hearing.py +224 -0
  21. phonometry-3.2.0/src/phonometry/_plot/materials.py +290 -0
  22. phonometry-3.2.0/src/phonometry/_plot/metrology.py +87 -0
  23. phonometry-3.2.0/src/phonometry/_plot/psychoacoustics.py +410 -0
  24. phonometry-3.2.0/src/phonometry/_plot/room.py +503 -0
  25. phonometry-3.2.0/src/phonometry/_plot/underwater.py +377 -0
  26. phonometry-3.2.0/src/phonometry/_plot/vibration.py +227 -0
  27. phonometry-3.2.0/src/phonometry/_plotting.py +90 -0
  28. phonometry-3.2.0/src/phonometry/aircraft/__init__.py +67 -0
  29. phonometry-3.2.0/src/phonometry/aircraft/aircraft_noise.py +407 -0
  30. phonometry-3.2.0/src/phonometry/aircraft/airport_noise.py +662 -0
  31. phonometry-3.2.0/src/phonometry/aircraft/atmospheric_absorption.py +134 -0
  32. phonometry-3.2.0/src/phonometry/aircraft/rotorcraft_noise.py +308 -0
  33. phonometry-3.2.0/src/phonometry/building/__init__.py +246 -0
  34. phonometry-3.2.0/src/phonometry/building/building_prediction.py +581 -0
  35. phonometry-3.2.0/src/phonometry/building/building_uncertainty.py +612 -0
  36. phonometry-3.2.0/src/phonometry/building/facade_prediction.py +405 -0
  37. phonometry-3.2.0/src/phonometry/building/flanking_transmission.py +699 -0
  38. phonometry-3.2.0/src/phonometry/building/floor_covering_improvement.py +300 -0
  39. phonometry-3.2.0/src/phonometry/building/installed_structure_borne.py +267 -0
  40. phonometry-3.2.0/src/phonometry/building/insulation.py +976 -0
  41. phonometry-3.2.0/src/phonometry/building/intensity_insulation.py +407 -0
  42. phonometry-3.2.0/src/phonometry/building/lab_insulation.py +333 -0
  43. phonometry-3.2.0/src/phonometry/building/structure_borne_power.py +216 -0
  44. phonometry-3.2.0/src/phonometry/building/survey_insulation.py +596 -0
  45. phonometry-3.2.0/src/phonometry/electroacoustics/__init__.py +36 -0
  46. phonometry-3.2.0/src/phonometry/electroacoustics/distortion.py +612 -0
  47. phonometry-3.2.0/src/phonometry/electroacoustics/frequency_response.py +230 -0
  48. phonometry-3.2.0/src/phonometry/emission/__init__.py +93 -0
  49. phonometry-3.2.0/src/phonometry/emission/intensity.py +407 -0
  50. phonometry-3.2.0/src/phonometry/emission/sound_power.py +1501 -0
  51. phonometry-3.2.0/src/phonometry/emission/sound_power_intensity.py +441 -0
  52. phonometry-3.2.0/src/phonometry/emission/sound_power_reverberation.py +466 -0
  53. phonometry-3.2.0/src/phonometry/emission/vibration_sound_power.py +297 -0
  54. phonometry-3.2.0/src/phonometry/environmental/__init__.py +110 -0
  55. phonometry-3.2.0/src/phonometry/environmental/air_absorption.py +270 -0
  56. phonometry-3.2.0/src/phonometry/environmental/impulse_prominence.py +187 -0
  57. phonometry-3.2.0/src/phonometry/environmental/measurement.py +503 -0
  58. phonometry-3.2.0/src/phonometry/environmental/outdoor_propagation.py +662 -0
  59. phonometry-3.2.0/src/phonometry/environmental/rating.py +90 -0
  60. phonometry-3.2.0/src/phonometry/environmental/wind_turbine_noise.py +258 -0
  61. phonometry-3.2.0/src/phonometry/hearing/__init__.py +63 -0
  62. phonometry-3.2.0/src/phonometry/hearing/noise_induced_hearing_loss.py +282 -0
  63. phonometry-3.2.0/src/phonometry/hearing/occupational_exposure.py +576 -0
  64. phonometry-3.2.0/src/phonometry/hearing/sii.py +230 -0
  65. phonometry-3.2.0/src/phonometry/hearing/sti.py +554 -0
  66. phonometry-3.2.0/src/phonometry/hearing/threshold.py +279 -0
  67. phonometry-3.2.0/src/phonometry/materials/__init__.py +250 -0
  68. phonometry-3.2.0/src/phonometry/materials/absorption_rating.py +368 -0
  69. phonometry-3.2.0/src/phonometry/materials/absorption_uncertainty.py +446 -0
  70. phonometry-3.2.0/src/phonometry/materials/airflow_resistance.py +511 -0
  71. phonometry-3.2.0/src/phonometry/materials/dynamic_stiffness.py +313 -0
  72. phonometry-3.2.0/src/phonometry/materials/impedance_tube.py +1037 -0
  73. phonometry-3.2.0/src/phonometry/materials/road_absorption.py +882 -0
  74. phonometry-3.2.0/src/phonometry/materials/scattering_diffusion.py +884 -0
  75. phonometry-3.2.0/src/phonometry/materials/sound_absorption.py +311 -0
  76. phonometry-3.2.0/src/phonometry/metrology/__init__.py +75 -0
  77. phonometry-3.2.0/src/phonometry/metrology/calibration.py +225 -0
  78. phonometry-3.2.0/src/phonometry/metrology/compliance.py +558 -0
  79. {phonometry-3.0.0/src/phonometry → phonometry-3.2.0/src/phonometry/metrology}/core.py +29 -8
  80. {phonometry-3.0.0/src/phonometry → phonometry-3.2.0/src/phonometry/metrology}/filter_design.py +8 -2
  81. {phonometry-3.0.0/src/phonometry → phonometry-3.2.0/src/phonometry/metrology}/frequencies.py +31 -7
  82. {phonometry-3.0.0/src/phonometry → phonometry-3.2.0/src/phonometry/metrology}/levels.py +33 -8
  83. {phonometry-3.0.0/src/phonometry → phonometry-3.2.0/src/phonometry/metrology}/parametric_filters.py +69 -20
  84. phonometry-3.2.0/src/phonometry/metrology/uncertainty.py +355 -0
  85. phonometry-3.2.0/src/phonometry/psychoacoustics/__init__.py +116 -0
  86. phonometry-3.2.0/src/phonometry/psychoacoustics/_zwicker_data.py +467 -0
  87. phonometry-3.2.0/src/phonometry/psychoacoustics/fluctuation_strength.py +447 -0
  88. phonometry-3.2.0/src/phonometry/psychoacoustics/loudness_contours.py +130 -0
  89. phonometry-3.2.0/src/phonometry/psychoacoustics/loudness_ecma.py +586 -0
  90. phonometry-3.2.0/src/phonometry/psychoacoustics/loudness_moore_glasberg.py +930 -0
  91. phonometry-3.2.0/src/phonometry/psychoacoustics/loudness_moore_glasberg_time.py +707 -0
  92. phonometry-3.2.0/src/phonometry/psychoacoustics/loudness_zwicker.py +732 -0
  93. phonometry-3.2.0/src/phonometry/psychoacoustics/psychoacoustic_annoyance.py +200 -0
  94. phonometry-3.2.0/src/phonometry/psychoacoustics/roughness_ecma.py +525 -0
  95. phonometry-3.2.0/src/phonometry/psychoacoustics/sharpness.py +188 -0
  96. phonometry-3.2.0/src/phonometry/psychoacoustics/tonality.py +351 -0
  97. phonometry-3.2.0/src/phonometry/psychoacoustics/tonality_ecma.py +377 -0
  98. phonometry-3.2.0/src/phonometry/psychoacoustics/tone_audibility.py +842 -0
  99. phonometry-3.2.0/src/phonometry/room/__init__.py +85 -0
  100. phonometry-3.2.0/src/phonometry/room/enclosed_space_absorption.py +288 -0
  101. phonometry-3.2.0/src/phonometry/room/open_plan.py +200 -0
  102. phonometry-3.2.0/src/phonometry/room/reverberation_prediction.py +527 -0
  103. phonometry-3.2.0/src/phonometry/room/room_acoustics.py +521 -0
  104. phonometry-3.2.0/src/phonometry/room/room_ir.py +533 -0
  105. phonometry-3.2.0/src/phonometry/room/room_noise.py +294 -0
  106. phonometry-3.2.0/src/phonometry/underwater/__init__.py +118 -0
  107. phonometry-3.2.0/src/phonometry/underwater/acoustics.py +157 -0
  108. phonometry-3.2.0/src/phonometry/underwater/numerical_propagation.py +474 -0
  109. phonometry-3.2.0/src/phonometry/underwater/ocean_ambient_noise.py +170 -0
  110. phonometry-3.2.0/src/phonometry/underwater/pile_driving_noise.py +153 -0
  111. phonometry-3.2.0/src/phonometry/underwater/propagation.py +240 -0
  112. phonometry-3.2.0/src/phonometry/underwater/seabed_reflection.py +151 -0
  113. phonometry-3.2.0/src/phonometry/underwater/ship_radiated_noise.py +195 -0
  114. phonometry-3.2.0/src/phonometry/underwater/ship_traffic_noise.py +213 -0
  115. phonometry-3.2.0/src/phonometry/underwater/sonar_equation.py +186 -0
  116. phonometry-3.2.0/src/phonometry/underwater/sound_speed.py +264 -0
  117. phonometry-3.2.0/src/phonometry/vibration/__init__.py +140 -0
  118. phonometry-3.2.0/src/phonometry/vibration/human_vibration.py +853 -0
  119. phonometry-3.2.0/src/phonometry/vibration/mechanical_mobility.py +262 -0
  120. phonometry-3.2.0/src/phonometry/vibration/multiple_shock_vibration.py +436 -0
  121. phonometry-3.2.0/src/phonometry/vibration/transfer_stiffness.py +255 -0
  122. phonometry-3.2.0/src/phonometry.egg-info/PKG-INFO +160 -0
  123. phonometry-3.2.0/src/phonometry.egg-info/SOURCES.txt +149 -0
  124. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_advanced.py +25 -25
  125. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_audio_processing.py +2 -2
  126. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_basic.py +14 -14
  127. phonometry-3.2.0/tests/test_conformance_report.py +216 -0
  128. phonometry-3.2.0/tests/test_deprecated_aliases.py +390 -0
  129. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_errors_and_edge_cases.py +12 -12
  130. phonometry-3.2.0/tests/test_golden_baseline.py +53 -0
  131. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_graph_measurements.py +1 -1
  132. phonometry-3.2.0/tests/test_impact_insulation.py +280 -0
  133. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_matplotlib_backend.py +2 -2
  134. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_multichannel.py +4 -4
  135. phonometry-3.2.0/tests/test_multichannel_rejection.py +31 -0
  136. phonometry-3.2.0/tests/test_package_architecture.py +134 -0
  137. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_parametric_filters.py +33 -15
  138. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_performance.py +15 -10
  139. phonometry-3.2.0/tests/test_result_plots.py +893 -0
  140. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_zero_phase.py +15 -0
  141. phonometry-3.0.0/LICENSE +0 -674
  142. phonometry-3.0.0/PKG-INFO +0 -126
  143. phonometry-3.0.0/README.md +0 -96
  144. phonometry-3.0.0/VERSION +0 -1
  145. phonometry-3.0.0/src/phonometry/__init__.py +0 -248
  146. phonometry-3.0.0/src/phonometry/calibration.py +0 -98
  147. phonometry-3.0.0/src/phonometry/compliance.py +0 -203
  148. phonometry-3.0.0/src/phonometry.egg-info/PKG-INFO +0 -126
  149. phonometry-3.0.0/src/phonometry.egg-info/SOURCES.txt +0 -45
  150. phonometry-3.0.0/tests/test_calibration_validation.py +0 -75
  151. phonometry-3.0.0/tests/test_compliance.py +0 -96
  152. phonometry-3.0.0/tests/test_filter_design.py +0 -171
  153. phonometry-3.0.0/tests/test_iec_compliance.py +0 -141
  154. phonometry-3.0.0/tests/test_iec_weighting_table3.py +0 -94
  155. phonometry-3.0.0/tests/test_levels.py +0 -297
  156. phonometry-3.0.0/tests/test_nominal_frequencies.py +0 -139
  157. phonometry-3.0.0/tests/test_parametric.py +0 -313
  158. phonometry-3.0.0/tests/test_signal_theory_limits.py +0 -139
  159. phonometry-3.0.0/tests/test_stateful_octave_filter_bank.py +0 -120
  160. phonometry-3.0.0/tests/test_stateful_weighting_filter.py +0 -117
  161. {phonometry-3.0.0 → phonometry-3.2.0}/MANIFEST.in +0 -0
  162. {phonometry-3.0.0 → phonometry-3.2.0}/setup.cfg +0 -0
  163. {phonometry-3.0.0/src/phonometry → phonometry-3.2.0/src/phonometry/_internal}/utils.py +0 -0
  164. {phonometry-3.0.0 → phonometry-3.2.0}/src/phonometry/_version.py +0 -0
  165. {phonometry-3.0.0 → phonometry-3.2.0}/src/phonometry/py.typed +0 -0
  166. {phonometry-3.0.0 → phonometry-3.2.0}/src/phonometry.egg-info/dependency_links.txt +0 -0
  167. {phonometry-3.0.0 → phonometry-3.2.0}/src/phonometry.egg-info/requires.txt +0 -0
  168. {phonometry-3.0.0 → phonometry-3.2.0}/src/phonometry.egg-info/top_level.txt +0 -0
  169. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_packaging.py +0 -0
  170. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_spectrogram.py +0 -0
  171. {phonometry-3.0.0 → phonometry-3.2.0}/tests/test_utils.py +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020-2026 José M. Requena Plens
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,160 @@
1
+ Metadata-Version: 2.4
2
+ Name: phonometry
3
+ Version: 3.2.0
4
+ Summary: Acoustic measurement toolkit: fractional octave-band filters, A/C/Z and time weighting, and sound level metrology per IEC 61260-1 and IEC 61672-1.
5
+ Author-email: Jose Manuel Requena Plens <jmrplens@gmail.com>
6
+ Project-URL: Homepage, https://github.com/jmrplens/phonometry
7
+ Project-URL: Bug Tracker, https://github.com/jmrplens/phonometry/issues
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.13
10
+ Classifier: Programming Language :: Python :: 3.14
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
15
+ Classifier: Topic :: Scientific/Engineering :: Physics
16
+ Classifier: Typing :: Typed
17
+ Requires-Python: >=3.13
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: numpy>=2.4.4
21
+ Requires-Dist: scipy>=1.17.1
22
+ Provides-Extra: perf
23
+ Requires-Dist: numba>=0.65.1; extra == "perf"
24
+ Provides-Extra: plot
25
+ Requires-Dist: matplotlib>=3.10.9; extra == "plot"
26
+ Provides-Extra: full
27
+ Requires-Dist: numba>=0.65.1; extra == "full"
28
+ Requires-Dist: matplotlib>=3.10.9; extra == "full"
29
+ Dynamic: license-file
30
+
31
+ <!-- Package -->
32
+ [![PyPI version](https://img.shields.io/pypi/v/phonometry?logo=pypi&logoColor=white)](https://pypi.org/project/phonometry/)
33
+ [![Python versions](https://img.shields.io/pypi/pyversions/phonometry?logo=python&logoColor=white)](https://pypi.org/project/phonometry/)
34
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/jmrplens/phonometry/blob/main/LICENSE)
35
+
36
+ <!-- Quality -->
37
+ [![CI](https://github.com/jmrplens/phonometry/actions/workflows/python-app.yml/badge.svg)](https://github.com/jmrplens/phonometry/actions/workflows/python-app.yml)
38
+ [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=jmrplens_phonometry&metric=alert_status)](https://sonarcloud.io/summary/overall?id=jmrplens_phonometry)
39
+ [![codecov](https://codecov.io/gh/jmrplens/phonometry/branch/main/graph/badge.svg)](https://codecov.io/gh/jmrplens/phonometry)
40
+
41
+ <!-- Citation & support -->
42
+ [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.21215280-blue?logo=doi&logoColor=white)](https://doi.org/10.5281/zenodo.21215280)
43
+
44
+ # phonometry
45
+
46
+ > *phonometry* — the measurement of sound. Formerly published as **PyOctaveBand**.
47
+
48
+ Acoustic measurement toolkit for Python: fractional octave-band filter banks, frequency and time weighting, and sound level metrology — conformance-tested against **IEC 61260-1:2014 / ANSI S1.11-2004** (filters) and **IEC 61672-1:2013** (weighting and levels) class 1 tolerance limits.
49
+
50
+ <img src="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/images/filter_type_comparison.svg" alt="Magnitude response comparison of the five filter architectures for the 1 kHz octave band, with a zoom at the -3 dB crossover" width="80%">
51
+
52
+ ## ✨ Highlights
53
+
54
+ - 🎛️ 1/1, 1/3 and arbitrary fractional octave filter banks (stable SOS + multirate decimation)
55
+ - 🏗️ Five architectures: Butterworth, Chebyshev I/II, Elliptic, Bessel — all with −3 dB points on the ANSI band edges
56
+ - 🔊 A/C/Z frequency weighting within IEC 61672-1 class 1 tolerances
57
+ - ⏱️ Fast/Slow/Impulse time ballistics, `Leq`, `LAeq` and `L10/L50/L90` statistical levels
58
+ - 🗺️ Octave spectrogram (band levels over time) and zero-phase offline filtering
59
+ - 🧠 Loudness in sones three ways: Zwicker (ISO 532-1 Annex B validated), Moore-Glasberg stationary & time-varying (ISO 532-2/3) and Sottek Hearing Model (ECMA-418-2); DIN 45692 sharpness, ISO 226:2023 contours
60
+ - 🎻 Sound-quality metrics: ECMA-418-2 tonality (tu_HMS) and roughness (asper)
61
+ - 🗣️ Speech Transmission Index: STI and STIPA per IEC 60268-16 Ed. 5, with signal generator
62
+ - 🎯 Tone prominence (TNR/PR, ECMA-418-1), environmental Lden/Ldn (ISO 1996-1), IEC 61252 noise dose
63
+ - ↗️ Two-microphone sound intensity (IEC 61043) with ISO 9614-1 field indicators
64
+ - 🏛️ Room & building acoustics: swept-sine/MLS impulse responses (ISO 18233), EDT/T20/T30/C50/C80/Ts (ISO 3382-1/2), open-plan speech metrics (ISO 3382-3), field airborne + impact + 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), flanking-transmission prediction of R′w/L′n,w (EN 12354-1/2), measurement uncertainty (ISO 12999-1), sound absorption (ISO 354)
65
+ - 🌬️ Outdoor propagation & occupational exposure: atmospheric absorption α(f) (ISO 9613-1), the ISO 9613-2 general method (divergence + atmospheric + ground + barrier terms) with a per-term octave-band breakdown, and daily noise exposure LEX,8h with task/job/full-day strategies and Annex C uncertainty (ISO 9612)
66
+ - 🔊 Sound power LW three ways: enveloping-surface pressure (ISO 3744/3746), reverberation-room precision with Waterhouse/C1/C2 (ISO 3741), intensity scanning with field indicators and grade (ISO 9614-2)
67
+ - 📏 Physical SPL calibration with IEC 60942:2017 stability validation, and dBFS modes
68
+ - ⚡ Vectorized multichannel processing and stateful block (real-time) workflows
69
+
70
+ ## 🚀 Installation
71
+
72
+ ```bash
73
+ pip install phonometry
74
+ ```
75
+
76
+ Optional extras: `phonometry[plot]` (matplotlib for response plots and result `.plot()` methods), `phonometry[perf]` (numba for faster impulse ballistics), `phonometry[full]` (both).
77
+
78
+ ## 📚 Documentation
79
+
80
+ **Full documentation website: https://jmrplens.github.io/phonometry/** (English / Español)
81
+
82
+ Or browse the Markdown docs on GitHub:
83
+
84
+ | Page | Contents |
85
+ | :--- | :--- |
86
+ | [Getting Started](https://github.com/jmrplens/phonometry/blob/main/docs/getting-started.md) | Installation, first analysis, WAV files |
87
+ | [Filter Banks](https://github.com/jmrplens/phonometry/blob/main/docs/filter-banks.md) | Architectures, response gallery, band decomposition, zero-phase |
88
+ | [Frequency Weighting](https://github.com/jmrplens/phonometry/blob/main/docs/weighting.md) | A/C/Z curves, class 1 high-accuracy mode |
89
+ | [Time Weighting](https://github.com/jmrplens/phonometry/blob/main/docs/time-weighting.md) | Fast/Slow/Impulse ballistics, initial state |
90
+ | [Levels](https://github.com/jmrplens/phonometry/blob/main/docs/levels.md) | Leq, LAeq, percentiles, LCpeak, SEL, noise dose (IEC 61252), Lden and rating levels (ISO 1996-1), octave spectrogram |
91
+ | [Occupational Exposure](https://github.com/jmrplens/phonometry/blob/main/docs/occupational-exposure.md) | ISO 9612 task-based, job-based and full-day strategies with the Annex C uncertainty budget (LEX,8h + U) |
92
+ | [Tone Prominence](https://github.com/jmrplens/phonometry/blob/main/docs/tone-prominence.md) | ECMA-418-1 tone-to-noise ratio and prominence ratio with frequency-dependent prominence criteria |
93
+ | [Psychoacoustics](https://github.com/jmrplens/phonometry/blob/main/docs/psychoacoustics.md) | Zwicker (ISO 532-1), Moore-Glasberg (ISO 532-2/3) and Sottek (ECMA-418-2) loudness, sharpness (DIN 45692), equal-loudness contours (ISO 226), tonality & roughness (ECMA-418-2) |
94
+ | [Speech Transmission](https://github.com/jmrplens/phonometry/blob/main/docs/speech-transmission.md) | STI/STIPA (IEC 60268-16): modulation transfer function, indirect method from impulse responses and direct STIPA measurement |
95
+ | [Speech Intelligibility Index](https://github.com/jmrplens/phonometry/blob/main/docs/speech-intelligibility.md) | SII (ANSI S3.5-1997): band importance, masking and audibility, the index in noise and hearing loss, standard vocal-effort spectra |
96
+ | [Electroacoustics](https://github.com/jmrplens/phonometry/blob/main/docs/electroacoustics.md) | Distortion (IEC 60268-3): THD, nth-order harmonic, THD+N & SINAD (AES17), SMPTE & CCIF intermodulation, DIM and weighted THD; frequency response & coherence (Bendat & Piersol H1/H2) |
97
+ | [Underwater Acoustics](https://github.com/jmrplens/phonometry/blob/main/docs/underwater-acoustics.md) | Reference levels re 1 µPa (SPL, SEL, peak; ISO 18405); ship radiated noise & equivalent monopole source level (ISO 17208); pile-driving single-strike, peak & cumulative SEL (ISO 18406) |
98
+ | [Underwater Sound Propagation](https://github.com/jmrplens/phonometry/blob/main/docs/underwater-propagation.md) | Transmission loss (geometrical spreading + volume absorption: Francois-Garrison, Ainslie-McColm, Thorp); speed of sound in sea water (UNESCO/Chen-Millero, Del Grosso, Mackenzie); passive & active sonar equation; seabed reflection loss (Rayleigh); ocean ambient noise (Wenz wind/thermal + JOMOPANS-ECHO ship traffic); numerical solvers (normal modes, ray tracing, parabolic equation) |
99
+ | [Aircraft Noise](https://github.com/jmrplens/phonometry/blob/main/docs/aircraft-noise.md) | Effective Perceived Noise Level (ICAO Annex 16): perceived noisiness & PNL, tone correction, 10 dB-down duration correction (EPNL); IEC 61265 measurement-system verification; SAE ARP 5534 one-third-octave-band atmospheric absorption; ECAC Doc 29 noise-power-distance (NPD) event-level interpolation |
100
+ | [Wind-Turbine Noise](https://github.com/jmrplens/phonometry/blob/main/docs/wind-turbine-noise.md) | Apparent sound power level referred to the rotor centre and tonal audibility (Zwicker critical band, masking-noise level, audibility criterion) — IEC 61400-11 |
101
+ | [Sound Intensity](https://github.com/jmrplens/phonometry/blob/main/docs/intensity.md) | Two-microphone p-p intensity (IEC 61043), ISO 9614-1 field indicators |
102
+ | [Room Acoustics](https://github.com/jmrplens/phonometry/blob/main/docs/room-acoustics.md) | Impulse responses (ISO 18233), room parameters (ISO 3382-1/2), open-plan metrics (ISO 3382-3), sound absorption (ISO 354) |
103
+ | [Building Acoustics](https://github.com/jmrplens/phonometry/blob/main/docs/building-acoustics.md) | Field airborne + impact + façade insulation and weighted ratings (ISO 16283-1/2/3, ISO 717-1/2), laboratory characterisation (ISO 10140), flanking-transmission prediction (EN 12354-1/2), measurement uncertainty (ISO 12999-1) |
104
+ | [Outdoor Sound Propagation](https://github.com/jmrplens/phonometry/blob/main/docs/outdoor-propagation.md) | Atmospheric absorption α(f) (ISO 9613-1) and the ISO 9613-2 general method: geometrical divergence, atmospheric absorption, ground effect, barrier screening and meteorological correction |
105
+ | [Sound Power](https://github.com/jmrplens/phonometry/blob/main/docs/sound-power.md) | Sound power level LW by enveloping surface (ISO 3744/3746), reverberation room (ISO 3741) and intensity scanning (ISO 9614-2) |
106
+ | [Calibration and dBFS](https://github.com/jmrplens/phonometry/blob/main/docs/calibration.md) | Physical SPL, digital full-scale, RMS vs peak |
107
+ | [Block Processing](https://github.com/jmrplens/phonometry/blob/main/docs/block-processing.md) | Stateful streaming workflows |
108
+ | [Multichannel](https://github.com/jmrplens/phonometry/blob/main/docs/multichannel.md) | Vectorized multichannel analysis, performance |
109
+ | [API Reference](https://github.com/jmrplens/phonometry/blob/main/docs/api-reference.md) | Every public function and class |
110
+ | [Theory](https://github.com/jmrplens/phonometry/blob/main/docs/theory.md) | Standards, math, design decisions |
111
+ | [Why phonometry](https://github.com/jmrplens/phonometry/blob/main/docs/why-phonometry.md) | IEC compliance verification vs other libraries |
112
+ | [Conformance report](https://github.com/jmrplens/phonometry/blob/main/docs/CONFORMANCE.md) | Live per-standard numerical validation (expected vs computed) regenerated by `make conformance` |
113
+
114
+ ## ⚡ Quick start
115
+
116
+ ```python
117
+ import numpy as np
118
+ from phonometry import octave_filter
119
+
120
+ fs = 48000
121
+ t = np.linspace(0, 1, fs, endpoint=False)
122
+ # Composite signal: 100Hz + 1000Hz
123
+ signal = np.sin(2 * np.pi * 100 * t) + np.sin(2 * np.pi * 1000 * t)
124
+
125
+ # Apply 1/3 octave filter bank
126
+ spl, freq = octave_filter(signal, fs=fs, fraction=3)
127
+
128
+ print(f"Bands: {freq}")
129
+ print(f"SPL [dB]: {spl}")
130
+ ```
131
+
132
+ Since 3.2 the library also exposes twelve domain namespaces (the flat API
133
+ above remains the primary surface):
134
+
135
+ ```python
136
+ from phonometry import building, underwater
137
+
138
+ r = building.airborne_insulation(...)
139
+ tl = underwater.transmission_loss(...)
140
+ ```
141
+
142
+ <img src="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/images/signal_response_fraction_3.svg" alt="One-third-octave spectrum analysis of a multi-tone signal with the raw PSD in the background" width="80%">
143
+
144
+ *1/3 Octave Band spectrum analysis of a complex signal. More examples in the
145
+ [documentation](https://jmrplens.github.io/phonometry/).*
146
+
147
+ ## 🧪 Development
148
+
149
+ ```bash
150
+ make install # dependencies + editable install
151
+ make check # ruff + mypy + bandit + tests
152
+ make graphs # regenerate documentation images
153
+ ```
154
+
155
+ See https://github.com/jmrplens/phonometry/blob/main/CONTRIBUTING.md and the
156
+ https://github.com/jmrplens/phonometry/blob/main/CHANGELOG.md
157
+
158
+ ## 📄 License
159
+
160
+ [MIT](https://github.com/jmrplens/phonometry/blob/main/LICENSE)
@@ -0,0 +1,130 @@
1
+ <!-- Package -->
2
+ [![PyPI version](https://img.shields.io/pypi/v/phonometry?logo=pypi&logoColor=white)](https://pypi.org/project/phonometry/)
3
+ [![Python versions](https://img.shields.io/pypi/pyversions/phonometry?logo=python&logoColor=white)](https://pypi.org/project/phonometry/)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/jmrplens/phonometry/blob/main/LICENSE)
5
+
6
+ <!-- Quality -->
7
+ [![CI](https://github.com/jmrplens/phonometry/actions/workflows/python-app.yml/badge.svg)](https://github.com/jmrplens/phonometry/actions/workflows/python-app.yml)
8
+ [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=jmrplens_phonometry&metric=alert_status)](https://sonarcloud.io/summary/overall?id=jmrplens_phonometry)
9
+ [![codecov](https://codecov.io/gh/jmrplens/phonometry/branch/main/graph/badge.svg)](https://codecov.io/gh/jmrplens/phonometry)
10
+
11
+ <!-- Citation & support -->
12
+ [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.21215280-blue?logo=doi&logoColor=white)](https://doi.org/10.5281/zenodo.21215280)
13
+
14
+ # phonometry
15
+
16
+ > *phonometry* — the measurement of sound. Formerly published as **PyOctaveBand**.
17
+
18
+ Acoustic measurement toolkit for Python: fractional octave-band filter banks, frequency and time weighting, and sound level metrology — conformance-tested against **IEC 61260-1:2014 / ANSI S1.11-2004** (filters) and **IEC 61672-1:2013** (weighting and levels) class 1 tolerance limits.
19
+
20
+ <img src="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/images/filter_type_comparison.svg" alt="Magnitude response comparison of the five filter architectures for the 1 kHz octave band, with a zoom at the -3 dB crossover" width="80%">
21
+
22
+ ## ✨ Highlights
23
+
24
+ - 🎛️ 1/1, 1/3 and arbitrary fractional octave filter banks (stable SOS + multirate decimation)
25
+ - 🏗️ Five architectures: Butterworth, Chebyshev I/II, Elliptic, Bessel — all with −3 dB points on the ANSI band edges
26
+ - 🔊 A/C/Z frequency weighting within IEC 61672-1 class 1 tolerances
27
+ - ⏱️ Fast/Slow/Impulse time ballistics, `Leq`, `LAeq` and `L10/L50/L90` statistical levels
28
+ - 🗺️ Octave spectrogram (band levels over time) and zero-phase offline filtering
29
+ - 🧠 Loudness in sones three ways: Zwicker (ISO 532-1 Annex B validated), Moore-Glasberg stationary & time-varying (ISO 532-2/3) and Sottek Hearing Model (ECMA-418-2); DIN 45692 sharpness, ISO 226:2023 contours
30
+ - 🎻 Sound-quality metrics: ECMA-418-2 tonality (tu_HMS) and roughness (asper)
31
+ - 🗣️ Speech Transmission Index: STI and STIPA per IEC 60268-16 Ed. 5, with signal generator
32
+ - 🎯 Tone prominence (TNR/PR, ECMA-418-1), environmental Lden/Ldn (ISO 1996-1), IEC 61252 noise dose
33
+ - ↗️ Two-microphone sound intensity (IEC 61043) with ISO 9614-1 field indicators
34
+ - 🏛️ Room & building acoustics: swept-sine/MLS impulse responses (ISO 18233), EDT/T20/T30/C50/C80/Ts (ISO 3382-1/2), open-plan speech metrics (ISO 3382-3), field airborne + impact + 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), flanking-transmission prediction of R′w/L′n,w (EN 12354-1/2), measurement uncertainty (ISO 12999-1), sound absorption (ISO 354)
35
+ - 🌬️ Outdoor propagation & occupational exposure: atmospheric absorption α(f) (ISO 9613-1), the ISO 9613-2 general method (divergence + atmospheric + ground + barrier terms) with a per-term octave-band breakdown, and daily noise exposure LEX,8h with task/job/full-day strategies and Annex C uncertainty (ISO 9612)
36
+ - 🔊 Sound power LW three ways: enveloping-surface pressure (ISO 3744/3746), reverberation-room precision with Waterhouse/C1/C2 (ISO 3741), intensity scanning with field indicators and grade (ISO 9614-2)
37
+ - 📏 Physical SPL calibration with IEC 60942:2017 stability validation, and dBFS modes
38
+ - ⚡ Vectorized multichannel processing and stateful block (real-time) workflows
39
+
40
+ ## 🚀 Installation
41
+
42
+ ```bash
43
+ pip install phonometry
44
+ ```
45
+
46
+ Optional extras: `phonometry[plot]` (matplotlib for response plots and result `.plot()` methods), `phonometry[perf]` (numba for faster impulse ballistics), `phonometry[full]` (both).
47
+
48
+ ## 📚 Documentation
49
+
50
+ **Full documentation website: https://jmrplens.github.io/phonometry/** (English / Español)
51
+
52
+ Or browse the Markdown docs on GitHub:
53
+
54
+ | Page | Contents |
55
+ | :--- | :--- |
56
+ | [Getting Started](https://github.com/jmrplens/phonometry/blob/main/docs/getting-started.md) | Installation, first analysis, WAV files |
57
+ | [Filter Banks](https://github.com/jmrplens/phonometry/blob/main/docs/filter-banks.md) | Architectures, response gallery, band decomposition, zero-phase |
58
+ | [Frequency Weighting](https://github.com/jmrplens/phonometry/blob/main/docs/weighting.md) | A/C/Z curves, class 1 high-accuracy mode |
59
+ | [Time Weighting](https://github.com/jmrplens/phonometry/blob/main/docs/time-weighting.md) | Fast/Slow/Impulse ballistics, initial state |
60
+ | [Levels](https://github.com/jmrplens/phonometry/blob/main/docs/levels.md) | Leq, LAeq, percentiles, LCpeak, SEL, noise dose (IEC 61252), Lden and rating levels (ISO 1996-1), octave spectrogram |
61
+ | [Occupational Exposure](https://github.com/jmrplens/phonometry/blob/main/docs/occupational-exposure.md) | ISO 9612 task-based, job-based and full-day strategies with the Annex C uncertainty budget (LEX,8h + U) |
62
+ | [Tone Prominence](https://github.com/jmrplens/phonometry/blob/main/docs/tone-prominence.md) | ECMA-418-1 tone-to-noise ratio and prominence ratio with frequency-dependent prominence criteria |
63
+ | [Psychoacoustics](https://github.com/jmrplens/phonometry/blob/main/docs/psychoacoustics.md) | Zwicker (ISO 532-1), Moore-Glasberg (ISO 532-2/3) and Sottek (ECMA-418-2) loudness, sharpness (DIN 45692), equal-loudness contours (ISO 226), tonality & roughness (ECMA-418-2) |
64
+ | [Speech Transmission](https://github.com/jmrplens/phonometry/blob/main/docs/speech-transmission.md) | STI/STIPA (IEC 60268-16): modulation transfer function, indirect method from impulse responses and direct STIPA measurement |
65
+ | [Speech Intelligibility Index](https://github.com/jmrplens/phonometry/blob/main/docs/speech-intelligibility.md) | SII (ANSI S3.5-1997): band importance, masking and audibility, the index in noise and hearing loss, standard vocal-effort spectra |
66
+ | [Electroacoustics](https://github.com/jmrplens/phonometry/blob/main/docs/electroacoustics.md) | Distortion (IEC 60268-3): THD, nth-order harmonic, THD+N & SINAD (AES17), SMPTE & CCIF intermodulation, DIM and weighted THD; frequency response & coherence (Bendat & Piersol H1/H2) |
67
+ | [Underwater Acoustics](https://github.com/jmrplens/phonometry/blob/main/docs/underwater-acoustics.md) | Reference levels re 1 µPa (SPL, SEL, peak; ISO 18405); ship radiated noise & equivalent monopole source level (ISO 17208); pile-driving single-strike, peak & cumulative SEL (ISO 18406) |
68
+ | [Underwater Sound Propagation](https://github.com/jmrplens/phonometry/blob/main/docs/underwater-propagation.md) | Transmission loss (geometrical spreading + volume absorption: Francois-Garrison, Ainslie-McColm, Thorp); speed of sound in sea water (UNESCO/Chen-Millero, Del Grosso, Mackenzie); passive & active sonar equation; seabed reflection loss (Rayleigh); ocean ambient noise (Wenz wind/thermal + JOMOPANS-ECHO ship traffic); numerical solvers (normal modes, ray tracing, parabolic equation) |
69
+ | [Aircraft Noise](https://github.com/jmrplens/phonometry/blob/main/docs/aircraft-noise.md) | Effective Perceived Noise Level (ICAO Annex 16): perceived noisiness & PNL, tone correction, 10 dB-down duration correction (EPNL); IEC 61265 measurement-system verification; SAE ARP 5534 one-third-octave-band atmospheric absorption; ECAC Doc 29 noise-power-distance (NPD) event-level interpolation |
70
+ | [Wind-Turbine Noise](https://github.com/jmrplens/phonometry/blob/main/docs/wind-turbine-noise.md) | Apparent sound power level referred to the rotor centre and tonal audibility (Zwicker critical band, masking-noise level, audibility criterion) — IEC 61400-11 |
71
+ | [Sound Intensity](https://github.com/jmrplens/phonometry/blob/main/docs/intensity.md) | Two-microphone p-p intensity (IEC 61043), ISO 9614-1 field indicators |
72
+ | [Room Acoustics](https://github.com/jmrplens/phonometry/blob/main/docs/room-acoustics.md) | Impulse responses (ISO 18233), room parameters (ISO 3382-1/2), open-plan metrics (ISO 3382-3), sound absorption (ISO 354) |
73
+ | [Building Acoustics](https://github.com/jmrplens/phonometry/blob/main/docs/building-acoustics.md) | Field airborne + impact + façade insulation and weighted ratings (ISO 16283-1/2/3, ISO 717-1/2), laboratory characterisation (ISO 10140), flanking-transmission prediction (EN 12354-1/2), measurement uncertainty (ISO 12999-1) |
74
+ | [Outdoor Sound Propagation](https://github.com/jmrplens/phonometry/blob/main/docs/outdoor-propagation.md) | Atmospheric absorption α(f) (ISO 9613-1) and the ISO 9613-2 general method: geometrical divergence, atmospheric absorption, ground effect, barrier screening and meteorological correction |
75
+ | [Sound Power](https://github.com/jmrplens/phonometry/blob/main/docs/sound-power.md) | Sound power level LW by enveloping surface (ISO 3744/3746), reverberation room (ISO 3741) and intensity scanning (ISO 9614-2) |
76
+ | [Calibration and dBFS](https://github.com/jmrplens/phonometry/blob/main/docs/calibration.md) | Physical SPL, digital full-scale, RMS vs peak |
77
+ | [Block Processing](https://github.com/jmrplens/phonometry/blob/main/docs/block-processing.md) | Stateful streaming workflows |
78
+ | [Multichannel](https://github.com/jmrplens/phonometry/blob/main/docs/multichannel.md) | Vectorized multichannel analysis, performance |
79
+ | [API Reference](https://github.com/jmrplens/phonometry/blob/main/docs/api-reference.md) | Every public function and class |
80
+ | [Theory](https://github.com/jmrplens/phonometry/blob/main/docs/theory.md) | Standards, math, design decisions |
81
+ | [Why phonometry](https://github.com/jmrplens/phonometry/blob/main/docs/why-phonometry.md) | IEC compliance verification vs other libraries |
82
+ | [Conformance report](https://github.com/jmrplens/phonometry/blob/main/docs/CONFORMANCE.md) | Live per-standard numerical validation (expected vs computed) regenerated by `make conformance` |
83
+
84
+ ## ⚡ Quick start
85
+
86
+ ```python
87
+ import numpy as np
88
+ from phonometry import octave_filter
89
+
90
+ fs = 48000
91
+ t = np.linspace(0, 1, fs, endpoint=False)
92
+ # Composite signal: 100Hz + 1000Hz
93
+ signal = np.sin(2 * np.pi * 100 * t) + np.sin(2 * np.pi * 1000 * t)
94
+
95
+ # Apply 1/3 octave filter bank
96
+ spl, freq = octave_filter(signal, fs=fs, fraction=3)
97
+
98
+ print(f"Bands: {freq}")
99
+ print(f"SPL [dB]: {spl}")
100
+ ```
101
+
102
+ Since 3.2 the library also exposes twelve domain namespaces (the flat API
103
+ above remains the primary surface):
104
+
105
+ ```python
106
+ from phonometry import building, underwater
107
+
108
+ r = building.airborne_insulation(...)
109
+ tl = underwater.transmission_loss(...)
110
+ ```
111
+
112
+ <img src="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/images/signal_response_fraction_3.svg" alt="One-third-octave spectrum analysis of a multi-tone signal with the raw PSD in the background" width="80%">
113
+
114
+ *1/3 Octave Band spectrum analysis of a complex signal. More examples in the
115
+ [documentation](https://jmrplens.github.io/phonometry/).*
116
+
117
+ ## 🧪 Development
118
+
119
+ ```bash
120
+ make install # dependencies + editable install
121
+ make check # ruff + mypy + bandit + tests
122
+ make graphs # regenerate documentation images
123
+ ```
124
+
125
+ See https://github.com/jmrplens/phonometry/blob/main/CONTRIBUTING.md and the
126
+ https://github.com/jmrplens/phonometry/blob/main/CHANGELOG.md
127
+
128
+ ## 📄 License
129
+
130
+ [MIT](https://github.com/jmrplens/phonometry/blob/main/LICENSE)
@@ -0,0 +1 @@
1
+ 3.2.0
@@ -57,6 +57,7 @@ exclude_dirs = ["tests", ".venv"]
57
57
  relative_files = true
58
58
 
59
59
  [tool.pytest.ini_options]
60
+ pythonpath = ["tests"]
60
61
  filterwarnings = [
61
62
  "ignore:Low sampling rate:UserWarning",
62
63
  ]