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
Conversation
There was a problem hiding this comment.
Sorry @jmrplens, your pull request is larger than the review limit of 150,000 diff characters
|
Warning Review limit reachedYou'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. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: jmrplens/phonometry/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (23)
📒 Files selected for processing (61)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Numerical conformance1786/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)
Removed checks (3)
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.
|
74c1837 to
810d4de
Compare
810d4de to
d87af05
Compare
d87af05 to
edc79f4
Compare
…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.
edc79f4 to
246cc34
Compare
|



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_Pof IEC 61094-5 D.2. This adds one module,metrology.comparison_calibration, that implements both parts on that model.metrology.simultaneous_comparisontakes 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_comparisontakes 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 aComparisonCalibrationwith 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_correctioncorrects 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_correctionreads 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_budgetcombines the components of Table D.1 (pressure) or of IEC 61094-8 Table 2 (free field) throughmetrology.combine_uncertaintyand reports U with k = 2. It also gives the strict combination in linear form that D.3 mentions.metrology.free_field_regiongives 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.pygains 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 inscripts/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_Pin 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.