Skip to content

Commit 4b82428

Browse files
author
simon.buechner22
committed
adjusted function name to late_lateral_sound_level
1 parent 2ed77fa commit 4b82428

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

pyrato/parameters.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,14 @@ def _energy_ratio(limits, energy_decay_curve1, energy_decay_curve2):
509509

510510
return energy_ratio
511511

512-
def late_lateral_level(energy_decay_curve_ref_10m,
512+
def late_lateral_sound_level(energy_decay_curve_ref_10m,
513513
energy_decay_curve_lateral):
514514
r"""
515-
Calculate the late lateral level.
515+
Calculate the late lateral sound level.
516516
517-
The late lateral level :math:`L_\mathrm{J}` is a measure of the strength
518-
of late-arriving lateral sound.
519-
According to [#isoLLJ]_, it is defined as the ratio between the
517+
The late lateral sound level :math:`L_\mathrm{J}` is a measure of the
518+
strength of late-arriving lateral sound.
519+
According to [#isoLLJ]_, it is defined as the level ratio between the
520520
lateral sound energy captured with a figure of eight microphone
521521
arriving after 80 ms and the total sound energy of a reference
522522
impulse response measured with an omnidirectional microphone
@@ -571,8 +571,8 @@ def late_lateral_level(energy_decay_curve_ref_10m,
571571
572572
Returns
573573
-------
574-
Late Lateral Level : numpy.ndarray
575-
Late lateral level (:math:`L_\mathrm{J}`) in decibels,
574+
Late Lateral Sound Level : numpy.ndarray
575+
Late lateral sound level (:math:`L_\mathrm{J}`) in decibels,
576576
shaped according to the channel shape of the input EDCs.
577577
578578
References

tests/test_parameters.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from pyrato.parameters import definition
1010
from pyrato.parameters import early_lateral_energy_fraction
1111
from pyrato.parameters import _energy_ratio
12-
from pyrato.parameters import late_lateral_level
12+
from pyrato.parameters import late_lateral_sound_level
1313

1414
# parameter clarity tests
1515
@pytest.mark.parametrize(
@@ -644,7 +644,7 @@ def test_LJ_accepts_timedata_and_returns_correct_shape(
644644
):
645645
"""Return type and shape of pyfar.TimeData input for identical edcs."""
646646
edc = make_edc(energy=energy, sampling_rate=1000)
647-
result = late_lateral_level(edc, edc)
647+
result = late_lateral_sound_level(edc, edc)
648648

649649
assert isinstance(result, (float, np.ndarray))
650650
assert result.shape == expected_shape
@@ -655,7 +655,7 @@ def test_LJ_returns_nan_for_zero_denominator_signal():
655655
edc_ref = pf.TimeData(np.zeros((1, 128)), np.arange(128) / 1000)
656656
edc_lat = pf.TimeData(np.ones((1, 128)), np.arange(128) / 1000)
657657

658-
result = late_lateral_level(edc_ref, edc_lat)
658+
result = late_lateral_sound_level(edc_ref, edc_lat)
659659
assert np.isnan(result)
660660

661661
def test_LJ_calculates_known_reference_value(make_edc):
@@ -682,7 +682,7 @@ def test_LJ_calculates_known_reference_value(make_edc):
682682
edc_lateral = make_edc(energy=edc_lateral,
683683
sampling_rate=1000, normalize=False)
684684

685-
result = late_lateral_level(edc_ref, edc_lateral)
685+
result = late_lateral_sound_level(edc_ref, edc_lateral)
686686

687687
expected = 10 * np.log10(0.5)
688688
np.testing.assert_allclose(result, expected, atol=1e-5)
@@ -706,7 +706,7 @@ def test_LJ_for_exponential_decay_analytical(make_edc):
706706
sampling_rate=sampling_rate,
707707
total_samples=total_samples)
708708

709-
result = late_lateral_level(edc_ref, edc_lat)
709+
result = late_lateral_sound_level(edc_ref, edc_lat)
710710

711711
a_lat = 13.8155 / 2.2
712712

0 commit comments

Comments
 (0)