Repository navigation
Conversation
…tta.rooms air_constants gives the speed of sound, density and impedance of humid air as ita_constants of the ITA-Toolbox. convert_room_quantity converts between reverberation time, absorption coefficient, reflection factor and surface impedance, as ita_convert_RT_alpha_R_Z, with the same formula (Eyring or Sabine) in both directions. din18041 gives the recommended reverberation time and its tolerance band of DIN 18041:2004, as ita_din18041_reverberation_times. Tests check the constants and the DIN 18041 band against the ITA-Toolbox on golden data from tests/golden/make_room_tools_ita.m (identical), and that the conversions are consistent in both directions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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 three room tools of the ITA-Toolbox to
pytta.rooms:air_constants(temperature=20, humidity=0.5, pressure=101325): the speed of sound, density and characteristic impedance of humid air, asita_constants. The gas constant of the air includes the molar concentration of water vapour of ISO 9613-1, with c = sqrt(1.4 R T) and ρ = p / (R T). The power attenuation of air ispytta.iso354.power_attenuation([FEATURE] add pytta.iso9613 and pytta.iso354 for air and room absorption #78), so it is not repeated here.convert_room_quantity(value, source, target, volume, surface, formula='eyring'): conversion between reverberation time, absorption coefficient, normal-incidence reflection factor and surface impedance, asita_convert_RT_alpha_R_Z. T and alpha are related by Eyring or Sabine in both directions.ita_convert_RT_alpha_R_Zgoes from T to alpha by Eyring and back by Sabine with air absorption, so its two directions do not invert each other. Then alpha = 1 - |R|², R = sqrt(1 - alpha) (real, since the phase is not known) and Z = z0 (1 + R) / (1 - R).din18041(volume, purpose='speech', frequencies=None): the recommended reverberation time T_soll = a lg V + b and its tolerance band by frequency for rooms for music, speech and education, asita_din18041_reverberation_times. That function follows DIN 18041:2004. The 2016 edition, with groups A1 to A5, was not available and is not implemented.ita_roomacoustics_H(H = -C50 in the 1 kHz octave) is left for when C50 is available outsideRoomAnalysis.ita_roomacoustics_hiratais left out, since its own header lists it as unfinished.The tests in
tests/test_room_tools.pyprint the measured differences:ita_constants, on golden data fromtests/golden/make_room_tools_ita.m(MATLAB R2026b). Dry air at 0 °C gives 331.23 m/s.ita_din18041_reverberation_times(3.3e-16).Checked with Python 3.12, numpy 1.26 and scipy 1.17. The 7 failures of
development(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