Skip to content

[FEATURE] add pytta.iso10534 for impedance tube measurements - #77

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

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

Conversation

@aguirreSL

@aguirreSL aguirreSL commented Oct 31, 2026 •

Copy link
Copy Markdown

Adds the module pytta.iso10534 for impedance tube measurements by the two-microphone transfer function method of ISO 10534-2:1998, as ita_kundt_* in the ITA-Toolbox:

  1. transfer_function(mic1, mic2): H12 = P2 / P1 from the recordings or impulse responses at the two microphone positions (microphone 1 further from the sample).
  2. reflection_factor(H12, f, x1, s, c0, calibration=None): Equation (17), r = (H12 - HI) / (HR - H12) exp(2 j k x1), with HI and HR of Annex D, and an optional calibration factor Hc (7.5.2) that divides H12.
  3. absorption(r) and impedance_ratio(r): Equations (18) and (19).
  4. speed_of_sound(temperature): Equation (5).
  5. frequency_range(d, s, c0): the working range of a circular tube from Equations (2) and (4) and the 5 % spacing rule.

The standard uses an exp(+j w t) time convention, the same as numpy.fft, so H12 from the FFT of the two signals enters the equations as it is.

The tests in tests/test_iso10534.py synthesize H12 with Equation (D.7) for a rigid termination (r = 1), an anechoic one (r = 0) and a complex r with a phase that varies with frequency, and recover r, alpha and Z exactly. They also check the transfer function of two delayed impulses, the speed of sound at 293 K and the frequency range of a 100 mm tube.

The switching technique of 7.5.1 is not included as a function; its corrected H12 can be passed to reflection_factor.

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

Two-microphone transfer function method of ISO 10534-2: transfer
function from the two microphone positions, reflection factor
(Equation 17, with the calibration factor of 7.5.2), absorption
coefficient, specific impedance ratio, speed of sound from temperature
and the working frequency range of a circular tube.

Tests synthesize H12 with Equation (D.7) for a rigid, an anechoic and a
complex termination and recover r exactly.

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