Skip to content

A choice reads the same everywhere: fraction=1 or 3 for the band set, "free", "diffuse" or "pressure" for the field, weighting= for the curve - #976

Merged
jmrplens merged 1 commit into
fix/levels-carry-no-db-suffixfrom
fix/one-vocabulary-per-choice
Oct 21, 2026
Merged

jmrplens merged 1 commit into
fix/levels-carry-no-db-suffixfrom
fix/one-vocabulary-per-choice

Conversation

@jmrplens

@jmrplens jmrplens commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Three choices were spelled differently from one function to the next: the band set of a spectrum, the sound field and the frequency weighting. Code written against one module had to be relearned for the next, and a misspelt choice reached the function as a plain string. Each of them now has one spelling everywhere it is offered, every choice is a Literal a type checker reads, and the old words are refused by name.

What changes for you

The band set is fraction

The filter bank, the room parameters and the intensity measurement already took the integer fraction. The building, emission and vibration functions that pick a band set spelled it band="third", bands="third-octave", band_type="third" or bandwidth="octave". Every one of them now takes fraction: Literal[1, 3], 3 for one-third octaves and 1 for octaves:

  • the panel predictions (field_incidence_correction, mass_law_transmission_loss, single_panel_transmission_loss, double_wall_transmission_loss, orthotropic_transmission_loss) and the resilient layers (tapping_force_spectrum, short_pulse_mean_square_force, covering_improvement);
  • the ISO 717 ratings (weighted_rating, weighted_impact_rating, SoundReductionResult.rating), the facade and flanking predictions, and the detailed model of ISO 12354 (calculated_sound_reduction_index, reciprocity_impact_level, in_situ_element, detailed_airborne_prediction, detailed_impact_prediction);
  • a_weighted_max_impact_level, tapping_machine_force_level_estimate and cylindrical_shell_modal_density;
  • the ISO 9614-1 and -2 determinations (sound_power_intensity, sound_power_intensity_points, position_count_factor, determination_standard_deviation);
  • and, among the functions new since 4.0.0rc1, the ISO 6926 reference source (reference_source_reproducibility, ReferenceSourceCalibration.sound_power_level_at), the service equipment level of ISO/DIS 16032, the cabins of ISO 11957 and the enclosures of ISO 11546.

The results that record the band set hold it as fraction (TappingForceResult, AWeightedMaxImpactResult, VibrationReductionResult, SoundPowerIntensityResult, DiscretePointIntensityResult, and the new ServiceEquipmentResult, CabinInsulationResult and EnclosureInsulationResult), and the tables read by band set are keyed by the same integer (HEAVY_IMPACT_A_WEIGHTING[3], SERVICE_EQUIPMENT_WEIGHTING[1]). One shared check refuses a word, a flag or a float with a message that names fraction, so fraction=True is not read as octaves. The ISO 10848 junction fiche now averages over the Annex A range of the band set a VibrationReductionResult states, as single_number does. speech.sii_procedure(method="one-third-octave") keeps its value: it names one of the four procedures of ANSI S3.5, not a band set.

With fraction naming only a band set, the share of the energy a transmission path carries is spelled energy_fraction on building.PathContribution and energy_fractions (one row per path, one column per band) on DetailedAirborneResult and DetailedImpactResult, where they held fraction and fractions, as LateralEnergyResult.energy_fraction already reads.

A sound field is "free", "diffuse" or "pressure"

hearing.reference_threshold and hearing.FIELDS read "free" and "diffuse" instead of "free-field" and "diffuse-field", the words the loudness models already used. The microphone calibrations by comparison and by reciprocity take and hold "free" beside "pressure", and DiffuseFieldSensitivity.route reads "free" for a reference calibrated in a free field. Every public field that names a sound field states its options as a Literal, on the results that record it too (ZwickerLoudness, EcmaLoudness, MooreGlasbergLoudness, the ECMA-418-2 roughness, tonality and fluctuation strength, BinauralIndicators, FreeSoundFieldCheck). Three keep a word of their own, because the standard or the model names something that is not a free, diffuse or pressure field: the quasi-free field of ISO 8253-2 5.4, the plane wave at normal incidence of the slit model (Hopkins Eq. 4.99 sets m = 4 for it), and the eardrum of the Moore-Glasberg models.

