Skip to content

Commit a83c2ec

Browse files
author
simon.buechner22
committed
Removed smoke test as it makes no sense
1 parent c9a052b commit a83c2ec

File tree

1 file changed

+2
-40
lines changed

1 file changed

+2
-40
lines changed

tests/test_parameters.py

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -784,45 +784,6 @@ def test_LJ_calculates_known_reference_value(make_edc):
784784
expected = 10 * np.log10(0.5)
785785
np.testing.assert_allclose(result, expected, atol=1e-5)
786786

787-
def test_LJ_is_within_ISO3382_range(make_edc):
788-
"""
789-
Smoke test: LJ must fall within the empirically observed range
790-
reported in ISO 3382-1 for concert halls:
791-
approximately -14 dB to +1 dB.
792-
"""
793-
794-
sampling_rate = 44100
795-
total_samples = 200000
796-
onset_samples = int(0.003 * sampling_rate)
797-
798-
t = np.arange(total_samples - onset_samples) / sampling_rate
799-
800-
decay_ref = np.exp(-13.8155 / 2.0 * t)
801-
decay_lat = 0.2 * np.exp(-13.8155 / 2.2 * t)
802-
803-
zeros = np.zeros(onset_samples)
804-
805-
energy_ref = make_edc(
806-
energy=np.concatenate([zeros, decay_ref]),
807-
sampling_rate=sampling_rate,
808-
normalize=False,
809-
)
810-
energy_lat = make_edc(
811-
energy=np.concatenate([zeros, decay_lat]),
812-
sampling_rate=sampling_rate,
813-
normalize=False,
814-
)
815-
816-
edc_ref = ra.edc.schroeder_integration(energy_ref, is_energy=True)
817-
edc_lat = ra.edc.schroeder_integration(energy_lat, is_energy=True)
818-
819-
result = late_lateral_level(edc_ref, edc_lat).item()
820-
821-
assert -14 <= result <= 1, (
822-
f"LJ = {result:.2f} dB is outside the ISO 3382-1 typical range "
823-
f"[-14 dB, +1 dB]"
824-
)
825-
826787
def test_LJ_for_exponential_decay_analytical(make_edc):
827788
"""
828789
LJ validation for analytical exponential decay:
@@ -833,7 +794,8 @@ def test_LJ_for_exponential_decay_analytical(make_edc):
833794
sampling_rate = 1000
834795
total_samples = 2000
835796

836-
edc_ref = make_edc(rt=2.0,
797+
# emulating free field impulse response
798+
edc_ref = make_edc(rt=0.01,
837799
sampling_rate=sampling_rate,
838800
total_samples=total_samples)
839801

0 commit comments

Comments
 (0)