Metadata-Version: 2.4
Name: phonometry
Version: 4.0.0
Summary: Acoustic measurement, analysis and prediction for Python: levels and metrology, psychoacoustics, rooms and buildings, materials, vibration, environmental, aircraft and underwater acoustics, each implemented from its governing standard.
Author-email: José Manuel Requena Plens <mail@jmrp.io>
License-Expression: MIT
Project-URL: Homepage, https://docs.jmrp.io/phonometry/
Project-URL: Author, https://jmrp.io/
Project-URL: Documentation, https://docs.jmrp.io/phonometry/
Project-URL: Source, https://github.com/jmrplens/phonometry
Project-URL: Changelog, https://github.com/jmrplens/phonometry/blob/main/CHANGELOG.md
Project-URL: Bug Tracker, https://github.com/jmrplens/phonometry/issues
Project-URL: DOI, https://doi.org/10.5281/zenodo.21215280
Keywords: acoustics,sound level meter,sound level,octave band,fractional octave band,octave filter bank,frequency weighting,signal processing,psychoacoustics,loudness,sharpness,roughness,room acoustics,reverberation time,sound absorption,sound insulation,building acoustics,sound power,vibration,human vibration exposure,environmental noise,aircraft noise,underwater acoustics,electroacoustics,loudspeaker measurement,broadcast loudness,noise control,acoustic metrology,standards conformance,ANSI S1.11,IEC 61260-1,IEC 61672-1,IEC 60942,IEC 60268-3,ISO 226,ISO 532-1,ISO 354,ISO 3382-1,ISO 717-1,ISO 16283-1,EN 12354,ISO 1996-1,ISO 9613-2,ISO 2631-1,ISO 7196,ECMA-418-1,EBU R 128,ITU-R BS.1770,ICAO Annex 16
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Typing :: Typed
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.0.2; python_version < "3.13"
Requires-Dist: numpy>=2.1.0; python_version == "3.13"
Requires-Dist: numpy>=2.3.2; python_version >= "3.14"
Requires-Dist: scipy>=1.14.0; python_version < "3.13"
Requires-Dist: scipy>=1.14.1; python_version == "3.13"
Requires-Dist: scipy>=1.16.1; python_version >= "3.14"
Provides-Extra: perf
Requires-Dist: numba>=0.60.0; python_version < "3.13" and extra == "perf"
Requires-Dist: numba>=0.61.0; python_version == "3.13" and extra == "perf"
Requires-Dist: numba>=0.63.0; python_version >= "3.14" and extra == "perf"
Provides-Extra: plot
Requires-Dist: matplotlib>=3.10.7; extra == "plot"
Provides-Extra: report
Requires-Dist: reportlab>=4.3.0; extra == "report"
Requires-Dist: svglib!=1.4.0,>=0.9.1; extra == "report"
Provides-Extra: audio
Requires-Dist: soundfile>=0.12.0; extra == "audio"
Provides-Extra: torch
Requires-Dist: torch>=2.3.0; python_version < "3.13" and extra == "torch"
Requires-Dist: torch>=2.5.0; python_version == "3.13" and extra == "torch"
Requires-Dist: torch>=2.9.0; python_version >= "3.14" and extra == "torch"
Requires-Dist: array-api-compat>=1.5.1; extra == "torch"
Provides-Extra: full
Requires-Dist: numba>=0.60.0; python_version < "3.13" and extra == "full"
Requires-Dist: numba>=0.61.0; python_version == "3.13" and extra == "full"
Requires-Dist: numba>=0.63.0; python_version >= "3.14" and extra == "full"
Requires-Dist: matplotlib>=3.10.7; extra == "full"
Requires-Dist: reportlab>=4.3.0; extra == "full"
Requires-Dist: svglib!=1.4.0,>=0.9.1; extra == "full"
Requires-Dist: soundfile>=0.12.0; extra == "full"
Dynamic: license-file