A frequency weighting is chosen by weighting, and an unweighted signal is "Z"

  • filters.weighting_filter and WeightingFilter take weighting= instead of curve=; WeightingFilter.weighting and WeightingComplianceResult.weighting replace .curve.
  • broadcast.quasi_peak_meter(weighting="468" | "Z") replaces weighted=True/False, and QuasiPeakResult.weighting replaces .weighted.
  • signals.ln_levels and sel default to weighting="Z" and refuse None with a TypeError that names the parameter.
  • Among the functions new since 4.0.0rc1, electroacoustics.program_signal_level and program_characteristic_voltage take weighting="A" | "Z" (default "Z"), environment.wind_turbine_low_frequency_level takes weighting="A" | "Z" (default "A"), and vibration.verify_vibration_meter takes weighting="kb" | "Z".

"Z" is the Z-weighting of IEC 61672-1 on the sound-level weightings; elsewhere it is whatever the standard leaves unweighted, such as the band limitation of Formula (3) alone on the DIN 45669-1 vibration meter or the meter without its ITU-R BS.468-4 network. Two flags keep their names because they read a row of a printed table, not a weighting curve: emission.error_factor(a_weighted=) reads the A-weighted row of ISO 9614-1 Table B.1, and building.estimate_reverberation_index(weighted=) the A/C column of ISO 10052 Table 4.

The cabin rating takes the method, and the vibration choices are typed

weighted_cabin_insulation(*, method="laboratory" | "in-situ-loudspeaker" | "in-situ-actual-noise") takes the method cabin_insulation takes, and WeightedCabinInsulation holds it and reads apparent from it.

The building class of DIN 4150-3 and of the DIN 45669-1 assessment weightings, the place of measurement, the duration, the pipe material, the period model of ISO 4866, the working range and weighting of the vibration meter and the dominant-frequency method are Literal types in every signature and on every result that records them, with no | str beside them. BuildingClass and WorkingRange are written once, in a private module both packages read, and require_choice is generic in its options, so a tuple typed with a Literal alias narrows the checked value without a cast.

What breaks, and how to migrate

Every parameter, field and value that shipped in 3.3.0 or 4.0.0rc1 has a row in "One spelling per concept" of the migration guide (docs/start/upgrading.md and its two site copies):

  • band=, bands=, band_type= and bandwidth= on the functions above, and .band/.band_type on their results: write fraction=3 for one-third octaves and fraction=1 for octaves; None still reads the band set from the values where it did.
  • building.HEAVY_IMPACT_A_WEIGHTING["third"] and ["octave"]: [3] and [1].
  • hearing.reference_threshold("free-field") and "diffuse-field", and hearing.FIELDS: "free" and "diffuse".
  • curve= on weighting_filter and WeightingFilter, .curve on WeightingFilter and WeightingComplianceResult: weighting= and .weighting.
  • quasi_peak_meter(weighted=) and QuasiPeakResult.weighted: weighting="468" (the default) or weighting="Z", and .weighting.
  • weighting=None on signals.ln_levels and sel: weighting="Z", now the default.
  • building.PathContribution.fraction, and fractions on DetailedAirborneResult and DetailedImpactResult: .energy_fraction and .energy_fractions.

The functions added since 4.0.0rc1 are described by their final spelling in the CHANGELOG [Unreleased] entries, with no rename line. The curated API table, the API reference, llms.txt and the guides in English and Spanish follow; no conformance number moves.

How it was verified

  • The unweighted wind turbine level is pinned against Table C.4 of IEC TS 61400-11-2:2024 (PDF page 68, printed page 66): its A-weighting row prints -26,2 dB at 63 Hz and -13,4 dB at 160 Hz, and weighting="Z" raises the outdoor and indoor levels of each band by exactly that and leaves the row at zero; the footnote of the table allows the unweighted level.
  • The band-set columns of ISO 9614-2 Table 2 (UNE-EN ISO 9614-2:1997, PDF page 12, printed page 12) are pinned through criterion 3: 2,5 dB at the one-third-octave centre 6 300 Hz, 3 dB up to 160 Hz in one-third octaves and up to 125 Hz in octaves, 2 dB at the 250 Hz octave, and a refusal for 160 Hz in octaves. Swapping the two columns now fails these tests.
  • The refusals of the new weighting choices are pinned at the call and on a record changed with dataclasses.replace: the quasi-peak meter refuses "A", the programme level and the characteristic voltage refuse "C" instead of reading it as unweighted, and LowFrequencyLevel refuses "C".
  • The slit's "normal" was read on Hopkins (2007), Sound Insulation, PDF page 522, printed page 495: m = 8 for a diffuse field, m = 4 for a plane wave at normal incidence. The docstrings call the integer 1 or 3 the denominator b of the IEC 61260-1 bandwidth designator 1/b, as BS EN 61260-1:2014 3.3 (PDF page 10, printed page 8) defines it. The DIN 45669-1 "Z" is the band limitation of Formula (3), as the vibration meter module states.
  • One figure changes on purpose: the sound level meter signal chain (diagram_slm_pipeline, in its four light, dark, English and Spanish variants) labels its weighting step weighting_filter(weighting='A') instead of weighting_filter(curve='A'). Every other figure regenerates byte for byte.
  • ruff check, ruff format --check, mypy src scripts (700 files) and bandit are clean; the full suite, the documentation snippets and the site build and validation pass; docs/CONFORMANCE.md regenerates with no change; the API reference and llms.txt are regenerated; the frozen-constant, parameter-unit, API-reference, em-dash, markdown, Spanish-accent, digit-grouping, raises-block, identifier-spelling, boundary-comparison, dead-constant and record-display checks pass.

