Skip to content

Commit

Permalink
[python] Start tests for Thiele/Small parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed Aug 17, 2024
1 parent 3a376a1 commit 1e12942
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/python/tests/test_thiele_small.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import numpy as np

from akustik.speaker.thiele_small import (
resonance_frequency,
total_q_factor,
)


def test_resonance_frequency():
assert np.allclose(resonance_frequency(Cms=0.000171, Mms=0.319), 21.548980)
assert np.allclose(resonance_frequency(Cms=0.000143, Mms=0.499), 18.840908)


def test_total_q_factor():
assert np.allclose(total_q_factor(Qms=3.69, Qes=0.346), 0.316337)
assert np.allclose(total_q_factor(Qms=4.05, Qes=0.347), 0.319615)

0 comments on commit 1e12942

Please sign in to comment.