<!-- AUTO-GENERATED FILE - DO NOT EDIT BY HAND.
  PyPI long description derived from README.md by
  scripts/generate_pypi_readme.py (make pypi-readme): every picture
  element collapses to its light-theme img fallback and animated
  clips to their poster stills, because PyPI's readme renderer
  strips the picture and source tags, and every link into this
  repository is pinned to the release tag, because a published
  description is frozen while main keeps moving. Edit README.md
  instead, and follow its links rather than these: between
  releases the pin names the last release, whose tree predates
  these paths, so they do not resolve from main. -->

<a href="https://docs.jmrp.io/phonometry/"><img src="https://raw.githubusercontent.com/jmrplens/phonometry/v4.0.0/.github/brand/banner.webp" alt="phonometry, acoustic measurement toolkit for Python" width="100%"></a>

<!-- Package -->
[![PyPI version](https://img.shields.io/pypi/v/phonometry?logo=pypi&logoColor=white)](https://pypi.org/project/phonometry/)
[![Python versions](https://img.shields.io/pypi/pyversions/phonometry?logo=python&logoColor=white)](https://pypi.org/project/phonometry/)
[![PyPI downloads](https://img.shields.io/pypi/dm/phonometry?logo=pypi&logoColor=white)](https://pypistats.org/packages/phonometry)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/jmrplens/phonometry/blob/v4.0.0/LICENSE)

<!-- Quality -->
[![CI](https://github.com/jmrplens/phonometry/actions/workflows/python-app.yml/badge.svg)](https://github.com/jmrplens/phonometry/actions/workflows/python-app.yml)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=jmrplens_phonometry&metric=alert_status)](https://sonarcloud.io/summary/overall?id=jmrplens_phonometry)
[![codecov](https://codecov.io/gh/jmrplens/phonometry/branch/main/graph/badge.svg)](https://app.codecov.io/gh/jmrplens/phonometry)

<!-- Citation & support -->
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.21215280-blue?logo=doi&logoColor=white)](https://doi.org/10.5281/zenodo.21215280)

# phonometry

> *phonometry*, the measurement of sound. Formerly published as **PyOctaveBand**.

Acoustic measurement toolkit for Python, from fractional octave-band filters,
weighting and sound level metrology to psychoacoustics, rooms and buildings,
materials, vibration, environmental, aircraft and underwater acoustics,
electroacoustics and wave simulation. Every metric is implemented from its
governing standard and numerically checked against it: the auto-generated
[conformance report](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/CONFORMANCE.md)
runs 1899 conformance checks across 111 domains, against
230 normative designations and 121 further published sources, each pinning an
expected normative value to the value the library computes, and CI regenerates
it on every pull request. Filters meet the class 1 mask of
**IEC 61260-1:2014 / ANSI S1.11-2004**, and the octave and one-third-octave
banks are class 1 on every requirement the 2014 edition grades on a design.
Weightings and levels are class 1 per
**IEC 61672-1:2013**.

<a href="https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/CONFORMANCE.md"><img src="https://raw.githubusercontent.com/jmrplens/phonometry/v4.0.0/.github/badges/conformance-summary.svg" alt="All 1899 conformance checks pass, across 111 domains, against 230 normative designations and 121 further published sources"></a>

<img src="https://raw.githubusercontent.com/jmrplens/phonometry-assets/a6e56d3504d9485e4e0402fa87ad71260ed8d924/images/anim_fdtd_pillar_hall_poster.webp" alt="An 800 Hz plane wavefront sweeps through a hall of rigid columns in a 2D FDTD simulation; every column diffracts the front and the scattered wavelets interfere until the whole hall is filled" width="100%">

*An 800 Hz wavefront threading a hall of columns, computed with the library's
own [2D FDTD engine](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/simulation/fdtd-simulation.md)
(`phonometry.simulation`) and rendered by the same script that generates every
figure in the documentation.*

## 🚀 Installation

```bash
pip install phonometry
```

If phonometry 3.x is already installed, upgrade it with
`pip install -U phonometry`, naming the extras you use
(`pip install -U "phonometry[full]"` for all four where `[full]` installs);
3.x has a different import layout and `from phonometry import filters` fails
on it. Code written for 3.x needs changes to run on 4.x; the
[upgrade guide](https://docs.jmrp.io/phonometry/start/upgrading/) maps each of
them.

phonometry needs Python 3.12 or newer, with NumPy 2.0.2 and SciPy 1.14.0
or later. Each of those floors, and each floor of the extras, is the oldest
release the library's tests pass with, and a CI job installs exactly those
releases on Python 3.12 to keep it so: matplotlib 3.10.7 for `[plot]`,
reportlab 4.3.0 and svglib 0.9.1 (but not 1.4.0) for `[report]`, numba
0.60.0 for `[perf]`, python-soundfile 0.12.0 for `[audio]` and torch 2.3.0
with array-api-compat 1.5.1 for `[torch]`. Python 3.13 and 3.14 have floors
of their own for NumPy, SciPy, numba and torch, whose oldest releases have no
wheel for them: the oldest releases that do, which the same job installs on
each, on Python 3.13 NumPy 2.1.0, SciPy 1.14.1, numba 0.61.0 and torch 2.5.0,
and on Python 3.14 NumPy 2.3.2, SciPy 1.16.1, numba 0.63.0 and torch 2.9.0.
The Python 3.13 wheel of torch 2.5.0 is for Linux on x86-64 only, where the
job runs; on macOS on ARM, Windows on x86-64 and Linux on ARM the first is
torch 2.6.0, the oldest that installs there.

Windows on ARM, Linux with musl, macOS on Intel and 32-bit Windows have no
wheel at some of those floors, and pip held to them builds those releases from
source there, which takes compilers. On Windows on ARM the first wheels are
NumPy 2.3.0, SciPy 1.16.2 and numba 0.68.0 (0.67.0 on Python 3.14), so every
floor of the three but NumPy's on Python 3.14 is built. On Linux with musl, as
in Alpine, the first SciPy wheel on ARM for Python 3.12 and 3.13 is 1.15.2,
matplotlib publishes no wheel for musl on ARM at all, so `[plot]` builds it
there, and numba, with the llvmlite it needs, publishes no musl wheel at all,
so `[perf]` builds from source on any musl system. On macOS on Intel numba
publishes no wheel from 0.63.0 on, nor llvmlite from 0.46.0 on, and numba no
longer tests that platform, which it leaves to community support, so `[perf]`
builds both at the floor of Python 3.14; their last wheels there, numba 0.62.1
and llvmlite 0.45.1, are for Python 3.12 and 3.13. On 32-bit Windows NumPy has
a wheel at every floor, but the last SciPy wheel there is 1.9.1, for Python
3.9 at most, so even a plain install builds SciPy there on every Python, and
SciPy's own build warns there to install a 64-bit Python. matplotlib has
published no 32-bit Windows wheel since 3.8.0, nor kiwisolver, which it needs,
since 1.4.8, so `[plot]` builds both there. numba stopped supporting 32-bit
Windows at 0.58.0, below the floor of `[perf]`, and its last wheels there,
numba 0.57.1 and llvmlite 0.41.1, are for Python 3.10 at most, so `[perf]` is
not supported there, nor `[full]`, which holds it;
`pip install "phonometry[plot,report,audio]"` installs the other three extras
there. The same holds on 32-bit Linux, where numba's last wheels, of 0.56.4,
are for Python 3.10 at most and numba supports the platform no longer; [Docker
and servers](https://docs.jmrp.io/phonometry/start/environments/docker/) says
what the other three build there. A plain install takes the newest releases,
which have wheels on the other three platforms but numba's on musl and on
macOS on Intel, where a plain `[perf]` install builds numba and llvmlite on
every Python, and matplotlib's on ARM with musl. PyPI has no torch wheel for
any of the four, the last for macOS on Intel being 2.2.2, older than every
floor, and none ever for 32-bit Windows, and torch publishes no source
distribution, so `[torch]` does not install on them from PyPI. On Windows on
ARM PyTorch's CPU index has torch wheels for Python 3.12, from 2.7.0, and
3.13, from 2.8.0, so installing torch from it first, as below, brings
`[torch]` there; it has none for Python 3.14 there, none for Linux with musl
or 32-bit Windows, and for macOS on Intel none after 2.2.2, as on PyPI.
python-soundfile, for `[audio]`, publishes no wheel that carries libsndfile
for Linux with musl, nor at its floor 0.12.0 for Linux on ARM, whose first is
0.13.0, or for Windows on ARM, whose first is 0.14.0, so pip installs its
pure-Python wheel there, which loads the system's libsndfile: on Alpine
`apk add libsndfile-dev`, since the Python of the official Docker image finds
that library only under the name `libsndfile.so`, which that package adds.

Optional extras: `phonometry[plot]` (matplotlib for response plots and result
`.plot()` methods), `phonometry[perf]` (numba for faster impulse ballistics),
`phonometry[report]` (reportlab and svglib, so result `.report()` methods can
render normative PDF fiches, whose figure panel also needs matplotlib),
`phonometry[audio]` (python-soundfile, so `phonometry.io` also reads FLAC,
AIFF, Ogg/Opus, MP3 and compressed WAV), `phonometry[full]` (all of the
above), and `phonometry[torch]` (torch and array-api-compat, so the FDTD
engines of `phonometry.simulation` run on PyTorch, on a CPU, an NVIDIA GPU or
Apple's MPS; `[full]` leaves it out, since the torch wheels PyPI serves on
Linux bring gigabytes of CUDA libraries). On a Linux machine without an NVIDIA
GPU, run `pip install torch --index-url https://download.pytorch.org/whl/cpu`
before `pip install "phonometry[torch]"`: torch then comes from PyTorch's CPU
index and those libraries stay out.

I recommend `pip install "phonometry[full]"`: it brings matplotlib, numba,
reportlab, svglib and soundfile in one go, so every feature of the library is
enabled except the torch backend of the FDTD engines, which `[torch]` adds. On
32-bit Windows and 32-bit Linux, which `[full]` does not support,
`pip install "phonometry[plot,report,audio]"` brings the other three, as
above, and builds from source SciPy, matplotlib and kiwisolver on Windows, and
NumPy, SciPy, matplotlib and Pillow among others on Linux. The
base install computes every metric on NumPy and SciPy alone: it includes
reading every linear measurement WAV (24-bit, multichannel EXTENSIBLE, RF64)
through `phonometry.io`; the only things it leaves unavailable are the figures
(`.plot()` and the filter response plots), the normative PDF fiches
(`.report()`), the compiled kernel that speeds up the `impulse` time weighting,
the other audio formats (FLAC, AIFF, Ogg/Opus, MP3 and compressed WAV), and the
torch backend of the FDTD engines (which run on NumPy either way, and on an
NVIDIA GPU once CuPy is installed). One licensing note on `[audio]`: it
installs python-soundfile, whose wheel bundles libsndfile under the LGPL-2.1
(dynamically linked), and which loads the system's libsndfile where no wheel
carries one, as above; the base install deliberately stays free of it.

One caveat about `[full]`: numba is the only extra that caps NumPy, and it
raises that cap only once it supports a new NumPy minor. So in the weeks after
a NumPy minor release, `phonometry[full]` (like `phonometry[perf]`) can resolve
one minor behind what a plain install gets. numba only makes the `impulse` time
weighting faster, so if you need the newest NumPy the day it ships, install
`phonometry[plot,report]` and leave `[perf]` out.

## ⚡ Quick start

```python
import numpy as np
from phonometry import filters

fs = 48000
t = np.linspace(0, 1, fs, endpoint=False)
# Composite signal: 100Hz + 1000Hz
signal = np.sin(2 * np.pi * 100 * t) + np.sin(2 * np.pi * 1000 * t)

# Apply 1/3 octave filter bank
result = filters.octave_filter(signal, fs=fs, fraction=3)

print(f"Bands: {result.frequencies}")
print(f"SPL [dB]: {result.levels}")
```

<img src="https://raw.githubusercontent.com/jmrplens/phonometry/v4.0.0/.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%">

*1/3 octave band spectrum analysis of a complex signal. More examples in the
[documentation](https://docs.jmrp.io/phonometry/).*

## ✨ What's inside

The library is organized into domain namespaces, and a function is reached
through the one that owns it. Reading the domain at the call site is the point:
two packages can hold a `transmission_loss` without either being renamed, and
the line says which one it means.

```python
from phonometry import building, underwater

r = building.airborne_insulation(...)
pl = underwater.propagation_loss(...)
```

| Namespace | Coverage |
| :--- | :--- |
| `filters` | 1/1, 1/3 and arbitrary fractional octave filter banks (stable SOS + multirate decimation) in five architectures with per-band class verdicts (IEC 61260-1 / ANSI S1.11); A/C/Z weighting within IEC 61672-1 class 1 tolerances plus G weighting (ISO 7196); Fast/Slow/Impulse ballistics; octave spectrogram and zero-phase filtering; RBJ parametric equalizer sections |
| `signals` | Leq, SEL, L10/L50/L90 and noise dose (IEC 61252); calibrated Welch PSD/CSD with chi-square confidence intervals, coherent output spectrum, 1/n-octave smoothing and colored-noise generators (Bendat & Piersol); MISO multiple/partial coherence; correlation and GCC time-delay estimation (Knapp & Carter); Hilbert envelope, cepstrum and echoes, time synchronous averaging, calibrated STFT and zoom FFT; regularized inverse filtering for system measurement; IEC 60268-1 tone bursts and resampling |
| `metrology` | Physical SPL calibration with IEC 60942 stability validation and dBFS modes; GUM uncertainty with Monte Carlo (ISO/IEC Guide 98-3 and Supplement 1); Bendat & Piersol data qualification (stationarity, trends, level crossings, peak statistics); IEC 61043 intensity-instrument class verification |
| `io` | Files. Measurement audio: every linear WAV a meter writes (PCM at any depth, EXTENSIBLE, RF64/BW64) read into a calibrated `Signal` with its `bext` provenance (EBU Tech 3285); headers-only `info()`; block streaming into the stateful filters; BWF writing with exact codes, loud clipping, optional TPDF dither and measured R 128 loudness; the calibration sidecar; lossless conversion to and from FLAC with provenance intact. Catalogues of materials of your own: a data sheet or a test report read from a JSON file or a spreadsheet saved as CSV, with its provenance, into the rows every published catalogue hands out, and written back |
| `psychoacoustics` | Loudness in sones three ways: Zwicker (ISO 532-1 Annex B validated), Moore-Glasberg stationary and time-varying (ISO 532-2/3) and Sottek Hearing Model (ECMA-418-2); DIN 45692 sharpness; ECMA-418-2 tonality, roughness (asper) and fluctuation strength (vacil_HMS); tone prominence TNR/PR (ECMA-418-1); tonal audibility (ISO/PAS 20065); Fastl & Zwicker psychoacoustic annoyance; ISO 226:2023 contours |
| `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` | 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), service-equipment and activity noise by the engineering method (ISO 16032, from the ISO/DIS 16032:2023 draft), 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` | Absorbers: 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 models (Delany-Bazley, Miki, JCA, TMM with MPP and membranes), Biot poroelasticity and slow-sound metamaterial absorbers at critical coupling. Diffusers: scattering and diffusion coefficients (ISO 17497-1/2), Schroeder diffuser design and far-field prediction, deep-subwavelength metadiffusers. Surfaces: in-situ road-surface absorption (ISO 13472-1/2). Resilient: dynamic stiffness of layers under floating floors (EN 29052-1) |
| `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) and the discrete-point power summation of ISO 9614-1; two-microphone p-p intensity (IEC 61043); 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 |
| `aircraft` | EPNL certification chain (ICAO Annex 16) with IEC 61265 verification and SAE ARP 5534 absorption; airport noise contours (ECAC Doc 29) with the EASA ANP fleet database; rotorcraft hemisphere method (ECAC Doc 32) |
| `underwater` | Levels re 1 µPa (ISO 18405); ship radiated noise (ISO 17208-1/2); pile driving (ISO 18406); ship-traffic source levels (JOMOPANS-ECHO) and Wenz ambient noise; sonar equation and detection range; sound speed and seabed reflection; propagation loss from spreading laws and Weston's shallow-water regimes to normal-mode, ray, Gaussian-beam and parabolic-equation solvers; marine-mammal audiograms and regulatory auditory weighting (NMFS 2024/2018, Southall et al. 2019) |
| `vibration` | Human vibration: weightings (ISO 8041-1), whole-body metrics and buildings (ISO 2631-1/2), multiple shocks (ISO 2631-5), hand-arm and A(8) (ISO 5349); mobility and the FRF family (ISO 7626); isolator transfer stiffness (ISO 10846); plate-junction transmission and Kij; radiation efficiency and point mobilities |
| `electroacoustics` | Distortion per IEC 60268-3: THD, THD+N and SINAD (AES17), SMPTE/CCIF intermodulation and DIM; swept-sine harmonic separation and THD(f) (Farina, Novak synchronized sweep); frequency response and coherence; rigid-piston radiation; loudspeaker and microphone rated characteristics (IEC 60268-5/-4) |
| `noise_control` | Reactive silencers by the four-pole transmission-matrix method; HVAC duct elements and flow noise; machine enclosures |
| `broadcast` | ITU-R BS.1770-5 programme loudness and true peak in dBTP; EBU R 128 with the Tech 3341 EBU Mode meters and Tech 3342 loudness range, validated against the official EBU signals |
| `simulation` | Deterministic 2D acoustic FDTD with sources, probes, rasterised obstacles and rigid/impedance/absorbing boundaries; elastic P-SV solver with free surfaces and fluid-solid interfaces; near-to-far-field transform |

Cross-cutting, everywhere in the library:

- 📄 Typed, frozen result dataclasses with `.plot(language="en"|"es")`
  figures, and normative `.report()` PDF fiches for the metrics with a
  standardized reporting format (ISO 717, ISO 11654, ISO 532-1, EBU R 128,
  ICAO EPNL, IEC 61260-1, ISO 4871, IEC 60268-5/-4)
- ⚡ Vectorized multichannel processing and stateful block (real-time)
  workflows
- 🌐 Documentation fully in English and Spanish

<img src="https://raw.githubusercontent.com/jmrplens/phonometry/v4.0.0/.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%">

*The five filter architectures on the 1 kHz octave band, with the −3 dB
points on the ANSI band edges.*

## 📚 Documentation

**Full documentation website: https://docs.jmrp.io/phonometry/**
(English / Español)

The English guides are also browsable as Markdown in
[docs/](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/README.md),
written from the same pages; a map of where to start:

| Area | Guides |
| :--- | :--- |
| Getting started | [Getting Started](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/start/getting-started.md) · [Build a sound level meter](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/sound-level-meter.md) · [Calibration and dBFS](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/metrology/calibration.md) |
| Filters, levels & weighting | [Filter Banks](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/filters/filter-banks.md) · [Filter Gallery](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/filters/filter-gallery.md) · [Levels](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/levels/levels.md) · [Environmental Levels](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/environment/assessment/environmental-levels.md) · [Spanish Noise Regulation](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/environment/assessment/spanish-noise-regulation.md) · [Frequency Weighting](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/levels/weighting.md) · [Special Weightings](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/levels/special-weightings.md) · [Time Weighting](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/levels/time-weighting.md) · [Block Processing](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/filters/block-processing.md) · [Multichannel](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/filters/multichannel.md) |
| Signal analysis | [Calibrated spectral analysis](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/spectra/spectral-analysis.md) · [Correlation, time delay & envelope](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/spectra/correlation-delay.md) · [Time-frequency analysis](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/spectra/time-frequency.md) · [System measurement](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/spectra/system-measurement.md) · [Measurement uncertainty](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/metrology/gum-uncertainty.md) |
| Psychoacoustics & sound quality | [Loudness](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/psychoacoustics/loudness.md) · [Advanced Loudness](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/psychoacoustics/advanced-loudness.md) · [Sound Quality Metrics](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/psychoacoustics/sound-quality.md) · [Tone Prominence](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/psychoacoustics/tone-prominence.md) · [Psychoacoustic annoyance](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/psychoacoustics/psychoacoustic-annoyance.md) |
| Speech & hearing | [Speech Transmission Index](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/speech/speech-transmission.md) · [Speech Intelligibility Index](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/speech/speech-intelligibility.md) · [Objective intelligibility](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/speech/objective-intelligibility.md) · [Noise-induced hearing loss](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/hearing/noise-induced-hearing-loss.md) · [Occupational exposure](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/perception/hearing/occupational-exposure.md) |
| Rooms & buildings | [Room Acoustics](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/rooms/room-acoustics.md) · [Field Insulation](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/insulation/insulation-field.md) · [Low-Frequency Procedure (ISO 16283)](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/insulation/low-frequency-procedure.md) · [Laboratory Insulation](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/insulation/insulation-lab.md) · [Predicting Insulation (EN 12354)](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/design/insulation-prediction.md) · [Image Sources](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/rooms/room-image-sources.md) · [Impulse Response (ISO 18233)](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/rooms/room-impulse-response.md) · [Open-Plan Offices](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/rooms/open-plan-acoustics.md) · [Insulation Ratings (ISO 717)](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/insulation/insulation-ratings.md) · [Façade Insulation](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/insulation/facade-insulation.md) · [Spanish Building Code (CTE DB-HR)](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/insulation/spanish-building-code.md) · [Survey Method (ISO 10052)](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/insulation/insulation-survey.md) · [Insulation by Intensity](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/insulation/insulation-intensity.md) · [Impact Improvement](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/design/impact-improvement.md) · [Flanking (ISO 10848)](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/buildings/insulation/flanking-lab.md) |
| Materials & surfaces | [Porous Absorbers](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/materials/absorbers/porous-absorbers.md) · [Metamaterial Absorbers](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/materials/absorbers/metamaterial-absorbers.md) · [Diffusers](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/materials/diffusers/diffusers.md) · [Metadiffusers](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/materials/diffusers/metadiffusers.md) · [Impedance Tube](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/materials/absorbers/impedance-tube.md) · [Absorption Measurement](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/materials/absorbers/absorption-measurement.md) · [Airflow Resistance](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/materials/absorbers/airflow-resistance.md) · [Road Absorption](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/materials/surfaces/road-absorption.md) |
| Environment & outdoors | [Outdoor Propagation](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/environment/propagation/outdoor-propagation.md) · [CNOSSOS-EU Road Emission](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/environment/sources/cnossos-road-emission.md) · [Ground & Barriers](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/environment/propagation/ground-barriers.md) · [Atmospheric Refraction](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/environment/propagation/atmospheric-refraction.md) |
| Transport | [Aircraft Noise](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/aircraft/aircraft-noise.md) · [Rotorcraft Noise](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/aircraft/rotorcraft-noise.md) · [Wind-Turbine Noise](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/environment/sources/wind-turbine-noise.md) · [Airport Noise](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/aircraft/airport-noise.md) |
| Underwater | [Underwater Acoustics](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/underwater/underwater-acoustics.md) · [Underwater Propagation](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/underwater/underwater-propagation.md) · [Underwater Solvers](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/underwater/underwater-solvers.md) · [Marine-Mammal Exposure](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/underwater/marine-mammal-exposure.md) |
| Vibration | [Human Vibration](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/vibration/human/human-vibration.md) · [Mechanical Mobility](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/vibration/structural/mechanical-mobility.md) · [Transfer Stiffness](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/vibration/structural/transfer-stiffness.md) |
| Electroacoustics & broadcast | [Electroacoustics](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/electroacoustics/electroacoustics.md) · [Swept-Sine Distortion](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/electroacoustics/swept-sine-distortion.md) · [Programme Loudness](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/broadcast/program-loudness.md) · [Loudspeakers](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/electroacoustics/loudspeakers.md) · [Microphones](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/electroacoustics/microphones.md) |
| Emission | [Sound Power](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/emission/sound-power.md) · [Sound Intensity](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/emission/intensity.md) · [Sound Power by Pressure](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/emission/sound-power-pressure.md) · [Reverberation Room](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/emission/sound-power-reverberation.md) · [Small Test Rooms](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/emission/sound-power-test-rooms.md) · [In Situ Comparison](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/emission/sound-power-in-situ.md) · [By Intensity](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/emission/sound-power-intensity.md) · [Silencers](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/devices/noise-control/silencers.md) · [Filter Compliance](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/signals/filters/filter-compliance.md) |
| Simulation | [2D FDTD Wave Simulation](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/simulation/fdtd-simulation.md) · [Elastic Waves](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/simulation/elastic-waves.md) |
| Reference | [API Reference](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/reference/api/index.md) · [Theory](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/reference/theory/index.md) · [Bibliography](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/reference/bibliography.md) · [Why phonometry](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/start/why-phonometry.md) · [Conformance report](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/CONFORMANCE.md) · [Standards errata](https://github.com/jmrplens/phonometry/blob/v4.0.0/docs/ERRATA.md) |

## 🧾 Citing

If phonometry is useful in your research, cite the archived release:

> Requena-Plens, J. M. *phonometry: acoustic measurement, analysis and
> prediction for Python.*
> Zenodo. https://doi.org/10.5281/zenodo.21215280

The repository ships a
[`CITATION.cff`](https://github.com/jmrplens/phonometry/blob/v4.0.0/CITATION.cff),
so GitHub's *Cite this repository* button produces BibTeX and APA entries.

## 💚 Support the project

phonometry is one person's work, and its main cost is the primary sources:
every metric is implemented from the governing standard's paid text. You can
sponsor the project on [GitHub Sponsors](https://github.com/sponsors/jmrplens)
or [Ko-fi](https://ko-fi.com/jmrplens), and the documentation keeps a live
list of the
[sources that resisted every legitimate acquisition route](https://docs.jmrp.io/phonometry/start/support/),
with four ways to help get them: fund the purchase, send a copy privately
(whatever its origin, it is never republished), verify against your own
licensed copy, or point at a channel that was missed.

## 🧪 Development

```bash
make install   # dependencies + editable install
make check     # ruff + mypy + bandit + tests
make graphs    # regenerate the documentation figures
make animations  # render the animation clips and publish them to phonometry-assets
```

See the
[contributing guide](https://github.com/jmrplens/phonometry/blob/v4.0.0/CONTRIBUTING.md)
and the
[changelog](https://github.com/jmrplens/phonometry/blob/v4.0.0/CHANGELOG.md).
Suspected vulnerabilities go through
[GitHub's private reporting](https://github.com/jmrplens/phonometry/security/advisories/new),
as set out in the
[security policy](https://github.com/jmrplens/phonometry/blob/v4.0.0/SECURITY.md).

## 📄 License

[MIT](https://github.com/jmrplens/phonometry/blob/v4.0.0/LICENSE).
Data bundled from a third party keeps its source's terms: the EASA Aircraft
Noise and Performance (ANP) tables, for one, are reproduced under EASA's notice
that authorises reproduction provided the source is acknowledged, as their
[provenance note](https://github.com/jmrplens/phonometry/blob/v4.0.0/src/phonometry/aircraft/data/anp/PROVENANCE.md)
records.
