Skip to content

[FEATURE] add pytta.iso717 with the rating of airborne sound insulation - #65

Open
aguirreSL wants to merge 1 commit into
PyTTaMaster:developmentfrom
aguirreSL:dev-iso717
Open

aguirreSL wants to merge 1 commit into
PyTTaMaster:developmentfrom
aguirreSL:dev-iso717

Conversation

@aguirreSL

@aguirreSL aguirreSL commented Oct 31, 2026 •

Copy link
Copy Markdown

Adds the module pytta.iso717, next to pytta.iso3741, with airborne(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.py check:

  1. the example of Annex C (Table C.1), Rw(C;Ctr) = 30 (-2; -3) dB;
  2. that the limit is inclusive: in octave bands, a deviation of exactly 10.0 dB is accepted;
  3. the rounding of the input. Five values ending in 5 are taken 0.1 dB down by Python's round(), which would sum 32.3 dB of deviation and give Rw = 29. Rounded half up, they give the result of Annex C;
  4. that other numbers of bands are rejected.

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 in test_h5io.py, 4 in test_pyttasave.py) are the same with and without this change.

Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com

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 branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant