Skip to content

Figures, docstrings and the KB family set each subscript the way its standard prints it - #947

Merged
jmrplens merged 1 commit into
standards/iec-61094-5-shared-uncertaintyfrom
fix/subscripts-follow-the-standard
Oct 7, 2026
Merged

jmrplens merged 1 commit into
standards/iec-61094-5-shared-uncertaintyfrom
fix/subscripts-follow-the-standard

Conversation

@jmrplens

@jmrplens jmrplens commented Oct 7, 2026

Copy link
Copy Markdown
Owner

make subscripts now reads the matplotlib figures each page embeds as well as the page and its diagrams, from the mathtext source matplotlib keeps beside every label in the SVG, and it reads a run of letters as one symbol, so $TL_n$ is no longer taken for a level $L_n$. On the tree this branch starts from it finds 21 places where a figure and its page set the same subscript both ways. I read each one on the printed page of its standard and fixed the side that lagged: the $C_h$ of the NORAH2 guidance behind ECAC Doc 32 is italic in the rotorcraft figure, and the impact period $T_\mathrm{i}$ of Hopkins's tapping-force spectrum, the table separations $r_\mathrm{s}$ and $r_\mathrm{t}$ of Long's restaurant bounds and the $L_{p,\mathrm{A,S}}$ of ISO 3382-3:2012 are upright on their pages. Where the print cannot decide (the Official Journal sets every subscript of CNOSSOS-EU italic, the BOE sets the text of RD 1367/2007 upright and its formula images italic) the guide and the module decide, so $L_{\mathrm{R,TOT}}$, $L_{\mathrm{K},x}$ and $L_{\mathrm{Keq},x}$ are upright in their figures and in what ActivityAssessment.plot() draws, and the low-frequency difference $L_\mathrm{f}$ of RD 1367/2007 is declared beside the italic band level $L_f$ the regulation also calls Lf.

The KB family has one set of subscripts across the library, the figures, the diagrams, the docstrings, the guides and the errata register: $KB_\mathrm{F}$, $KB_\mathrm{Fmax}$, $KB_\mathrm{FTm}$, $KB_\mathrm{FTr}$ and $KB_\mathrm{FTm,Zug}$ with the descriptive parts upright, as DIN 45669-1, DIN 4150-2 and E DIN 4150-2 print them. The clock index of $KB_{\mathrm{FT}i}$ stays italic because the library sets an index that runs over a sum italic wherever it stands; the standards print it upright inside the subscript and italic under the sum.

DIN 4150-2:1999 and E DIN 4150-2 print the r of "Beurteilung" upright in the guide value $A_\mathrm{r}$, the assessment time $T_\mathrm{r}$ and the clock count $N_\mathrm{r}$, the same r as in $KB_\mathrm{FTr}$, and the u, o and e of $A_\mathrm{u}$, $A_\mathrm{o}$ and $T_\mathrm{e}$ upright as well. The docstrings, the figures, the diagrams, the guide snippets and the errata transcriptions now set all of them that way. make subscripts gains a table of letters that keep one meaning under several bases, and holds each family to one slope in a file, so a page can no longer set $KB_\mathrm{FTr}$ beside an italic $A_r$.

The DIN 45672-2 quantities follow their print too: the running r.m.s. $\tilde v_\mathrm{F}$ and its maximum, the event value $v_\mathrm{E}$ and its hourly sum, the levels $L_{v\mathrm{F}}$, $L_{v\mathrm{Fmax}}$ and $L_{v\mathrm{E}}$, the band centre $f_{\mathrm{T}n}$ and the insertion loss $D_\mathrm{e}$, in the docstrings, the figures and what TrainPassage.plot() and TrainPassage.plot_spectrum() draw. The docstrings of the E DIN 45672-3 prediction chain and of the E DIN 4150-2 train categories set upright the parts the two drafts print upright: E, BB, FB, DF, DB, the e of $D_\mathrm{e}$ and $f_\mathrm{e}$, and ges, Korr, Punkt and Zug.

The diagrams can now set a subscript inside an exponent, so the energy sums they used to print as plain text are composed: the rating level of NT ACOU 112, the corrected levels of RD 1367/2007, Formula 5 of ISO 17497-2, Formula 26 of EN 12354-1, Formula 12 of EN 15657, Formula 17 of EN 12354-5, Formulae A.5 to A.7 of the DB-HR and the calibration factor. The exponential detector and the two-ray sum are written with exp(), the differential d of the waveguide bottom condition is upright as ISO 80000-2 asks, the test voltage $U_\mathrm{p}$ of IEC 60268-5 has its upright p, and the letters of an exponent stay italic. The theory page that embeds the flanking diagram writes $R'_\mathrm{w}$ with the upright w EN 12354-1 prints.

The example fiches follow their standards: the ISO 3382 fiche heads its centre time column $T_\mathrm{S}$, the ISO 9614 and IEC 61043 fiches set the p and I of $F_{pI}$, $F_{pI_\mathrm{n}}$, $F_{p|I_\mathrm{n}|}$ and $\delta_{pI0}$ italic as ISO 9614-2 and ISO 9614-3 print them, the ISO 15186 fiches set the I of $R_{I,\mathrm{w}}$ and $D_{I,\mathrm{n,e}}$ italic in the table, the plot axis and the note on element units, and the RD 1367 fiche shows the upright Keq and K of its plot legend.

