Repository navigation
Conversation
pytta.iso717.airborne(R) gives Rw (or R'w, Dn,w, DnT,w) and the spectrum adaptation terms C and Ctr of ISO 717-1:2013 from 16 one-third-octave bands (100 Hz to 3150 Hz) or 5 octave bands (125 Hz to 2000 Hz), with the reference values and spectra of its Tables 3 and 4. R is rounded to 0.1 dB halves up, and the values are kept in tenths of a decibel as integers, so the limit of 32.0 dB or 10.0 dB is compared exactly. Tests pin the example of Annex C, Rw(C;Ctr) = 30 (-2; -3) dB, the inclusive limit in octave bands, and the rounding of inputs ending in 5. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 31, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the module
pytta.iso717, next topytta.iso3741, withairborne(R): the single-number rating of airborne sound insulation of ISO 717-1:2013. It takes the sound reduction index (or R', Dn, DnT) in 16 one-third-octave bands from 100 Hz to 3150 Hz or in 5 octave bands from 125 Hz to 2000 Hz, and returns(Xw, C, Ctr)in dB, that is Rw with the adaptation terms for pink noise and for urban traffic noise.The reference values and the two spectra are those of Tables 3 and 4 of the standard. R is first rounded to 0.1 dB, halves up, as clause 4.4 asks. The reference curve is shifted in steps of 1 dB until the sum of unfavourable deviations is as large as possible but not more than 32.0 dB (thirds) or 10.0 dB (octaves), and Xw is its value at 500 Hz. C and Ctr follow Equations (1) and (2), with X_Aj rounded to an integer. All values are kept in tenths of a decibel as integers, so the limit is compared exactly, as footnote 2 of the standard recommends.
The tests in
tests/test_iso717.pycheck:round(), which would sum 32.3 dB of deviation and give Rw = 29. Rounded half up, they give the result of Annex C;The shift in steps of 0.1 dB for the expression of uncertainty and the enlarged frequency range of Annex B are not included.
Checked with Python 3.12, numpy 1.26 and scipy 1.17. The existing tests behave as on
development: the 7 failures there (3 intest_h5io.py, 4 intest_pyttasave.py) are the same with and without this change.Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com