Guards

tests/test_choice_vocabulary.py reads the installed package the way a caller meets it, every unpublished alias spelled out, plus every module-level tuple and table, private ones included. Each exception is keyed by its location and carries its reason, and an exception whose place is gone fails.

  • No public choice offers "third", "third-octave", "one-third-octave" or "octave" in a Literal or as a default, and no choice named for a band set (band, bands, band_type, band_fraction, bandwidth, band_set, fraction) takes a str, whose words no Literal would show. The ANSI S3.5 procedure names and the ISO 3745 test-signal kind are exempt.
  • No module tuple or table holds a band-set word as an item or a key (figure translation keys exempt).
  • Every public field states its options in a Literal and offers only free, diffuse or pressure (a catalogue column, a record field named in a message and a field quantity of the FDTD grid are exempt as not sound fields, beside the three named above), and a tuple or table named for a field that holds a sound field holds only those three words.
  • No weighting offers or defaults to a flat word or None, no table named for a weighting holds one, and no table holds "unweighted" (the generalized cross-correlation weighting and a figure translation key exempt).
  • No parameter or field named a_weighted, weighted, curve, c_weighted, unweighted or flat takes a flag or a word, except the two table-row flags named above.
  • Each retired spelling is called where it used to be read and must be refused: the vibration meter's "unweighted", the threshold's "free-field" and "diffuse-field", the four calibrations' "free_field", the ratings' "third-octave", the mass law's "third", the reference source's "octave", and the keywords curve=, weighted= and band_type=.

tests/test_public_vocabulary.py maps band_type and band_fraction to fraction and curve to weighting.

Red on the base, before the change (123 static findings, and all 13 retired spellings accepted or refused with another message):

test_no_choice_offers_a_band_set_by_name: 58 findings
phonometry.building.measurement.ratings.weighted_rating(bands): takes the band set as 'str | None'
phonometry.building.measurement.flanking_transmission.normalized_flanking_level_difference(bands): takes the band set as 'str | None'
phonometry.building.measurement.heavy_impact.AWeightedMaxImpactResult.band: takes the band set as 'str'
phonometry.building.measurement.service_equipment.ServiceEquipmentResult.band: takes the band set as 'str'
phonometry.building.prediction.facade.facade_sound_reduction(bands): takes the band set as 'str | None'
phonometry.building.prediction.panel_transmission.SoundReductionResult.rating(bands): takes the band set as 'str | None'
phonometry.building.measurement.service_equipment.service_equipment_level(band): offers ['octave', 'third']
phonometry.building.prediction.detailed_model.calculated_sound_reduction_index(bands): defaults to 'third'
...
test_no_table_or_tuple_holds_a_band_set_word: 32 findings
phonometry.building.measurement.heavy_impact.HEAVY_IMPACT_A_WEIGHTING: 'third'
...
test_a_sound_field_is_free_diffuse_or_pressure: 19 findings
phonometry.hearing.threshold.FIELDS: holds ['diffuse-field', 'free-field']
phonometry.hearing.threshold.reference_threshold(field): defaults to 'free-field'
phonometry.metrology.comparison_calibration._FIELDS: holds ['free_field']
phonometry.environment.assessment.soundscape_binaural.BinauralIndicators.field: typed 'str', with no Literal to read its options from
phonometry.psychoacoustics.loudness.zwicker.ZwickerLoudness.field: typed 'str | None', with no Literal to read its options from
...
test_a_flat_weighting_is_z: 4 findings
phonometry.signals.levels.ln_levels(weighting): defaults to None
phonometry.signals.levels.sel(weighting): defaults to None
phonometry.vibration.immission.vibration_meter._WEIGHTINGS: holds ['unweighted']
phonometry.vibration.immission.vibration_meter.verify_vibration_meter(weighting): offers ['unweighted']

