Skip to content

[FEATURE] add pytta.iso11654 with the weighted sound absorption coefficient - #133

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

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

Conversation

@aguirreSL

Copy link
Copy Markdown

Summary

Adds pytta.iso11654, the rating of sound absorption of ISO 11654:1997, which turns the one-third octave absorption coefficients measured by ISO 354 into the single number α_w used in product data:

  1. practical_absorption(alpha): the practical coefficient α_p of each octave, the arithmetic mean of its three one-third octave values to the second decimal, rounded in steps of 0.05 and limited to 1.00 (4.1).
  2. weighted_absorption(alpha_p): α_w and the shape indicators (4.2 and 4.3). The reference curve (0.80, 1.00, 1.00, 1.00 and 0.90 from 250 Hz to 4 kHz) moves in steps of 0.05 towards the measured values until the sum of the unfavourable deviations is 0.10 or less, and α_w is the shifted curve at 500 Hz. A practical coefficient 0.25 or more above the shifted curve adds L (250 Hz), M (500 Hz or 1 kHz) or H (2 kHz or 4 kHz).
  3. rating(alpha_w, shape): the rating as the standard writes it, e.g. 0.60(M).

The shifting is done in hundredths, with integers, so the steps of 0.05 and the criterion of 0.10 are exact.

Source and limits

The clauses and the examples were read from the preview of ISO 11654:1997 that ISO publishes, which holds clauses 1 to 5 and Annex A. The informative Annex B, the absorption classes A to E, is not in that preview, so it is left out until its table can be checked against the standard.

Tests

tests/test_iso11654.py checks the rules and the examples of the standard:

  1. The rounding note of 4.1: means of 0.42, 0.43, 0.47 and 0.48 give 0.40, 0.45, 0.45 and 0.50, 0.92 gives 0.90 (the example of the standard), and 1.07 is limited to 1.00.
  2. Figure A.1 gives α_w = 0.60 with an unfavourable deviation at 250 Hz, and Figure A.2, with 1.00 at 500 Hz, gives 0.60(M).
  3. A coefficient of 1 in every band rates 1.00, and an absorber of 0.9 at 250 Hz and 0.2 above it rates 0.20(L).

Checked with Python 3.12, numpy 1.26 and scipy 1.17. The 7 failures of development (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

…icient

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