The smaller items: the diffusers and metadiffusers guides write the normalised coefficient $d_\mathrm{n}$ of ISO 17497-2, 3.12, where they wrote $d_\mathrm{norm}$, beside the italic well depth $d_n$, so they now agree with the goniometer diagram, and the metadiffuser diagram writes it the same way; the areas, distances and velocities of ISO 11820 are upright in silencer_in_situ; the hammer velocity of Hopkins's tapping model is $v_0$ with a zero in the docstrings, the resilient-layers guide and its figure, where it was $v_o$ or $v_\mathrm{h}$; and the centre time of ISO 3382-1 is $T_\mathrm{S}$, with the capital S of its Table A.1, in the guides, the glossary, the figure and the fiche, apart from the structural reverberation time $T_\mathrm{s}$.

Nothing breaks. No public name, signature, default or returned value changes; what changes is how symbols are typeset in docstrings, guides, figures, diagrams, the errata register and the example fiches. For contributors, make subscripts is stricter: a figure label that sets a subscript the other way from the page that embeds it fails the check, and so does a member of a linked family that leans while its siblings stand. Regenerate the figure or the diagram after changing a label, and name the symbol in the upright key of a diagram label where the composer would otherwise keep a single letter italic.

Two choices are left open on purpose. The KB base itself has two slopes because its sources disagree: DIN 45669-1:2010-09 prints KB upright, while DIN 4150-2, E DIN 4150-2, DIN 45672-2 and E DIN 45672-3 print it italic; the diagrams set it upright and the figures and the errata register italic. EN 15657 prints the v of $L_\mathrm{v}$ upright, and the guide, the module and the diagram keep the italic $L_v$ the rest of the corpus uses for a velocity level; changing it means taking the whole EN 15657 symbol set at once.

Verified with the full test suite on Python 3.13 (26827 passed, 69 skipped), every documentation code block (7483 blocks on 730 pages), the site type check, build and HTML validation, ruff, ruff format, mypy on src and scripts, bandit, and the repository checks: make subscripts passes on all 1282 files and the images they embed and fails with the 21 disagreements on the tree this branch starts from; all 3312 committed figures and all 77 example fiches match their generators; the figure checks pass on all 1622 drawings; all 6397 mathtext labels parse; the conformance report regenerates with no change; and the API reference, llms text and errata pages are regenerated. Each of the 30 changed figures and diagrams (18 diagrams and 12 figures, four variants each) and each of the 7 changed fiches was looked at in both languages.

@github-actions github-actions Bot added documentation Improvements or additions to documentation errata Confirmed defect in a published standard, tracked in docs/ERRATA.md figures Generated plots, diagrams and animations reports Accredited-format .report() fiches and their rendering site Documentation website i18n English and Spanish translations area: building Sound insulation and building acoustics area: environment Outdoor propagation, environmental sources and noise assessment area: noise control Silencers, barriers and noise control treatments area: room Room acoustics and reverberation area: vibration Human vibration and structure-borne sound area: core Shared internals and cross-cutting code every domain depends on labels Oct 7, 2026
@jmrplens
jmrplens added this pull request to stack #950 October 7, 2026 15:17
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@sourcery-ai

sourcery-ai Bot commented Oct 7, 2026

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.80%. Comparing base (be60b6e) to head (e88a846).

Additional details and impacted files
@@                            Coverage Diff                            @@
##           standards/iec-61094-5-shared-uncertainty     #947   +/-   ##
=========================================================================
  Coverage                                     96.80%   96.80%           
=========================================================================
  Files                                           443      443           
  Lines                                         87888    87889    +1     
=========================================================================
+ Hits                                          85081    85082    +1     
  Misses                                         2807     2807           

☔ 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 Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Numerical conformance

All 1893 conformance checks pass, across 111 domains and 523 standards

1893/1893 checks pass across 111 domains and 523 standards (227 normative designations, 125 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 (2)

Standard Quantity Deviation Used
IEC 61094-5:2016 6.7; ISO/IEC Guide 98-3 F.1.2.3, Example 2 Correlation of two calibrations against the same standard of 10^-4, for comparisons of 100, 10 and 1 x 10^-6, as printed 0 0 %
IEC 61094-5:2016 6.7, Table D.1; ISO/IEC Guide 98-3 5.2.2 Expanded uncertainty of the difference of two calibrations against the same LS2P, each with the budget of Table D.1 0 dB 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 %
Jarvis (1996) NPL CIRA(EXT) 010 Appendix B, folio 26 Volume of the coupler of the example, v = pi r^2 L -0.00000000005 m³ 100 %

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

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

…standard prints it

`make subscripts` now reads the matplotlib figures each page embeds as well as the page and its diagrams, reads a run of letters as one symbol, and holds a family of letters that keep one meaning under several bases to one slope in a file. The places where a figure and its page disagreed are fixed on the side that lagged its printed standard; the KB family of DIN 45669-1, DIN 4150-2 and E DIN 4150-2, the r, u, o and e of the DIN 4150-2 assessment and the F and E of DIN 45672-2 set their descriptive parts upright across the docstrings, figures, diagrams, guides and errata register; the diagrams compose subscripts inside exponents; and the example fiches follow their standards. No public name, signature, default or returned value changes.
@jmrplens
jmrplens force-pushed the fix/subscripts-follow-the-standard branch from 5a88c10 to e88a846 Compare October 7, 2026 18:05
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

@jmrplens
jmrplens merged commit 249bd8e into main Oct 7, 2026
92 of 95 checks passed
@jmrplens
jmrplens deleted the fix/subscripts-follow-the-standard branch October 7, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: building Sound insulation and building acoustics area: core Shared internals and cross-cutting code every domain depends on area: environment Outdoor propagation, environmental sources and noise assessment area: noise control Silencers, barriers and noise control treatments area: room Room acoustics and reverberation area: vibration Human vibration and structure-borne sound 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 reports Accredited-format .report() fiches and their rendering site Documentation website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant