Skip to content

Commit e67b83b

Browse files
author
simon.buechner22
committed
adjusted function name to late_lateral_sound_level
1 parent 9977fa3 commit e67b83b

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
@@ -10,7 +10,7 @@
1010
from pyrato.parameters import definition
1111
from pyrato.parameters import early_lateral_energy_fraction
1212
from pyrato.parameters import _energy_ratio
13-
from pyrato.parameters import late_lateral_level
13+
from pyrato.parameters import late_lateral_sound_level
1414

1515
# parameter clarity tests
1616
@pytest.mark.parametrize(
@@ -741,7 +741,7 @@ def test_LJ_accepts_timedata_and_returns_correct_shape(
741741
):
742742
"""Return type and shape of pyfar.TimeData input for identical edcs."""
743743
edc = make_edc(energy=energy, sampling_rate=1000)
744-
result = late_lateral_level(edc, edc)
744+
result = late_lateral_sound_level(edc, edc)
745745

746746
assert isinstance(result, (float, np.ndarray))
747747
assert result.shape == expected_shape
@@ -752,7 +752,7 @@ def test_LJ_returns_nan_for_zero_denominator_signal():
752752
edc_ref = pf.TimeData(np.zeros((1, 128)), np.arange(128) / 1000)
753753
edc_lat = pf.TimeData(np.ones((1, 128)), np.arange(128) / 1000)
754754

755-
result = late_lateral_level(edc_ref, edc_lat)
755+
result = late_lateral_sound_level(edc_ref, edc_lat)
756756
assert np.isnan(result)
757757

758758
def test_LJ_calculates_known_reference_value(make_edc):
@@ -779,7 +779,7 @@ def test_LJ_calculates_known_reference_value(make_edc):
779779
edc_lateral = make_edc(energy=edc_lateral,
780780
sampling_rate=1000, normalize=False)
781781

782-
result = late_lateral_level(edc_ref, edc_lateral)
782+
result = late_lateral_sound_level(edc_ref, edc_lateral)
783783

784784
expected = 10 * np.log10(0.5)
785785
np.testing.assert_allclose(result, expected, atol=1e-5)
@@ -803,7 +803,7 @@ def test_LJ_for_exponential_decay_analytical(make_edc):
803803
sampling_rate=sampling_rate,
804804
total_samples=total_samples)
805805

806-
result = late_lateral_level(edc_ref, edc_lat)
806+
result = late_lateral_sound_level(edc_ref, edc_lat)
807807

808808
a_lat = 13.8155 / 2.2
809809

0 commit comments

Comments
 (0)