test_a_weighting_is_chosen_by_weighting: 10 findings
phonometry.broadcast.quasi_peak.quasi_peak_meter(weighted): chooses a weighting as 'bool'
phonometry.electroacoustics.headphones.program_signal_level(a_weighted): chooses a weighting as 'bool'
phonometry.environment.assessment.wind_turbine_receptor.wind_turbine_low_frequency_level(a_weighted): chooses a weighting as 'bool'
phonometry.filters.weighting.weighting_filter(curve): chooses a weighting as 'str'
phonometry.filters.weighting_compliance.WeightingComplianceResult.curve: chooses a weighting as 'str'
...

test_a_retired_spelling_is_refused: 13 of 13 failed

A planted offender of each new shape fails on the branch: a public rating_by_name(values, bands: str | None = None) checked against an inline tuple, a public field_by_name(x, field: str = "diffuse"), and "unweighted" put back into the vibration meter's tuple of weightings.

Green on the branch:

tests/test_choice_vocabulary.py tests/test_public_vocabulary.py tests/test_package_architecture.py
169 passed

@sourcery-ai

sourcery-ai Bot commented Oct 17, 2026

Copy link
Copy Markdown

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

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 273 files, which is 173 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration
  • Configuration used: Repository: jmrplens/phonometry/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 08d77f5e-6543-460b-8342-f66bc15a76a8
📥 Commits

Reviewing files that changed from the base of the PR and between 5ffddef and 286b816.

