Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/badges/conformance-summary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/badges/conformance-summary_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,327 changes: 1,327 additions & 0 deletions .github/images/comparison_budget.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,327 changes: 1,327 additions & 0 deletions .github/images/comparison_budget_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,190 changes: 1,190 additions & 0 deletions .github/images/comparison_budget_es.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,190 changes: 1,190 additions & 0 deletions .github/images/comparison_budget_es_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,383 changes: 1,383 additions & 0 deletions .github/images/comparison_calibration.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,383 changes: 1,383 additions & 0 deletions .github/images/comparison_calibration_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,332 changes: 1,332 additions & 0 deletions .github/images/comparison_calibration_es.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,332 changes: 1,332 additions & 0 deletions .github/images/comparison_calibration_es_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,116 changes: 1,116 additions & 0 deletions .github/images/comparison_jig_correction.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,116 changes: 1,116 additions & 0 deletions .github/images/comparison_jig_correction_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,128 changes: 1,128 additions & 0 deletions .github/images/comparison_jig_correction_es.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,128 changes: 1,128 additions & 0 deletions .github/images/comparison_jig_correction_es_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/images/diagram_comparison_calibration_setup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/images/diagram_comparison_calibration_setup_es.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,371 changes: 1,371 additions & 0 deletions .github/images/free_field_region.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,371 changes: 1,371 additions & 0 deletions .github/images/free_field_region_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,360 changes: 1,360 additions & 0 deletions .github/images/free_field_region_es.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,360 changes: 1,360 additions & 0 deletions .github/images/free_field_region_es_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "phonometry: acoustic measurement, analysis and prediction for Python (formerly PyOctaveBand)",
"description": "<p>phonometry is a Python library for acoustic measurement, analysis and prediction. Every metric is implemented from the text of its governing standard, and that standard's own reference values and acceptance limits are transcribed into the test suite and enforced in CI: 1774 numerical conformance checks across 108 domains against 516 IEC, ISO, EN, ANSI, ECMA, DIN, ITU, EBU, SAE, ICAO, ECAC and VDI standards, each pinning a clause, table or worked example to the value the library computes.</p><p>Nine documented areas. Sound level metrology: fractional octave filter banks (ANSI S1.11, IEC 61260-1), frequency and time weighting (IEC 61672-1), Leq, LAeq, percentile levels, SEL, LCpeak, noise dose (IEC 61252), calibration (IEC 60942) and GUM uncertainty. Hearing and perception: loudness (ISO 532-1/-2/-3), tonality and sound quality (ECMA-418-1/-2, DIN 45692), equal-loudness contours (ISO 226), occupational exposure (ISO 9612) and speech intelligibility (IEC 60268-16, ANSI S3.5). Rooms and buildings: room acoustic parameters (ISO 3382), field and laboratory sound insulation (ISO 16283, ISO 10140), single-number ratings (ISO 717) and prediction (EN 12354). Materials and surfaces: absorption (ISO 354, ISO 11654), impedance tube (ISO 10534-2), airflow resistivity (EN 29052) and scattering (ISO 17497). Vibration and structure-borne sound: mechanical mobility (ISO 7626), transfer stiffness (ISO 10846) and human vibration (ISO 2631, ISO 5349, ISO 8041). Environment and transport: outdoor propagation (ISO 9613), environmental noise (ISO 1996), aircraft noise certification (ICAO Annex 16) with airport contours (ECAC Doc 29/32) and wind turbine noise (IEC 61400-11). Underwater acoustics: terminology and metrics (ISO 18405), ship source levels (ISO 17208), pile driving (ISO 18406) and numerical propagation. Sources and devices: sound power, sound intensity, electroacoustics (IEC 60268) and programme loudness (ITU-R BS.1770, EBU R 128). Wave simulation: FDTD.</p><p>Each result is a typed, frozen dataclass that carries the inputs it was computed from, draws its own figure with a one-line .plot() in English or Spanish, and, where a standard defines a reporting format, renders that format as a PDF with .report(). Pure Python on NumPy and SciPy, requiring Python 3.13 or newer.</p><p>It is not a certified instrument: the conformance report is the library checking its own output against values published in the standards, not an accredited third-party calibration.</p>",
"description": "<p>phonometry is a Python library for acoustic measurement, analysis and prediction. Every metric is implemented from the text of its governing standard, and that standard's own reference values and acceptance limits are transcribed into the test suite and enforced in CI: 1786 numerical conformance checks across 109 domains against 518 IEC, ISO, EN, ANSI, ECMA, DIN, ITU, EBU, SAE, ICAO, ECAC and VDI standards, each pinning a clause, table or worked example to the value the library computes.</p><p>Nine documented areas. Sound level metrology: fractional octave filter banks (ANSI S1.11, IEC 61260-1), frequency and time weighting (IEC 61672-1), Leq, LAeq, percentile levels, SEL, LCpeak, noise dose (IEC 61252), calibration (IEC 60942) and GUM uncertainty. Hearing and perception: loudness (ISO 532-1/-2/-3), tonality and sound quality (ECMA-418-1/-2, DIN 45692), equal-loudness contours (ISO 226), occupational exposure (ISO 9612) and speech intelligibility (IEC 60268-16, ANSI S3.5). Rooms and buildings: room acoustic parameters (ISO 3382), field and laboratory sound insulation (ISO 16283, ISO 10140), single-number ratings (ISO 717) and prediction (EN 12354). Materials and surfaces: absorption (ISO 354, ISO 11654), impedance tube (ISO 10534-2), airflow resistivity (EN 29052) and scattering (ISO 17497). Vibration and structure-borne sound: mechanical mobility (ISO 7626), transfer stiffness (ISO 10846) and human vibration (ISO 2631, ISO 5349, ISO 8041). Environment and transport: outdoor propagation (ISO 9613), environmental noise (ISO 1996), aircraft noise certification (ICAO Annex 16) with airport contours (ECAC Doc 29/32) and wind turbine noise (IEC 61400-11). Underwater acoustics: terminology and metrics (ISO 18405), ship source levels (ISO 17208), pile driving (ISO 18406) and numerical propagation. Sources and devices: sound power, sound intensity, electroacoustics (IEC 60268) and programme loudness (ITU-R BS.1770, EBU R 128). Wave simulation: FDTD.</p><p>Each result is a typed, frozen dataclass that carries the inputs it was computed from, draws its own figure with a one-line .plot() in English or Spanish, and, where a standard defines a reporting format, renders that format as a PDF with .report(). Pure Python on NumPy and SciPy, requiring Python 3.13 or newer.</p><p>It is not a certified instrument: the conformance report is the library checking its own output against values published in the standards, not an accredited third-party calibration.</p>",
"license": "MIT",
"upload_type": "software",
"access_right": "open",
Expand Down
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
by what each reading is of. A new guide under Calibration and uncertainty runs every
method on a synthetic meter and on the two worked budgets, in English and
Spanish.
- **The calibration of a working standard microphone by comparison with a
reference microphone, in a pressure field and in a free field
(IEC 61094-5:2016, IEC 61094-8:2012).** The new
`metrology.comparison_calibration` module carries a reference microphone's
sensitivity over to the microphone under test through the ratio of their
output voltages, $M_\mathrm{test} = M_\mathrm{ref} R_V / R_P$ of IEC
61094-5 D.2 written in levels. `metrology.simultaneous_comparison` takes the
reading difference between the two channels before and after the
microphones are interchanged, whose difference cancels the gains of the
channels, a drift of the source and the asymmetry of the field (Annex C,
Formula (C.3)), and refuses a pressure calibration without the interchange
5.1.2 requires; `metrology.sequential_comparison` takes the two outputs in
turn and, when a monitor microphone watches the source, each against the
monitor reading taken with it, the quotient IEC 61094-8 A.2 corrects a
drifting source with. Both average one row per
determination and return a `metrology.ComparisonCalibration` with the
sensitivity level and the sensitivity in mV/Pa, the corrections it carries
by name, the part it follows and, when given, its expanded uncertainty.
`metrology.environmental_sensitivity_correction` corrects a sensitivity
level for the static pressure, the temperature and the humidity to first
order, from the microphone's own coefficients in the units IEC 61094-2
Annex D gives them; the reference's is added and the test microphone's
subtracted to refer the result to the reference conditions of clause 4.
`metrology.jig_diameter_correction` reads Table A.1 for a WS3 microphone
against an LS2aP in the jig of Figure A.4, with its expanded uncertainty of
a tenth of the correction (printed without a coverage factor, and read with
the $k = 2$ of 7.9 and D.2), and a free-field calibration against a
pressure-calibrated reference takes the reference's IEC/TS 61094-7
difference. `metrology.comparison_uncertainty_budget` combines the
components of Table D.1 or of IEC 61094-8 Table 2 on
`metrology.combine_uncertainty` with $k = 2$, and
`metrology.free_field_region` gives the effective free-field region of a
time window, $A = d + \tau c$ (B.1), with the speed of sound of the
IEC 61094-2 Annex F air, and the clearance it asks of the room and of the
mounting rod. Tables A.1 and D.1 of IEC 61094-5 and Tables 1 and 2 of
IEC 61094-8 are published read-only, every result has `.plot()`, and the
IEC 61183 diffuse-field comparison now computes through the same model. The
tables, the budget and the three measurement models are conformance rows.
Four printed defects are in the errata: D.3 of IEC 61094-5 states 0,040 dB
and 0,08 dB where its own eight components give 0,0437 dB and 0,087 dB; the
Spanish UNE-EN 61094-5:2017 leaves six of the eight values of Table D.1
blank and prints 0,004 dB for the combined uncertainty; IEC 61094-8 prints
an unresolved cross-reference in 8.4; and its Formula (B.10) is the
spectrum of a pulse of duration $2b$ that the text calls one of duration
$b$. A new guide under Calibration and uncertainty runs a pressure and a
free-field calibration with their budgets, in English and Spanish.
- **What a sound level meter reads when sound arrives from every direction
(IEC 61183:1994).** `metrology.directivity_factor` takes the levels a meter
indicates at equal angular steps in two planes (or four, as NOTE 2 of A.6
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ 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/main/docs/CONFORMANCE.md)
runs 1774 conformance checks across 108 domains and 516 standards, each pinning
runs 1786 conformance checks across 109 domains and 518 standards, 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/main/docs/CONFORMANCE.md"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/badges/conformance-summary_dark.svg"><img src="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/badges/conformance-summary.svg" alt="All 1774 conformance checks pass, across 108 domains and 516 standards"></picture></a>
<a href="https://github.com/jmrplens/phonometry/blob/main/docs/CONFORMANCE.md"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/badges/conformance-summary_dark.svg"><img src="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/badges/conformance-summary.svg" alt="All 1786 conformance checks pass, across 109 domains and 518 standards"></picture></a>

<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jmrplens/phonometry-assets/main/images/anim_fdtd_pillar_hall_dark.gif"><img src="https://raw.githubusercontent.com/jmrplens/phonometry-assets/main/images/anim_fdtd_pillar_hall.gif" alt="Animation: 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%"></picture>

Expand Down
4 changes: 2 additions & 2 deletions README_PYPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ 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.0rc1/docs/CONFORMANCE.md)
runs 1774 conformance checks across 108 domains and 516 standards, each pinning
runs 1786 conformance checks across 109 domains and 518 standards, 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.0rc1/docs/CONFORMANCE.md"><img src="https://raw.githubusercontent.com/jmrplens/phonometry/v4.0.0rc1/.github/badges/conformance-summary.svg" alt="All 1774 conformance checks pass, across 108 domains and 516 standards"></a>
<a href="https://github.com/jmrplens/phonometry/blob/v4.0.0rc1/docs/CONFORMANCE.md"><img src="https://raw.githubusercontent.com/jmrplens/phonometry/v4.0.0rc1/.github/badges/conformance-summary.svg" alt="All 1786 conformance checks pass, across 109 domains and 518 standards"></a>

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

Expand Down
22 changes: 21 additions & 1 deletion docs/CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

## Numerical conformance report

**1774/1774 conformance checks pass** across 108 domains and 516 standards - filters class 1 - weightings within IEC 61672-1 class 1.
**1786/1786 conformance checks pass** across 109 domains and 518 standards - filters class 1 - weightings within IEC 61672-1 class 1.

<sub><b>&#916;</b> is the difference between the computed value and the one the standard publishes. <b>Used</b> is how much of that clause's published tolerance the difference consumes: 100 % means it sits exactly on the limit, 5 % means it uses a twentieth of the allowance, and a dash means the clause states no two-sided tolerance for the quantity, so there is no budget to spend. It is reported and never used to decide a verdict, which is settled at full precision before any rounding.</sub>

Expand Down Expand Up @@ -2223,6 +2223,26 @@ Only **Butterworth** (the library default) and **Chebyshev-II** are class-compli

</details>

<details>
<summary><b>Microphone calibration by comparison (IEC 61094-5, IEC 61094-8)</b>: 100% (12/12)</summary>

| Standard | Quantity | Expected (norm) | Computed | &#916; | Used | Status |
|:---|:---|:---|:---|:---|:---:|:---:|
| IEC 61094-5:2016 Table D.1 | Standard uncertainty at 2 kHz of the 7 components whose row states a value | 7/7 components of Table D.1 | 7/7 components of Table D.1 | exact | 0 % | ![Pass][cv-pass] Pass |
| IEC 61094-5:2016 D.3 | Combined standard uncertainty of the example budget at 2 kHz | 0.0437 dB (printed 0,040, an erratum) | 0.0437 dB | 0 dB | 62 % | ![Pass][cv-pass] Pass |
| IEC 61094-5:2016 D.2, D.3 | Expanded uncertainty (k = 2) of the example budget at 2 kHz | 0.087 dB (printed 0,08, an erratum) | 0.087 dB | 0 dB | 68 % | ![Pass][cv-pass] Pass |
| IEC 61094-5:2016 D.3 | Combined standard uncertainty by the strict calculation in linear form | 0.043614 dB (0.043669 dB in decibels) | 0.043614 dB | 0 dB | 24 % | ![Pass][cv-pass] Pass |
| IEC 61094-5:2016 Table A.1 | Correction of a WS3 microphone against an LS2aP in the jig of Figure A.4, 14 frequencies | 14/14 corrections of Table A.1 | 14/14 corrections of Table A.1 | exact | 0 % | ![Pass][cv-pass] Pass |
| IEC 61094-5:2016 Table A.1 NOTE | Expanded uncertainty of the correction at 20 kHz, a tenth of its value | 0.1443 dB (+/-0 dB) | 0.1443 dB | 0 dB | 0 % | ![Pass][cv-pass] Pass |
| IEC 61094-5:2016 Formulas (C.1) to (C.3) | Sensitivity level of the test microphone through the interchange, whatever the channel gains, source drift and field asymmetry | the test microphone's level at all 5 frequencies | max deviation 0.000000000 dB | 0 dB | 0 % | ![Pass][cv-pass] Pass |
| IEC 61094-5:2016 D.2 | M_test = M_ref x R_V / R_P in linear form against the level form | M_ref x R_V / R_P at all 5 frequencies | max relative deviation 0.000000000000 | 0 | 0 % | ![Pass][cv-pass] Pass |
| IEC 61094-8:2012 A.2 | Monitor ratios cancel a source that drifts between the two measurements | the test microphone's level at all 5 frequencies | max deviation 0.000000000 dB | 0 dB | 0 % | ![Pass][cv-pass] Pass |
| IEC 61094-8:2012 Table 1 | Typical expanded uncertainty of the 5 reference calibration options at 1 kHz and 10 kHz | 10/10 cells of Table 1 | 10/10 cells of Table 1 | exact | 0 % | ![Pass][cv-pass] Pass |
| IEC 61094-8:2012 Table 2 | Source of uncertainty and subclause references of the 12 typical components | 12/12 rows of Table 2 | 12/12 rows of Table 2 | exact | 0 % | ![Pass][cv-pass] Pass |
| IEC 61094-8:2012 Formula (B.1), Figure B.1 | A reflection from the boundary of the effective free-field region arrives at the end of a 5 ms window | 5 ms (+/-0 ms) | 5 ms | 0 ms | 0 % | ![Pass][cv-pass] Pass |

</details>

<details>
<summary><b>Audio-frequency induction loops (IEC 60118-4:2014+A1, IEC 62489-1:2010+A1)</b>: 100% (67/67)</summary>

Expand Down
Loading
Loading