Repository navigation
Conversation
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
pytta.fourpole, the four-pole (two-port) matrices of lumped mechanical and acoustic elements thatitaFourpoleandita_make_fourpoleof the ITA-Toolbox provide. The transmission matrix A relates force and velocity at the input to those at the output, [F1, v1] = A [F2, v2], and the matrices are arrays of shape (nFreqs, 2, 2):element(kind, value, freqs): the matrix of a mass, a spring (by its compliance), a dashpot, an impedance in series or to ground, a transformer or a gyrator, with the conventions ofita_make_fourpole.chain(*matrices): elements connected one after the other.input_impedance(A, load=None): F1 / v1 with a load at the output, blocked by default.a_to_z(A)andz_to_a(Z): the impedance matrix with both velocities entering the element, asitaFourpole.A2ZandZ2A.The ITA code was read for its semantics only and nothing was copied.
The tests in
tests/test_fourpole.pyprint the measured differences: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