⛔ Files ignored due to path filters: 5
  • .github/images/diagram_slm_pipeline.svg is excluded by !**/*.svg
  • .github/images/diagram_slm_pipeline_dark.svg is excluded by !**/*.svg
  • .github/images/diagram_slm_pipeline_es.svg is excluded by !**/*.svg
  • .github/images/diagram_slm_pipeline_es_dark.svg is excluded by !**/*.svg
  • scripts/boundary_comparison_exemptions.tsv is excluded by !**/*.tsv
📒 Files selected for processing: 273
  • CHANGELOG.md
  • CONTRIBUTING.md
  • docs/buildings/design/detailed-prediction.md
  • docs/buildings/design/insulation-prediction.md
  • docs/buildings/design/panel-sound-insulation.md
  • docs/buildings/insulation/facade-insulation.md
  • docs/buildings/insulation/insulation-ratings.md
  • docs/buildings/insulation/service-equipment-noise.md
  • docs/devices/broadcast/quasi-peak.md
  • docs/devices/electroacoustics/headphones.md
  • docs/devices/emission/free-field-qualification.md
  • docs/devices/emission/intensity.md
  • docs/devices/emission/sound-power-intensity.md
  • docs/devices/emission/sound-power-test-rooms.md
  • docs/devices/emission/sound-power.md
  • docs/devices/noise-control/enclosure-cabin-insulation.md
  • docs/io/audio-files.md
  • docs/perception/hearing/hearing-threshold.md
  • docs/reference/api/index.md
  • docs/signals/levels/levels.md
  • docs/signals/levels/special-weightings.md
  • docs/signals/levels/weighting.md
  • docs/signals/metrology/comparison-calibration.md
  • docs/signals/metrology/reciprocity-calibration.md
  • docs/signals/sound-level-meter.md
  • docs/start/upgrading.md
  • docs/vibration/structural/junction-transmission.md
  • docs/vibration/structural/structural-damage.md
  • llms-full.txt
  • scripts/check_parameter_units.py
  • scripts/conformance/domains/assessment.py
  • scripts/conformance/domains/building_prediction.py
  • scripts/conformance/domains/comparison_calibration.py
  • scripts/conformance/domains/enclosure_cabin_insulation.py
  • scripts/conformance/domains/headphones.py
  • scripts/conformance/domains/intensity.py
  • scripts/conformance/domains/service_equipment.py
  • scripts/conformance/domains/structural_damage.py
  • scripts/conformance/domains/structural_response.py
  • scripts/conformance/domains/vibration_immission.py
  • scripts/diagrams/signals.py
  • scripts/figures/building.py
  • scripts/figures/building_design.py
  • scripts/figures/devices.py
  • scripts/figures/metrology.py
  • scripts/figures/perception.py
  • scripts/figures/reciprocity.py
  • scripts/figures/signals.py
  • scripts/figures/theme.py
  • scripts/figures/vibration.py
  • scripts/reports/building_design.py
  • scripts/reports/emission.py
  • site/public/llms/llms-buildings-design.txt
  • site/public/llms/llms-buildings-insulation-ratings.txt
  • site/public/llms/llms-buildings-insulation.txt
  • site/public/llms/llms-devices-broadcast.txt
  • site/public/llms/llms-devices-electroacoustics.txt
  • site/public/llms/llms-devices-emission-enveloping.txt
  • site/public/llms/llms-devices-emission-intensity.txt
  • site/public/llms/llms-devices-emission-reverberant.txt
  • site/public/llms/llms-devices-emission.txt
  • site/public/llms/llms-devices-noise-control-measured.txt
  • site/public/llms/llms-io.txt
  • site/public/llms/llms-perception-hearing.txt
  • site/public/llms/llms-signals-levels.txt
  • site/public/llms/llms-signals-metrology-microphones.txt
  • site/public/llms/llms-signals.txt
  • site/public/llms/llms-start.txt
  • site/public/llms/llms-vibration-structural.txt
  • site/src/content/docs/buildings/design/detailed-prediction.mdx
  • site/src/content/docs/buildings/design/insulation-prediction.mdx
  • site/src/content/docs/buildings/design/panel-sound-insulation.mdx
  • site/src/content/docs/buildings/insulation/facade-insulation.mdx
  • site/src/content/docs/buildings/insulation/insulation-ratings.mdx
  • site/src/content/docs/buildings/insulation/service-equipment-noise.mdx
  • site/src/content/docs/devices/broadcast/quasi-peak.mdx
  • site/src/content/docs/devices/electroacoustics/headphones.mdx
  • site/src/content/docs/devices/emission/free-field-qualification.mdx
  • site/src/content/docs/devices/emission/intensity.mdx
  • site/src/content/docs/devices/emission/sound-power-intensity.mdx
  • site/src/content/docs/devices/emission/sound-power-test-rooms.mdx
  • site/src/content/docs/devices/emission/sound-power.mdx
  • site/src/content/docs/devices/noise-control/enclosure-cabin-insulation.mdx
  • site/src/content/docs/es/buildings/design/detailed-prediction.mdx
  • site/src/content/docs/es/buildings/design/insulation-prediction.mdx
  • site/src/content/docs/es/buildings/design/panel-sound-insulation.mdx
  • site/src/content/docs/es/buildings/insulation/facade-insulation.mdx
  • site/src/content/docs/es/buildings/insulation/insulation-ratings.mdx
  • site/src/content/docs/es/buildings/insulation/service-equipment-noise.mdx
  • site/src/content/docs/es/devices/broadcast/quasi-peak.mdx
  • site/src/content/docs/es/devices/electroacoustics/headphones.mdx
  • site/src/content/docs/es/devices/emission/free-field-qualification.mdx
  • site/src/content/docs/es/devices/emission/intensity.mdx
  • site/src/content/docs/es/devices/emission/sound-power-intensity.mdx
  • site/src/content/docs/es/devices/emission/sound-power-test-rooms.mdx
  • site/src/content/docs/es/devices/emission/sound-power.mdx
  • site/src/content/docs/es/devices/noise-control/enclosure-cabin-insulation.mdx
  • site/src/content/docs/es/io/audio-files.mdx
  • site/src/content/docs/es/perception/hearing/hearing-threshold.mdx
  • site/src/content/docs/es/signals/filters/block-processing.mdx
  • site/src/content/docs/es/signals/levels/levels.mdx
  • site/src/content/docs/es/signals/levels/special-weightings.mdx
  • site/src/content/docs/es/signals/levels/weighting.mdx
  • site/src/content/docs/es/signals/metrology/comparison-calibration.mdx
  • site/src/content/docs/es/signals/metrology/reciprocity-calibration.mdx
  • site/src/content/docs/es/signals/sound-level-meter.mdx
  • site/src/content/docs/es/start/getting-started.mdx
  • site/src/content/docs/es/start/upgrading.mdx
  • site/src/content/docs/es/vibration/structural/junction-transmission.mdx
  • site/src/content/docs/es/vibration/structural/structural-damage.mdx
  • site/src/content/docs/io/audio-files.mdx
  • site/src/content/docs/perception/hearing/hearing-threshold.mdx
  • site/src/content/docs/reference/api/broadcast/quasi-peak.md
  • site/src/content/docs/reference/api/building/aperture-transmission.md
  • site/src/content/docs/reference/api/building/detailed-model.md
  • site/src/content/docs/reference/api/building/facade.md
  • site/src/content/docs/reference/api/building/flanking-transmission.md
  • site/src/content/docs/reference/api/building/heavy-impact.md
  • site/src/content/docs/reference/api/building/installed-structure-borne.md
  • site/src/content/docs/reference/api/building/panel-transmission.md
  • site/src/content/docs/reference/api/building/ratings.md
  • site/src/content/docs/reference/api/building/resilient-layers.md
  • site/src/content/docs/reference/api/building/service-equipment.md
  • site/src/content/docs/reference/api/building/simplified-model.md
  • site/src/content/docs/reference/api/electroacoustics/headphones.md
  • site/src/content/docs/reference/api/environment/soundscape-binaural.md
  • site/src/content/docs/reference/api/environment/wind-turbine-receptor.md
  • site/src/content/docs/reference/api/filters/weighting-compliance.md
  • site/src/content/docs/reference/api/filters/weighting.md
  • site/src/content/docs/reference/api/hearing/sound-field-audiometry.md
  • site/src/content/docs/reference/api/hearing/threshold.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/api/metrology/reciprocity-calibration.md
  • site/src/content/docs/reference/api/metrology/reciprocity-free-field.md
  • site/src/content/docs/reference/api/noise_control/cabin-insulation.md
  • site/src/content/docs/reference/api/noise_control/enclosure-insulation.md
  • site/src/content/docs/reference/api/power/reference-sound-source.md
  • site/src/content/docs/reference/api/power/sound-power-intensity-points.md
  • site/src/content/docs/reference/api/power/sound-power-intensity.md
  • site/src/content/docs/reference/api/psychoacoustics/ecma.md
  • site/src/content/docs/reference/api/psychoacoustics/fluctuation-strength-ecma.md
  • site/src/content/docs/reference/api/psychoacoustics/moore-glasberg-time.md
  • site/src/content/docs/reference/api/psychoacoustics/moore-glasberg.md
  • site/src/content/docs/reference/api/psychoacoustics/roughness-ecma.md
  • site/src/content/docs/reference/api/psychoacoustics/tonality-ecma.md
  • site/src/content/docs/reference/api/psychoacoustics/zwicker.md
  • site/src/content/docs/reference/api/signals/levels.md
  • site/src/content/docs/reference/api/vibration/building-damage.md
  • site/src/content/docs/reference/api/vibration/building-response.md
  • site/src/content/docs/reference/api/vibration/experimental-sea.md
  • site/src/content/docs/reference/api/vibration/vibration-meter.md
  • site/src/content/docs/signals/filters/block-processing.mdx
  • site/src/content/docs/signals/levels/levels.mdx
  • site/src/content/docs/signals/levels/special-weightings.mdx
  • site/src/content/docs/signals/levels/weighting.mdx
  • site/src/content/docs/signals/metrology/comparison-calibration.mdx
  • site/src/content/docs/signals/metrology/reciprocity-calibration.mdx
  • site/src/content/docs/signals/sound-level-meter.mdx
  • site/src/content/docs/start/getting-started.mdx
  • site/src/content/docs/start/upgrading.mdx
  • site/src/content/docs/vibration/structural/junction-transmission.mdx
  • site/src/content/docs/vibration/structural/structural-damage.mdx
  • src/phonometry/_internal/types.py
  • src/phonometry/_internal/validation.py
  • src/phonometry/_plot/broadcast.py
  • src/phonometry/_plot/building.py
  • src/phonometry/_plot/headphones.py
  • src/phonometry/_plot/metrology.py
  • src/phonometry/_plot/reciprocity.py
  • src/phonometry/_plot/wind_turbine_receptor.py
  • src/phonometry/_report/iso10848.py
  • src/phonometry/_report/iso12354.py
  • src/phonometry/broadcast/quasi_peak.py
  • src/phonometry/building/measurement/flanking_transmission.py
  • src/phonometry/building/measurement/heavy_impact.py
  • src/phonometry/building/measurement/ratings.py
  • src/phonometry/building/measurement/service_equipment.py
  • src/phonometry/building/prediction/aperture_transmission.py
  • src/phonometry/building/prediction/detailed_model.py
  • src/phonometry/building/prediction/facade.py
  • src/phonometry/building/prediction/installed_structure_borne.py
  • src/phonometry/building/prediction/panel_transmission.py
  • src/phonometry/building/prediction/resilient_layers.py
  • src/phonometry/building/prediction/simplified_model.py
  • src/phonometry/electroacoustics/distortion.py
  • src/phonometry/electroacoustics/headphones.py
  • src/phonometry/emission/_shared.py
  • src/phonometry/emission/_sound_power_hard_walled.py
  • src/phonometry/emission/_sound_power_in_situ.py
  • src/phonometry/emission/_sound_power_intensity.py
  • src/phonometry/emission/_sound_power_intensity_points.py
  • src/phonometry/emission/_sound_power_reverberation.py
  • src/phonometry/emission/_sound_power_special_room.py
  • src/phonometry/emission/reference_sound_source.py
  • src/phonometry/emission/sound_power_high_frequency.py
  • src/phonometry/environment/assessment/impulsive_sound.py
  • src/phonometry/environment/assessment/soundscape_binaural.py
  • src/phonometry/environment/assessment/wind_turbine_receptor.py
  • src/phonometry/environment/sources/rolling_stock_noise.py
  • src/phonometry/filters/weighting.py
  • src/phonometry/filters/weighting_compliance.py
  • src/phonometry/hearing/sound_field_audiometry.py
  • src/phonometry/hearing/threshold.py
  • src/phonometry/metrology/comparison_calibration.py
  • src/phonometry/metrology/random_incidence.py
  • src/phonometry/metrology/reciprocity_calibration.py
  • src/phonometry/metrology/reciprocity_free_field.py
  • src/phonometry/noise_control/_cabin_insulation.py
  • src/phonometry/noise_control/_insulation_shared.py
  • src/phonometry/noise_control/enclosure_insulation.py
  • src/phonometry/psychoacoustics/loudness/ecma.py
  • src/phonometry/psychoacoustics/loudness/moore_glasberg.py
  • src/phonometry/psychoacoustics/loudness/moore_glasberg_time.py
  • src/phonometry/psychoacoustics/loudness/zwicker.py
  • src/phonometry/psychoacoustics/quality/_fluctuation_strength_ecma.py
  • src/phonometry/psychoacoustics/quality/_roughness_ecma.py
  • src/phonometry/psychoacoustics/quality/_tonality_ecma.py
  • src/phonometry/signals/levels.py
  • src/phonometry/vibration/_choices.py
  • src/phonometry/vibration/immission/vibration_meter.py
  • src/phonometry/vibration/structural/building_damage.py
  • src/phonometry/vibration/structural/building_response.py
  • src/phonometry/vibration/structural/experimental_sea.py
  • tests/broadcast/test_quasi_peak.py
  • tests/building/measurement/test_flanking_transmission_report.py
  • tests/building/measurement/test_heavy_impact.py
  • tests/building/measurement/test_impact_insulation.py
  • tests/building/measurement/test_insulation.py
  • tests/building/measurement/test_service_equipment.py
  • tests/building/prediction/test_detailed_model.py
  • tests/building/prediction/test_facade.py
  • tests/building/prediction/test_installed_structure_borne_tables.py
  • tests/building/prediction/test_panel_transmission.py
  • tests/building/prediction/test_resilient_layers.py
  • tests/building/prediction/test_simplified_model.py
  • tests/building/prediction/test_simplified_model_report.py
  • tests/building/test_insulation_datasheets.py
  • tests/electroacoustics/test_headphones.py
  • tests/emission/test_iso9614_report.py
  • tests/emission/test_reference_sound_source.py
  • tests/emission/test_sound_power_intensity.py
  • tests/emission/test_sound_power_intensity_points.py
  • tests/environment/assessment/test_wind_turbine_receptor.py
  • tests/filters/test_compliance.py
  • tests/filters/test_g_weighting.py
  • tests/filters/test_iec651_type0_weighting.py
  • tests/filters/test_itu_r_468_weighting.py
  • tests/filters/test_parametric_filters.py
  • tests/filters/test_signal_overloads.py
  • tests/filters/test_stateful_weighting_filter.py
  • tests/hearing/test_hearing.py
  • tests/metrology/test_comparison_calibration.py
  • tests/metrology/test_comparison_diameter_gap_validation.py
  • tests/metrology/test_comparison_phase_impedance_time.py
  • tests/metrology/test_random_incidence.py
  • tests/metrology/test_reciprocity_calibration.py
  • tests/metrology/test_reciprocity_free_field.py
  • tests/metrology/test_reciprocity_plots.py
  • tests/noise_control/test_cabin_insulation.py
  • tests/noise_control/test_enclosure_insulation.py
  • tests/noise_control/test_iso11546_1_oracles.py
  • tests/result_factories.py
  • tests/signals/test_levels.py
  • tests/test_choice_vocabulary.py
  • tests/test_derived_regimes.py
  • tests/test_errors_and_edge_cases.py
  • tests/test_printed_limits.py
  • tests/test_public_vocabulary.py
  • tests/test_removed_names.py
  • tests/test_signal_return_contract.py
  • tests/vibration/immission/test_vibration_meter.py
  • tests/vibration/structural/test_experimental_sea.py

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:

  • Review on demand using usage pricing
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 #984 October 17, 2026 17:11
@jmrplens jmrplens changed the title fix/one vocabulary per choice A choice reads the same everywhere: fraction=1 or 3 for the band set, "free", "diffuse" or "pressure" for the field, weighting= for the curve Oct 17, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation conformance Standard clause coverage, reference values or errata api Public API surface, naming and deprecations figures Generated plots, diagrams and animations reports Accredited-format .report() fiches and their rendering site Documentation website i18n English and Spanish translations area: broadcast Programme loudness and broadcast levels area: building Sound insulation and building acoustics area: electroacoustics Transducers, arrays and electroacoustic devices area: emission Sound power and source emission area: environment Outdoor propagation, environmental sources and noise assessment area: hearing Audiometric thresholds, hearing loss and noise exposure area: metrology Calibration, uncertainty and measurement quality area: noise control Silencers, barriers and noise control treatments area: psychoacoustics Loudness, sharpness, roughness and annoyance area: vibration Human vibration and structure-borne sound area: core Shared internals and cross-cutting code every domain depends on area: filters Octave filter banks, weightings and instrument class verification area: signals Levels, spectra, generators and general signal analysis labels Oct 17, 2026
@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.38838% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.88%. Comparing base (5ffddef) to head (286b816).

Files with missing lines Patch % Lines
src/phonometry/_report/iso10848.py 80.00% 1 Missing ⚠️
...c/phonometry/building/prediction/detailed_model.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##           fix/levels-carry-no-db-suffix     #976      +/-   ##
=================================================================
+ Coverage                          96.86%   96.88%   +0.01%     
=================================================================
  Files                                444      445       +1     
  Lines                              89966    89986      +20     
=================================================================
+ Hits                               87150    87185      +35     
+ Misses                              2816     2801      -15     

☔ 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 17, 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.

Renamed (3)

Standard Base quantity Head quantity
ISO 8297:1994 Table 2 Background correction at differences of 6 to 10 dB and at 12 dB, read through plant_background_correction_db Background correction at differences of 6 to 10 dB and at 12 dB, read through plant_background_correction
Wenz wind noise (rule of fives) Wind spectrum level at 1 kHz, 5 kn (canonical anchor), dB re 1 µPa²/Hz Wind spectrum level at 1 kHz, 5 kt (canonical anchor), dB re 1 µPa²/Hz
JOMOPANS-ECHO ship source level Bulker V=13.5 kn L=211 m band level at 1 kHz (File S1 oracle), dB re 1 µPa m Bulker V=13.5 kt L=211 m band level at 1 kHz (File S1 oracle), dB re 1 µPa m

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: 258543 tests, 0 failures (all green)
Python Version Tests Failures Coverage Status
macos-latest-3.12 28727 0 96.9% Pass Passed
macos-latest-3.13 28727 0 96.9% Pass Passed
macos-latest-3.14 28727 0 96.9% Pass Passed
ubuntu-latest-3.12 28727 0 96.9% Pass Passed
ubuntu-latest-3.13 28727 0 96.9% Pass Passed
ubuntu-latest-3.14 28727 0 96.9% Pass Passed
windows-latest-3.12 28727 0 96.9% Pass Passed
windows-latest-3.13 28727 0 96.9% Pass Passed
windows-latest-3.14 28727 0 96.9% Pass Passed

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

…set, `"free"`, `"diffuse"` or `"pressure"` for the field, `weighting=` for the curve

Three choices were spelled differently from one function to the next: the band set of a spectrum, the sound field and the frequency weighting. Code written against one module had to be relearned for the next, and a misspelt choice reached the function as a plain string. Each of them now has one spelling everywhere it is offered, every choice is a `Literal` a type checker reads, and the old words are refused by name.
@jmrplens
jmrplens force-pushed the fix/one-vocabulary-per-choice branch from 593ad64 to 286b816 Compare October 20, 2026 01:45
@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no actionable defect established.

Reviews (1) · Last reviewed commit: "A choice reads the same everywhere: `fra..." · Reviewed by Greptile

@sonarqubecloud

Copy link
Copy Markdown

@jmrplens
jmrplens merged commit 68ff12f into main Oct 21, 2026
104 of 107 checks passed
@jmrplens
jmrplens deleted the fix/one-vocabulary-per-choice branch October 21, 2026 12:43
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: broadcast Programme loudness and broadcast levels area: building Sound insulation and building acoustics area: core Shared internals and cross-cutting code every domain depends on area: electroacoustics Transducers, arrays and electroacoustic devices area: emission Sound power and source emission area: environment Outdoor propagation, environmental sources and noise assessment area: filters Octave filter banks, weightings and instrument class verification area: hearing Audiometric thresholds, hearing loss and noise exposure area: metrology Calibration, uncertainty and measurement quality area: noise control Silencers, barriers and noise control treatments area: psychoacoustics Loudness, sharpness, roughness and annoyance area: signals Levels, spectra, generators and general signal analysis area: vibration Human vibration and structure-borne sound conformance Standard clause coverage, reference values or errata documentation Improvements or additions to documentation 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