Skip to content

Calibrate a working standard microphone by comparison with a reference, in a pressure field by IEC 61094-5 and in a free field by IEC 61094-8 - #910

Merged
jmrplens merged 1 commit into
standards/iso-3095-rolling-stockfrom
standards/iec-61094-5-8-comparison-calibration
Oct 1, 2026
Merged

jmrplens merged 1 commit into
standards/iso-3095-rolling-stockfrom
standards/iec-61094-5-8-comparison-calibration

Conversation

@jmrplens

@jmrplens jmrplens commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

A working standard microphone is calibrated by comparing its output with that of a reference microphone of known sensitivity in the same sound field. IEC 61094-5:2016 does it in a pressure field (a coupler or a jig) and IEC 61094-8:2012 in a free field. Both rest on the same model, the sensitivity of the microphone under test from the reference's sensitivity and the ratio of their output voltages, M_test = M_ref R_V / R_P of IEC 61094-5 D.2. This adds one module, metrology.comparison_calibration, that implements both parts on that model.

metrology.simultaneous_comparison takes the two channel differences read before and after the microphones are interchanged, and by Formula (C.3) of Annex C their difference cancels the gains of the two channels, a drift of the source and the asymmetry of the field. It refuses a pressure calibration without the interchange, since 5.1.2 requires it. metrology.sequential_comparison takes the two outputs in turn and, when a monitor microphone watches the source, each one against the monitor reading taken with it: 20 lg R_V = 20 lg(V_test/V_mon,2) - 20 lg(V_ref/V_mon,1), the quotient IEC 61094-8 A.2 uses to correct a drifting source. Both average one row per determination and return a ComparisonCalibration with the sensitivity level, the sensitivity in mV/Pa, each correction by name, the part it follows and, when given, the expanded uncertainty.

The corrections each part asks for are included. metrology.environmental_sensitivity_correction corrects a sensitivity level to first order for static pressure, temperature and humidity, using the microphone's own coefficients in the units of IEC 61094-2 Annex D. IEC 61094-8 7.6 applies it to the reference in every case, and IEC 61094-5 6.6 when the two microphones are different models. It refuses a temperature at or below absolute zero and a relative humidity outside 0 % to 100 %, and a comparison refuses a correction made at frequencies other than its own, since each coefficient belongs to one frequency. That includes a correction made at the nominal one-third-octave frequencies when the calibration is at the exact ones. metrology.jig_diameter_correction reads Table A.1 for a WS3 microphone against an LS2aP in the jig of Figure A.4. Its expanded uncertainty is a tenth of the correction, printed without a coverage factor and read with the k = 2 of 7.9 and D.2. A free-field calibration against a pressure-calibrated reference takes the reference's IEC/TS 61094-7 free-field difference, and its plot draws the reference at that free-field level, the level the microphone under test was actually compared with.

metrology.comparison_uncertainty_budget combines the components of Table D.1 (pressure) or of IEC 61094-8 Table 2 (free field) through metrology.combine_uncertainty and reports U with k = 2. It also gives the strict combination in linear form that D.3 mentions. 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 requires of the room and the mounting rod. IEC 61094-5 Tables A.1 and D.1 and IEC 61094-8 Tables 1 and 2 are published read-only, and every result has .plot().

The IEC 61183 diffuse-field comparison is a sequential comparison without a monitor, so its Formula (8) and Formulas (9) to (11) now go through the same level model instead of their own copy. Its results do not change.

A new guide under Calibration and uncertainty, in English and Spanish with its docs mirror, runs a pressure calibration of a WS2P against an LS2P and a free-field calibration of a WS2F by substitution, with their budgets, the WS3 jig corrections and the free-field region of a time window. It also has a diagram of the readings each method takes.

Four printed defects are in the errata, in English and Spanish. IEC 61094-5:2016 D.3 (PDF page 23, printed folio 21) states a combined standard uncertainty of 0,040 dB and an expanded uncertainty of 0,08 dB, but the eight components Table D.1 prints on folio 20 combine to 0,0437 dB and 0,087 dB; 0,040 dB is the sum without one of the two 0,017 dB rows. The Spanish UNE-EN 61094-5:2017 (PDF pages 25 to 27, printed pp. 25 to 27) leaves six of the eight values of Table D.1 blank, divides 0,025 dB instead of 0,05 dB by 2, calls the WS3 microphone "WG3" and prints 0,004 dB in D.3. The English edition prints 0,040 dB there, which is itself the first erratum. IEC 61094-8:2012 8.4 (PDF page 17, printed folio 15) prints an unresolved cross-reference ("Error! Reference source not found."). Its Formula (B.10) (PDF page 30, printed folio 28) is the spectrum of a rectangular pulse of duration 2b, while the text calls it a pulse of duration b.

scripts/check_markdown_hazards.py gains a fifth rule. A "<" in MDX prose followed by a character no tag name can start with, such as a quoted "<0,02 above 200 Hz", is read by MDX as a tag and fails the site build, so the rule reports it before the build runs. A "<" followed by a space, one in inline code or maths, an escaped one and one inside a quoted attribute value of a JSX tag, such as an alt text, are left alone, since MDX builds them all. The rule reads the page from left to right, as MDX does, so a "<" and a letter inside a code span or inline maths that wraps onto a second line start no tag and hide nothing after them, and a tag that has its lines to itself may run across blank lines, as MDX lets it. No rule reads the YAML frontmatter, which Astro blanks before MDX compiles the body. The page check is split into one function per rule, and each rule has its own tests. The site's own MDX compiler fails on every case those tests refuse and compiles every case they accept, and of 5 404 random insertions of "<0,1" into the site's MDX pages the rule reports all 2 576 that fail the build that way. The 99 it reports that do build are in a link destination, an import line or a fence line, where no page puts one. The check also steps over code fences with the shared reader in scripts/markdown_fences.py, so a tilde fence is code to it as well and a fence shown inside another no longer ends the outer one.

Nothing breaks. The branch only adds names, all under phonometry.metrology, and the package root is unchanged.

How it was checked. Every printed table is an oracle, read on the printed pages. The 14 corrections of Table A.1 (IEC 61094-5 folio 15) and its NOTE. The eight standard uncertainties of Table D.1 (folio 20): the seven rows that state a value are derived from it and its divisor to the three decimals printed, and the repeatability row is held as a printed standard uncertainty only, since it states no value. The combined and expanded values of D.3, recomputed from the printed column. The strict linear combination, 0,043 614 dB, derived from that column. The ten uncertainty cells of IEC 61094-8 Table 1 (folio 12), with the microphone type, method and references of each row. The twelve components of Table 2 (folio 17), with their printed names and subclause references. Closed-form checks cover the rest: the interchange of Annex C recovers the test microphone's level whatever the channel gains, source drift and field asymmetry; the level form of D.2 matches M_ref R_V / R_P in linear form; the monitor ratios of A.2 cancel a source that drifts between the readings; and a reflection from the boundary of the B.1 region arrives exactly at the end of the window. These are 12 new conformance rows.

Gates. On this branch ruff check and ruff format are clean (1271 files), mypy is clean on 668 files of src, scripts, the stub and the typing tests, and bandit is clean; the conformance report (1786 of 1786 checks), the API reference, the llms files, the site reports, the catalogue data and the PyPI readme regenerate without a diff; the test modules this change adds or touches pass (342 passed); and the checks on frozen constants, parameter units, published sources, errata evidence, em dashes, digit grouping and markdown hazards, the static checks of the documentation snippets (7109 blocks over 720 pages), the guides index (161 guides) and the language parity pass. On the branch at the top of this stack, which carries this change as it is here, the full suite passes (25 145 passed, 71 skipped), every documentation snippet runs (7159 blocks over 723 pages), the site builds (971 pages) with 0 type errors, 0 warnings and clean HTML validation, and a fresh regeneration of the figures and the example fiches reproduces all 3172 committed figures and 75 fiches unchanged and passes the figure checks on contrast, language, annotations, ticks, decimal points, legends, tick and text clearance and minus signs.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @jmrplens, your pull request is larger than the review limit of 150,000 diff characters

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: jmrplens/phonometry/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 64a23306-5d45-4cf9-b04d-b4efa9938773

📥 Commits

Reviewing files that changed from the base of the PR and between 74c1837 and 246cc34.

⛔ Files ignored due to path filters (23)
  • .github/badges/conformance-summary.svg is excluded by !**/*.svg
  • .github/badges/conformance-summary_dark.svg is excluded by !**/*.svg
  • .github/images/comparison_budget.svg is excluded by !**/*.svg
  • .github/images/comparison_budget_dark.svg is excluded by !**/*.svg
  • .github/images/comparison_budget_es.svg is excluded by !**/*.svg
  • .github/images/comparison_budget_es_dark.svg is excluded by !**/*.svg
  • .github/images/comparison_calibration.svg is excluded by !**/*.svg
  • .github/images/comparison_calibration_dark.svg is excluded by !**/*.svg
  • .github/images/comparison_calibration_es.svg is excluded by !**/*.svg
  • .github/images/comparison_calibration_es_dark.svg is excluded by !**/*.svg
  • .github/images/comparison_jig_correction.svg is excluded by !**/*.svg
  • .github/images/comparison_jig_correction_dark.svg is excluded by !**/*.svg
  • .github/images/comparison_jig_correction_es.svg is excluded by !**/*.svg
  • .github/images/comparison_jig_correction_es_dark.svg is excluded by !**/*.svg
  • .github/images/diagram_comparison_calibration_setup.svg is excluded by !**/*.svg
  • .github/images/diagram_comparison_calibration_setup_dark.svg is excluded by !**/*.svg
  • .github/images/diagram_comparison_calibration_setup_es.svg is excluded by !**/*.svg
  • .github/images/diagram_comparison_calibration_setup_es_dark.svg is excluded by !**/*.svg
  • .github/images/free_field_region.svg is excluded by !**/*.svg
  • .github/images/free_field_region_dark.svg is excluded by !**/*.svg
  • .github/images/free_field_region_es.svg is excluded by !**/*.svg
  • .github/images/free_field_region_es_dark.svg is excluded by !**/*.svg
  • site/src/generated/api-sidebar.mjs is excluded by !**/generated/**
📒 Files selected for processing (61)
  • .zenodo.json
  • CHANGELOG.md
  • README.md
  • README_PYPI.md
  • docs/CONFORMANCE.md
  • docs/ERRATA.es.md
  • docs/ERRATA.md
  • docs/README.md
  • docs/conformance.json
  • docs/reference/api/index.md
  • docs/signals/index.md
  • docs/signals/metrology/comparison-calibration.md
  • docs/signals/metrology/index.md
  • docs/start/getting-started.md
  • docs/start/why-phonometry.md
  • llms-full.txt
  • llms.txt
  • scripts/api_taxonomy.py
  • scripts/check_figure_language.py
  • scripts/check_markdown_hazards.py
  • scripts/check_reference_values.py
  • scripts/conformance/domains/comparison_calibration.py
  • scripts/conformance_report.py
  • scripts/diagrams/canvas.py
  • scripts/diagrams/i18n.py
  • scripts/diagrams/registry.py
  • scripts/diagrams/signals.py
  • scripts/figures/metrology.py
  • scripts/figures/registry.py
  • scripts/generate_graphs.py
  • site/public/llms/llms-signals-metrology.txt
  • site/public/llms/llms-signals.txt
  • site/public/llms/llms-start.txt
  • site/src/content/docs/es/index.mdx
  • site/src/content/docs/es/reference/conformance.mdx
  • site/src/content/docs/es/reference/errata.md
  • site/src/content/docs/es/signals/index.mdx
  • site/src/content/docs/es/signals/metrology/comparison-calibration.mdx
  • site/src/content/docs/es/signals/metrology/index.mdx
  • site/src/content/docs/es/start/guides.md
  • site/src/content/docs/index.mdx
  • site/src/content/docs/reference/api/index.md
  • site/src/content/docs/reference/api/metrology/comparison-calibration.md
  • site/src/content/docs/reference/api/metrology/random-incidence.md
  • site/src/content/docs/reference/conformance.mdx
  • site/src/content/docs/reference/errata.md
  • site/src/content/docs/signals/index.mdx
  • site/src/content/docs/signals/metrology/comparison-calibration.mdx
  • site/src/content/docs/signals/metrology/index.mdx
  • site/src/content/docs/start/guides.md
  • site/src/data/topics.mjs
  • src/phonometry/_plot/metrology.py
  • src/phonometry/metrology/__init__.py
  • src/phonometry/metrology/comparison_calibration.py
  • src/phonometry/metrology/random_incidence.py
  • tests/metrology/test_comparison_calibration.py
  • tests/reference_data/__init__.py
  • tests/reference_data/comparison_calibration.py
  • tests/result_factories.py
  • tests/test_check_markdown_hazards.py
  • tests/test_result_plots.py
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jmrplens
jmrplens added this pull request to stack #900 September 30, 2026 17:59
@github-actions github-actions Bot added documentation Improvements or additions to documentation conformance Standard clause coverage, reference values or errata errata Confirmed defect in a published standard, tracked in docs/ERRATA.md validation Reference data and oracles used to check results against normative values api Public API surface, naming and deprecations figures Generated plots, diagrams and animations site Documentation website i18n English and Spanish translations area: metrology Calibration, uncertainty and measurement quality area: core Shared internals and cross-cutting code every domain depends on labels Sep 30, 2026
@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.81%. Comparing base (c40a581) to head (246cc34).

Additional details and impacted files
@@                         Coverage Diff                          @@
##           standards/iso-3095-rolling-stock     #910      +/-   ##
====================================================================
+ Coverage                             96.80%   96.81%   +0.01%     
====================================================================
  Files                                   429      430       +1     
  Lines                                 81102    81613     +511     
====================================================================
+ Hits                                  78512    79017     +505     
- Misses                                 2590     2596       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Numerical conformance

All 1786 conformance checks pass, across 109 domains and 518 standards

1786/1786 checks pass across 109 domains and 518 standards (222 normative designations, 123 further published sources).

Used in the tables below is how much of that clause's published tolerance the deviation consumes: 100 % sits exactly on the limit, 5 % 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.

New checks (342)

Standard Quantity Deviation Used
IEC 61672-1:2013 Table 4 Reference responses and limits of LAFmax - LA and LAE - LA, 12 durations 0 0 %
IEC 61672-1:2013 Table 4 Reference responses and limits of LASmax - LA, 9 durations 0 0 %
IEC 61672-1:2013 Table 4, Equations (7) and (8) Reference toneburst responses against 10 lg(1 - exp(-Tb/tau)) and 10 lg(Tb/T0) 0 0 %
IEC 61672-1:2013 Table 5 Reference differences LCpeak - LC and limits, 5 test signals 0 0 %
IEC 61672-1:2013 Table B.1 Maximum-permitted uncertainties, 31 printed rows (the F and S decay rates in two) 0 0 %
IEC 61672-3:2013 12.16 with IEC 61672-1:2013 Table 3 Acoustical weighting at 8 kHz, class 1, upper limit 0 0 %
IEC 61672-3:2013 12.16 with IEC 61672-1:2013 Table 3 Acoustical weighting at 8 kHz, class 1, lower limit 0 0 %
IEC 61672-3:2013 12.16 with IEC 61672-1:2013 Table 3 Acoustical weighting at 125 Hz, class 2, lower limit 0 0 %
IEC 61672-3:2013 12.16 with IEC 61672-1:2013 Table 3 Acoustical weighting at 8 kHz, class 2, upper limit 0 0 %
IEC 61672-3:2013 13.10 with IEC 61672-1:2013 Table 3 Electrical weighting A at 16 kHz, class 1, lower limit 0 0 %
IEC 61672-3:2013 13.10 with IEC 61672-1:2013 Table 3 Electrical weighting C at 1 kHz, class 1, upper limit 0 0 %
IEC 61672-3:2013 13.10 with IEC 61672-1:2013 Table 3 Electrical weighting Z at 8 kHz, class 2, lower limit 0 0 %
… 330 more

Removed checks (3)

Standard Quantity Deviation Used
ISO 10140-5:2010+A1 Annex B, Table B.1 Reference elements end-to-end: printed Rw (C; Ctr) of all three exact -
ISO 10140-5:2010+A1 Annex C, Table C.1 Reference floors end-to-end: printed Ln,t,r,0,w (CI) of both exact -
SAE ARP 5534 pure-tone coefficient (ISO 9613-1) Mid-band α at 1 kHz, 25 °C, 70 % RH, 101.325 kPa, dB/m 0 dB/m 0 %

Closest to their published limit (top 5)

The rows with the least room left, so the ones a change is most likely to push over.

Standard Quantity Deviation Used
ISO/TR 17534-3:2015 Table 3 Ground-projected path length dp, m 0.005 m 100 %
DIN 4150-2:1999-06 Annex C, Example 5 KB_FTr with hammer b) in the rest hours, Formula (5) -0.005 100 %
DIN 4150-2:1999-06 Annex C, Example 8 KB_FTm over the record with the passage maxima alone -0.0005 100 %
E DIN 4150-2:2023-08 Annex B, Table B.1 KB_FTm,Zug of the metro north by Formula (5) -0.0005 100 %
Long 2e Table 14.9 (worked duct-borne sheet, supply path) Fan to room, 8 octave bands -> 52/42/30/18/9/-2/-2/-1 dB at the receiver 1 dB 100 %

Pass Tests & coverage: 150402 tests, 0 failures (all green)
Python Version Tests Failures Coverage Status
macos-latest-3.13 25067 0 96.8% Pass Passed
macos-latest-3.14 25067 0 96.8% Pass Passed
ubuntu-latest-3.13 25067 0 96.8% Pass Passed
ubuntu-latest-3.14 25067 0 96.8% Pass Passed
windows-latest-3.13 25067 0 96.8% Pass Passed
windows-latest-3.14 25067 0 96.8% Pass Passed

Full report at this commit: docs/CONFORMANCE.md · docs/conformance.json · full CI artifacts

@jmrplens
jmrplens force-pushed the standards/iec-61094-5-8-comparison-calibration branch from 74c1837 to 810d4de Compare October 1, 2026 00:22
@jmrplens
jmrplens force-pushed the standards/iec-61094-5-8-comparison-calibration branch from 810d4de to d87af05 Compare October 1, 2026 03:24
@jmrplens
jmrplens force-pushed the standards/iec-61094-5-8-comparison-calibration branch from d87af05 to edc79f4 Compare October 1, 2026 06:10
…e, in a pressure field by IEC 61094-5 and in a free field by IEC 61094-8

A working standard microphone now takes its sensitivity from a reference of known sensitivity in the same sound field, in a coupler or a jig by IEC 61094-5 or in a free field by IEC 61094-8: by the simultaneous comparison with the interchange of Annex C, or by the sequential one against a monitor microphone. The environmental and WS3 jig corrections, the uncertainty budgets of Table D.1 and Table 2 with k = 2 and the free-field region of a time window come with it, each with its plot, together with a guide in English and Spanish, conformance checks against the printed tables and four printed defects recorded in the errata. The markdown hazards check also catches a less-than sign that MDX would read as a tag before the site build does.
@jmrplens
jmrplens force-pushed the standards/iec-61094-5-8-comparison-calibration branch from edc79f4 to 246cc34 Compare October 1, 2026 08:04
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

@jmrplens
jmrplens merged commit dadf76f into main Oct 1, 2026
47 checks passed
@jmrplens
jmrplens deleted the standards/iec-61094-5-8-comparison-calibration branch October 1, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Public API surface, naming and deprecations area: core Shared internals and cross-cutting code every domain depends on area: metrology Calibration, uncertainty and measurement quality conformance Standard clause coverage, reference values or errata documentation Improvements or additions to documentation errata Confirmed defect in a published standard, tracked in docs/ERRATA.md figures Generated plots, diagrams and animations i18n English and Spanish translations site Documentation website validation Reference data and oracles used to check results against normative values

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant